[master] c7e611c Log the details of the vcl-poker fails to set state in the worker process.
Poul-Henning Kamp
phk at FreeBSD.org
Thu Feb 2 09:22:05 CET 2017
commit c7e611ce56023042eda326d7ce171734708fbd01
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Thu Feb 2 08:21:11 2017 +0000
Log the details of the vcl-poker fails to set state in the worker process.
diff --git a/bin/varnishd/mgt/mgt_vcl.c b/bin/varnishd/mgt/mgt_vcl.c
index 9d22352..b8ac355 100644
--- a/bin/varnishd/mgt/mgt_vcl.c
+++ b/bin/varnishd/mgt/mgt_vcl.c
@@ -298,13 +298,15 @@ mgt_vcl_setstate(struct cli *cli, struct vclprog *vp, const char *vs)
i = mgt_cli_askchild(&status, &p, "vcl.state %s %d%s\n",
vp->name, vp->warm, vp->state);
- if (i) {
- AN(cli);
- XXXAN(vp->warm); /* XXX: should restart child instead */
+ if (i && cli != NULL) {
VCLI_SetResult(cli, status);
VCLI_Out(cli, "%s", p);
+ } else if (i) {
+ MGT_Complain(C_ERR,
+ "Please file ticket: VCL poker problem: "
+ "'vcl.state %s %d%s' -> %03d '%s'",
+ vp->name, vp->warm, vp->state, i, p);
}
-
free(p);
return (i);
}
More information about the varnish-commit
mailing list