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
b3a74ff9
Commit
b3a74ff9
authored
Mar 23, 2015
by
Federico G. Schwindt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow to reset the child_panic counter
panic.clear gains a -z optional parameter. Fixes #1609.
parent
a64da717
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
5 deletions
+17
-5
mgt_child.c
bin/varnishd/mgt/mgt_child.c
+9
-1
v00010.vtc
bin/varnishtest/tests/v00010.vtc
+5
-1
varnish-cli.rst
doc/sphinx/reference/varnish-cli.rst
+1
-1
vcli.h
include/vcli.h
+2
-2
No files found.
bin/varnishd/mgt/mgt_child.c
View file @
b3a74ff9
...
...
@@ -159,9 +159,17 @@ mcf_panic_show(struct cli *cli, const char * const *av, void *priv)
void
__match_proto__
(
cli_func_t
)
mcf_panic_clear
(
struct
cli
*
cli
,
const
char
*
const
*
av
,
void
*
priv
)
{
(
void
)
av
;
(
void
)
priv
;
if
(
av
[
2
]
!=
NULL
&&
strcmp
(
av
[
2
],
"-z"
))
{
VCLI_SetResult
(
cli
,
CLIS_PARAM
);
VCLI_Out
(
cli
,
"Unknown parameter
\"
%s
\"
."
,
av
[
2
]);
return
;
}
else
if
(
av
[
2
]
!=
NULL
)
{
VSC_C_mgt
->
child_panic
=
static_VSC_C_mgt
.
child_panic
=
0
;
if
(
child_panic
==
NULL
)
return
;
}
if
(
child_panic
==
NULL
)
{
VCLI_SetResult
(
cli
,
CLIS_CANT
);
VCLI_Out
(
cli
,
"No panic to clear"
);
...
...
bin/varnishtest/tests/v00010.vtc
View file @
b3a74ff9
...
...
@@ -49,6 +49,7 @@ client c1 {
varnish v1 -wait-stopped
varnish v1 -cliok "panic.show"
varnish v1 -cliok "panic.clear"
varnish v1 -expect MGT.child_panic == 1
varnish v1 -clierr 300 "panic.clear"
varnish v1 -cliok "start"
varnish v1 -wait-running
...
...
@@ -65,7 +66,8 @@ client c1 {
varnish v1 -wait-stopped
varnish v1 -cliok "panic.show"
varnish v1 -cliok "panic.clear"
varnish v1 -cliok "panic.clear -z"
varnish v1 -expect MGT.child_panic == 0
varnish v1 -clierr 300 "panic.clear"
varnish v1 -cliok "start"
varnish v1 -wait-running
...
...
@@ -78,3 +80,5 @@ client c1 {
rxresp
expect resp.http.foo == "foo"
} -run
varnish v1 -cliok "panic.clear -z"
doc/sphinx/reference/varnish-cli.rst
View file @
b3a74ff9
...
...
@@ -128,7 +128,7 @@ param.set <param> <value>
panic.show
Return the last panic, if any.
panic.clear
panic.clear
[-z]
Clear the last panic, if any.
storage.list
...
...
include/vcli.h
View file @
b3a74ff9
...
...
@@ -167,9 +167,9 @@
#define CLI_PANIC_CLEAR \
"panic.clear", \
"panic.clear
",
\
"panic.clear
[-z]",
\
"\tClear the last panic, if any.", \
0,
0
0,
1
/*
* Status/return codes in the CLI protocol
...
...
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