Giuseppe Lavagetto has uploaded a new change for review.
https://gerrit.wikimedia.org/r/316813
Change subject: restart-service: consider the case the server is not in the pool
......................................................................
restart-service: consider the case the server is not in the pool
Change-Id: I4e0dc5aa9797fe1498c40781d2551d3c248a0226
---
M modules/conftool/templates/restart-service.erb
1 file changed, 3 insertions(+), 3 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/13/316813/1
diff --git a/modules/conftool/templates/restart-service.erb
b/modules/conftool/templates/restart-service.erb
index b5335f0..e249e7a 100755
--- a/modules/conftool/templates/restart-service.erb
+++ b/modules/conftool/templates/restart-service.erb
@@ -3,10 +3,10 @@
# Check the pooling status first
POOLING_STATUS=$(confctl select 'name=<%= @fqdn %>,service=<%= @service %>'
get | jq '.["<%= @fqdn %>"].pooled')
-if [ $POOLING_STATUS == '"yes"' ]; then
+if [ "$POOLING_STATUS" == '"yes"' ]; then
DO_POOL=1
fi
-test -z ${DO_POOL} && /usr/local/bin/depool-<%= @title %>
+test ${DO_POOL} && /usr/local/bin/depool-<%= @title %>
/usr/sbin/service '<%= @title %>' restart
-test -x ${DO_POOL} && /usr/local/bin/pool-<%= @title %>
+test ${DO_POOL} && /usr/local/bin/pool-<%= @title %>
--
To view, visit https://gerrit.wikimedia.org/r/316813
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4e0dc5aa9797fe1498c40781d2551d3c248a0226
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits