Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/219502
Change subject: Make varnish template compatible with labs ...................................................................... Make varnish template compatible with labs There is only one backend for deployment-prep currently so when it encounters this equation it tries to take log10(0) and breaks. Bug: T102570 Change-Id: Ic7f4eb3fceb23112bf75a7c648d57f1aa3f28c42 --- M modules/varnish/templates/vcl/wikimedia.vcl.erb 1 file changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/02/219502/1 diff --git a/modules/varnish/templates/vcl/wikimedia.vcl.erb b/modules/varnish/templates/vcl/wikimedia.vcl.erb index f305691..a4c8a1c 100644 --- a/modules/varnish/templates/vcl/wikimedia.vcl.erb +++ b/modules/varnish/templates/vcl/wikimedia.vcl.erb @@ -33,7 +33,11 @@ # weight*num_backends. # Blame _joe_ for the math! :) def chash_def_retries(p, n) - return ((Math.log10(100 - p) - 2) / (Math.log10(n - 1) - Math.log10(n))).ceil + x = n - 1 + if (x <= 0) + return n + end + return ((Math.log10(100 - p) - 2) / (Math.log10(x) - Math.log10(n))).ceil end -%> -- To view, visit https://gerrit.wikimedia.org/r/219502 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic7f4eb3fceb23112bf75a7c648d57f1aa3f28c42 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Thcipriani <tcipri...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits