Giuseppe Lavagetto has submitted this change and it was merged.

Change subject: restart-service: do not fail if the server is not found in 
conftool
......................................................................


restart-service: do not fail if the server is not found in conftool

Change-Id: I4e0dc5aa9797fe1498c40781d2551d3c248a0226
---
M modules/conftool/templates/restart-service.erb
1 file changed, 3 insertions(+), 3 deletions(-)

Approvals:
  Giuseppe Lavagetto: Looks good to me, approved
  jenkins-bot: Verified



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: merged
Gerrit-Change-Id: I4e0dc5aa9797fe1498c40781d2551d3c248a0226
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto <[email protected]>
Gerrit-Reviewer: Giuseppe Lavagetto <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to