Commit b7572aff authored by Dag Haavi Finstad's avatar Dag Haavi Finstad

Fixes an issue in backend probe initialization that causes the default

value of .initial to equal .threshold.

The default for .initial is now .threshold - 1, meaning that the backend
starts up as sick and a single successful poll is required for it to be
considered healthy.

With the previous behaviour, a sick backend would not be considered sick
until after the initial polls exit the polling window.

Thanks to Colin Curtin.

Fixes: #1227
parent ab17fecd
......@@ -461,7 +461,7 @@ vbp_new_vcl(const struct vrt_backend_probe *p, const char *hosthdr)
if (vcl->probe.exp_status == 0)
vcl->probe.exp_status = 200;
if (vcl->probe.threshold == ~0U)
if (vcl->probe.initial == ~0U)
vcl->probe.initial = vcl->probe.threshold - 1;
if (vcl->probe.initial > vcl->probe.threshold)
......
......@@ -201,8 +201,10 @@ Probes take the following parameters:
the backend healthy.
Defaults to 3.
.initial
How many of the probes are considered good when Varnish starts.
Defaults to the same amount as the threshold.
How many of the polls in .window are considered good when Varnish
starts. Defaults to the value of threshold - 1. In this case, the
backend starts as sick and requires one single poll to be considered
healthy.
.expected_response
The expected backend HTTP response code.
Defaults to 200.
......
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