varnish / varnish-modules

Collection of Varnish Cache modules (vmods) by Varnish Software
Other
182 stars 86 forks source link

Saintmode admin health #106

Closed dridi closed 6 years ago

dridi commented 6 years ago

A change needed for Varnish 6, that we forgot despite @nigoroll's #83. If there are any takers, just fix it but make sure that it only applies to Varnish 6 and that it doesn't break previous versions. Otherwise I will eventually patch it.

17:29 < slink> I'd like to reset my master fork to your new 6.0 base, but there's one detail missing:
17:29 < slink> diff --git a/src/vmod_saintmode.c b/src/vmod_saintmode.c
17:29 < slink> index 26191cc..a66e6c0 100644
17:29 < slink> --- a/src/vmod_saintmode.c
17:29 < slink> +++ b/src/vmod_saintmode.c
17:29 < slink> @@ -350,6 +350,7 @@ vmod_saintmode__init(VRT_CTX, struct vmod_saintmode_saintmode **smp,
17:29 < slink>  #endif
17:29 < slink>         REPLACE(sm->sdir->vcl_name, vcl_name);
17:29 < slink>         sm->sdir->name = "saintmode";
17:29 < slink> +       sm->sdir->admin_health = VDI_AH_HEALTHY;
17:29 < slink>         sm->sdir->priv = sm;
17:29 < slink>  
17:29 < slink>         if (!priv->priv) {
17:29 < slink> the rest of the diff are cosmetic I'd say
17:30 < slink> dridi: 
17:30 < slink> there is an assert on the director level admin_health now
17:34 < dridi> oh, right
17:34 < dridi> we had to do that for other vmods too
17:34 < dridi> how come this doesn't trigger from the test suite?
17:49 < slink> dridi: only triggered if you use std.healthy() on the backend
17:53 < slink> s:backend:director:

Obviously we want a failing test case first since we lack coverage for this change.

dridi commented 6 years ago

Fixed via 9818266b679041440768297eb81c53c7a1ba4f65.