• Nils Goroll's avatar
    When connecting to backends, respect the administrative health · fe5e8265
    Nils Goroll authored
    When making a connection a "real" backend (VBE), we checked the probed
    health state and did not take into account the administrative health
    state as set with `varnishadm backend.set_health ... {healthy,sick}`.
    
    Our documentation was not particularly explicit on this aspect either,
    but the administrative states `sick` and `healthy` made no sense if
    `auto` semantics was implied always. Also, the semantics were implicitly
    documented for `backend.list`.
    
    Implementation note:
    
    The relevant change is to call `VRT_Healthy()`, which does check the
    administrative health, in place of checking `(struct backend *)->sick`
    in `vbe_dir_getfd()`.
    
    As a `VRT_CTX` is required by `VRT_Healthy()`, we change the arguments of
    `vbe_dir_getfd()` accordingly: The busyobj can now be taken from the ctx,
    but the worker argument differs for pipe mode vs. fetch, so we preserve
    it as an explicit argument.
    
    A test for overriding a probed backend as healthy has been added to
    c00048.vtc, which requires a second probe to hit server s1 and fail.
    This is timing sensitive, so I hope that the backend probe interval
    of 5 seconds is long enough for all our test environments. If not,
    we probably need to make it longer or add another vtc.
    
    Fixes #3299
    fe5e8265
Name
Last commit
Last update
..
README Loading commit data...
acct_fields_bereq.h Loading commit data...
acct_fields_req.h Loading commit data...
backend_poll.h Loading commit data...
ban_arg_oper.h Loading commit data...
ban_oper.h Loading commit data...
ban_vars.h Loading commit data...
bo_flags.h Loading commit data...
boc_state.h Loading commit data...
body_status.h Loading commit data...
cli_cmds.h Loading commit data...
debug_bits.h Loading commit data...
feature_bits.h Loading commit data...
h2_error.h Loading commit data...
h2_frames.h Loading commit data...
h2_settings.h Loading commit data...
h2_stream.h Loading commit data...
htc.h Loading commit data...
http_headers.h Loading commit data...
http_response.h Loading commit data...
locks.h Loading commit data...
mgt_vcc.h Loading commit data...
obj_attr.h Loading commit data...
oc_exp_flags.h Loading commit data...
oc_flags.h Loading commit data...
params.h Loading commit data...
req_flags.h Loading commit data...
sess_attr.h Loading commit data...
sess_close.h Loading commit data...
steps.h Loading commit data...
style.py Loading commit data...
symbol_kind.h Loading commit data...
vcl_states.h Loading commit data...
vhd_fsm.h Loading commit data...
vhd_fsm_funcs.h Loading commit data...
vhd_return.h Loading commit data...
vhp_huffman.h Loading commit data...
vhp_static.h Loading commit data...
vsc_levels.h Loading commit data...
vsig_list.h Loading commit data...
vsl_tags.h Loading commit data...
vsl_tags_http.h Loading commit data...
waiters.h Loading commit data...