Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
82d8153a
Commit
82d8153a
authored
Mar 04, 2019
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use 0/0 healthy for "no probe" in the probe field
Add another column for the probe result Ref #2896
parent
7b658a48
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
10 deletions
+13
-10
cache_backend.c
bin/varnishd/cache/cache_backend.c
+2
-3
cache_backend_probe.c
bin/varnishd/cache/cache_backend_probe.c
+1
-1
cache_director.c
bin/varnishd/cache/cache_director.c
+9
-5
vdir.c
lib/libvmod_directors/vdir.c
+1
-1
No files found.
bin/varnishd/cache/cache_backend.c
View file @
82d8153a
...
@@ -461,12 +461,11 @@ vbe_list(VRT_CTX, const struct director *d, struct vsb *vsb, int pflag,
...
@@ -461,12 +461,11 @@ vbe_list(VRT_CTX, const struct director *d, struct vsb *vsb, int pflag,
else
if
(
jflag
&&
pflag
)
else
if
(
jflag
&&
pflag
)
VSB_printf
(
vsb
,
"{},
\n
"
);
VSB_printf
(
vsb
,
"{},
\n
"
);
else
if
(
jflag
)
else
if
(
jflag
)
VSB_printf
(
vsb
,
"
\"
%s
\"
"
,
bp
->
sick
?
"sick"
:
"healthy
"
);
VSB_printf
(
vsb
,
"
[0, 0,
\"
healthy
\"
]
"
);
else
if
(
pflag
)
else
if
(
pflag
)
return
;
return
;
else
else
VSB_printf
(
vsb
,
"%s"
,
VSB_cat
(
vsb
,
"0/0
\t
healthy"
);
bp
->
sick
?
"sick"
:
"healthy"
);
}
}
/*--------------------------------------------------------------------
/*--------------------------------------------------------------------
...
...
bin/varnishd/cache/cache_backend_probe.c
View file @
82d8153a
...
@@ -519,7 +519,7 @@ VBP_Status(struct vsb *vsb, const struct backend *be, int details, int json)
...
@@ -519,7 +519,7 @@ VBP_Status(struct vsb *vsb, const struct backend *be, int details, int json)
vt
->
good
,
vt
->
window
,
vt
->
good
,
vt
->
window
,
vt
->
backend
->
sick
?
"sick"
:
"healthy"
);
vt
->
backend
->
sick
?
"sick"
:
"healthy"
);
else
else
VSB_printf
(
vsb
,
"%u/%u
%s"
,
vt
->
good
,
vt
->
window
,
VSB_printf
(
vsb
,
"%u/%u
\t
%s"
,
vt
->
good
,
vt
->
window
,
vt
->
backend
->
sick
?
"sick"
:
"healthy"
);
vt
->
backend
->
sick
?
"sick"
:
"healthy"
);
return
;
return
;
}
}
...
...
bin/varnishd/cache/cache_director.c
View file @
82d8153a
...
@@ -327,13 +327,14 @@ do_list(struct cli *cli, struct director *d, void *priv)
...
@@ -327,13 +327,14 @@ do_list(struct cli *cli, struct director *d, void *priv)
ctx
=
VCL_Get_CliCtx
(
0
);
ctx
=
VCL_Get_CliCtx
(
0
);
// XXX admin health "probe" for the no-probe case is confusing
VSB_printf
(
la
->
vsb
,
"%s
\t
%s
\t
"
,
d
->
vdir
->
cli_name
,
VDI_Ahealth
(
d
));
VSB_printf
(
la
->
vsb
,
"%s
\t
%s
\t
"
,
d
->
vdir
->
cli_name
,
VDI_Ahealth
(
d
));
if
(
d
->
vdir
->
methods
->
list
!=
NULL
)
if
(
d
->
vdir
->
methods
->
list
!=
NULL
)
d
->
vdir
->
methods
->
list
(
ctx
,
d
,
la
->
vsb
,
0
,
0
);
d
->
vdir
->
methods
->
list
(
ctx
,
d
,
la
->
vsb
,
0
,
0
);
else
if
(
d
->
vdir
->
methods
->
healthy
!=
NULL
)
VSB_printf
(
la
->
vsb
,
"0/0
\t
%s"
,
cli_health
(
ctx
,
d
));
else
else
VSB_
printf
(
la
->
vsb
,
"%s"
,
cli_health
(
ctx
,
d
)
);
VSB_
cat
(
la
->
vsb
,
"0/0
\t
healthy"
);
VTIM_format
(
d
->
vdir
->
health_changed
,
time_str
);
VTIM_format
(
d
->
vdir
->
health_changed
,
time_str
);
VSB_printf
(
la
->
vsb
,
"
\t
%s"
,
time_str
);
VSB_printf
(
la
->
vsb
,
"
\t
%s"
,
time_str
);
...
@@ -372,8 +373,11 @@ do_list_json(struct cli *cli, struct director *d, void *priv)
...
@@ -372,8 +373,11 @@ do_list_json(struct cli *cli, struct director *d, void *priv)
VCLI_Out
(
cli
,
"
\"
probe_message
\"
: "
);
VCLI_Out
(
cli
,
"
\"
probe_message
\"
: "
);
if
(
d
->
vdir
->
methods
->
list
!=
NULL
)
if
(
d
->
vdir
->
methods
->
list
!=
NULL
)
d
->
vdir
->
methods
->
list
(
ctx
,
d
,
cli
->
sb
,
0
,
1
);
d
->
vdir
->
methods
->
list
(
ctx
,
d
,
cli
->
sb
,
0
,
1
);
else
if
(
d
->
vdir
->
methods
->
healthy
!=
NULL
)
VCLI_Out
(
cli
,
"[0, 0,
\"
%s
\"
]"
,
cli_health
(
ctx
,
d
));
else
else
VCLI_Out
(
cli
,
"
\"
%s
\"
"
,
cli_health
(
ctx
,
d
));
VCLI_Out
(
cli
,
"[0, 0,
\"
healthy
\"
]"
);
VCLI_Out
(
cli
,
",
\n
"
);
VCLI_Out
(
cli
,
",
\n
"
);
if
(
la
->
p
&&
d
->
vdir
->
methods
->
list
!=
NULL
)
{
if
(
la
->
p
&&
d
->
vdir
->
methods
->
list
!=
NULL
)
{
...
@@ -431,8 +435,8 @@ cli_backend_list(struct cli *cli, const char * const *av, void *priv)
...
@@ -431,8 +435,8 @@ cli_backend_list(struct cli *cli, const char * const *av, void *priv)
}
else
{
}
else
{
la
->
vsb
=
VSB_new_auto
();
la
->
vsb
=
VSB_new_auto
();
AN
(
la
->
vsb
);
AN
(
la
->
vsb
);
VSB_printf
(
la
->
vsb
,
"%s
\t
%s
\t
%s
\t
%s
\n
"
,
VSB_printf
(
la
->
vsb
,
"%s
\t
%s
\t
%s
\t
%s
\
t
%s
\
n
"
,
"Backend name"
,
"Admin"
,
"Probe"
,
"Last change"
);
"Backend name"
,
"Admin"
,
"Probe"
,
"
Health"
,
"
Last change"
);
(
void
)
VCL_IterDirector
(
cli
,
av
[
i
],
do_list
,
la
);
(
void
)
VCL_IterDirector
(
cli
,
av
[
i
],
do_list
,
la
);
VCLI_VTE
(
cli
,
&
la
->
vsb
,
80
);
VCLI_VTE
(
cli
,
&
la
->
vsb
,
80
);
}
}
...
...
lib/libvmod_directors/vdir.c
View file @
82d8153a
...
@@ -259,7 +259,7 @@ vdir_list(VRT_CTX, struct vdir *vd, struct vsb *vsb, int pflag, int jflag)
...
@@ -259,7 +259,7 @@ vdir_list(VRT_CTX, struct vdir *vd, struct vsb *vsb, int pflag, int jflag)
VSB_printf
(
vsb
,
"[%u, %u,
\"
%s
\"
]"
,
nh
,
u
,
VSB_printf
(
vsb
,
"[%u, %u,
\"
%s
\"
]"
,
nh
,
u
,
nh
?
"healthy"
:
"sick"
);
nh
?
"healthy"
:
"sick"
);
else
else
VSB_printf
(
vsb
,
"%u/%u
%s"
,
nh
,
u
,
nh
?
"healthy"
:
"sick"
);
VSB_printf
(
vsb
,
"%u/%u
\t
%s"
,
nh
,
u
,
nh
?
"healthy"
:
"sick"
);
}
}
static
unsigned
static
unsigned
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment