Commit eaeac206 authored by Nils Goroll's avatar Nils Goroll

fix vcl temperature after failing warmup event

Fixes #2835
parent 1c1a72af
......@@ -507,10 +507,12 @@ vcl_set_state(VRT_CTX, const char *state)
else {
vcl->temp = VCL_TEMP_WARM;
i = vcl_send_event(ctx, VCL_EVENT_WARM);
if (i == 0)
if (i == 0) {
vcl_BackendEvent(vcl, VCL_EVENT_WARM);
else
AZ(vcl->conf->event_vcl(ctx, VCL_EVENT_COLD));
break;
}
AZ(vcl->conf->event_vcl(ctx, VCL_EVENT_COLD));
vcl->temp = VCL_TEMP_COLD;
}
break;
default:
......
......@@ -88,6 +88,8 @@ varnish v1 -expect !VBE.vcl1.default.happy
varnish v1 -cliok "param.set max_esi_depth 42"
varnish v1 -clierr 300 "vcl.state vcl1 warm"
varnish v1 -cliexpect "available *cold/cold *[0-9]+ *vcl1\\s+active *warm/warm *[0-9]+ *vcl2" "vcl.list"
# A warm-up failure can also fail a child start
varnish v1 -cliok stop
varnish v1 -cliok "vcl.state vcl1 warm"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment