Alexandros Kosiaris has submitted this change and it was merged.

Change subject: puppet-merge: Run conftool-merge in only 1 frontend
......................................................................


puppet-merge: Run conftool-merge in only 1 frontend

No need to run conftool-merge on multiple frontends. It won't hurt but
we don't really need to and gitpuppet user does not really have the
right to run it resulting at an error

Change-Id: I8b386fa468c8f787d4d20141d7a0a5f86b6713c1
---
M modules/puppetmaster/templates/puppet-merge.erb
1 file changed, 5 insertions(+), 2 deletions(-)

Approvals:
  Alexandros Kosiaris: Verified; Looks good to me, approved



diff --git a/modules/puppetmaster/templates/puppet-merge.erb 
b/modules/puppetmaster/templates/puppet-merge.erb
index 8073be9..29a30db 100755
--- a/modules/puppetmaster/templates/puppet-merge.erb
+++ b/modules/puppetmaster/templates/puppet-merge.erb
@@ -177,8 +177,11 @@
 fi
 
 <%- if @servers.has_key?(@fqdn) -%>
-echo "Now running conftool-merge to sync any changes to conftool data"
-/usr/local/bin/conftool-merge
+# conftool-merge does need to run from >1 frontend, avoid running a second time
+if [ $running_user != $git_user ]; then
+    echo "Now running conftool-merge to sync any changes to conftool data"
+    /usr/local/bin/conftool-merge
+fi
 # Note: The "true" command is passed on purpose to show that the command passed
 # to the SSH sessions is irrelevant. It's the SSH forced command trick on the
 # worker end that does the actual work. Note that the $sha1 however is 
important

-- 
To view, visit https://gerrit.wikimedia.org/r/311096
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I8b386fa468c8f787d4d20141d7a0a5f86b6713c1
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris <akosia...@wikimedia.org>
Gerrit-Reviewer: Alexandros Kosiaris <akosia...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to