Ori.livneh has uploaded a new change for review.
https://gerrit.wikimedia.org/r/92840
Change subject: Make Upstart_job check service status before attempting to
start it
......................................................................
Make Upstart_job check service status before attempting to start it
Also touch twemproxy upstart config to make it refresh the upstart_job so we
can test it.
Change-Id: Icdc52139a629c261b957bca636ee36ffe4b28aa4
---
M modules/generic/files/upstart/twemproxy.conf
M modules/generic/manifests/upstart_job.pp
2 files changed, 6 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/40/92840/1
diff --git a/modules/generic/files/upstart/twemproxy.conf
b/modules/generic/files/upstart/twemproxy.conf
index 2f24c20..bf13fc1 100644
--- a/modules/generic/files/upstart/twemproxy.conf
+++ b/modules/generic/files/upstart/twemproxy.conf
@@ -1,3 +1,8 @@
+# vim: set ft=upstart:
+
+# Upstart job configuration for twemproxy
+# This file is managed by Puppet
+
description "twemproxy"
start on (net-device-up
diff --git a/modules/generic/manifests/upstart_job.pp
b/modules/generic/manifests/upstart_job.pp
index a2e5b46..330f31a 100644
--- a/modules/generic/manifests/upstart_job.pp
+++ b/modules/generic/manifests/upstart_job.pp
@@ -17,6 +17,7 @@
subscribe => File["/etc/init/${title}.conf"],
refreshonly => true,
command => "start ${title}",
+ unless => "status ${title} | grep -q start/running",
path => "/bin:/sbin:/usr/bin:/usr/sbin"
}
}
--
To view, visit https://gerrit.wikimedia.org/r/92840
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Icdc52139a629c261b957bca636ee36ffe4b28aa4
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits