BBlack has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/353585 )
Change subject: VCL: Do not assume obj.grace > grace_healthy ...................................................................... VCL: Do not assume obj.grace > grace_healthy Bug: T165063 Change-Id: I345e1e70d2c392a7073dab40c73000953269f6af --- M modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/85/353585/1 diff --git a/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb b/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb index 635ea30..756b818 100644 --- a/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb +++ b/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb @@ -338,15 +338,15 @@ sub wm_common_hit_grace { if (obj.ttl < 0s) { # TTL expired - if (std.healthy(req.backend_hint)) { - # Backend is healthy. Limit age to vcl_config['grace_healthy'] + if (std.healthy(req.backend_hint) && obj.grace > <%= @vcl_config.fetch("grace_healthy", "5m") %>) { + # Backend is healthy. Limit age to max vcl_config['grace_healthy'] if (obj.ttl + <%= @vcl_config.fetch("grace_healthy", "5m") %> <= 0s) { # No candidate for grace. Fetch a fresh object. return (miss); } } else { - # Backend is sick, use full grace. We set beresp.grace in - # wm_common_backend_response. + # Backend is sick, or object grace was < grace_healthy, so use full grace. + # We set beresp.grace in wm_common_backend_response. if (obj.ttl + obj.grace <= 0s) { # No candidate for grace. return (miss); -- To view, visit https://gerrit.wikimedia.org/r/353585 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I345e1e70d2c392a7073dab40c73000953269f6af Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlack <bbl...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits