Yuvipanda has submitted this change and it was merged.

Change subject: uwsgi: Don't attempt to stop service on non-jessie systems
......................................................................


uwsgi: Don't attempt to stop service on non-jessie systems

Weird systemd / update-rc.d interactions. Causes puppet
failure on Ubuntu systems

Change-Id: I1b7bbfb0891b0a0bc91983434263d429a78356b9
---
M modules/uwsgi/manifests/init.pp
1 file changed, 14 insertions(+), 5 deletions(-)

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



diff --git a/modules/uwsgi/manifests/init.pp b/modules/uwsgi/manifests/init.pp
index 8b3b45e..5739d45 100644
--- a/modules/uwsgi/manifests/init.pp
+++ b/modules/uwsgi/manifests/init.pp
@@ -17,14 +17,23 @@
     package { [ 'uwsgi', 'uwsgi-dbg' ]: }
     package { $plugins: }
 
-    # Stop the default uwsgi service since it is incompatible with
-    # our multi instance setup
-    service { 'uwsgi':
-        ensure  => stopped,
-        enable  => false,
+    exec { 'remove_uwsgi_initd':
+        command => '/usr/sbin/update-rc.d -f uwsgi remove',
+        onlyif  => '/usr/sbin/update-rc.d -n -f uwsgi remove | /bin/grep -Pq 
rc..d',
         require => Package['uwsgi'],
     }
 
+    if os_version('debian >= jessie') {
+        # Stop the default uwsgi service since it is incompatible with
+        # our multi instance setup. The update-rc.d isn't good enough on
+        # systemd instances
+        service { 'uwsgi':
+            ensure  => stopped,
+            enable  => false,
+            require => Package['uwsgi'],
+        }
+    }
+
     file { [ '/etc/uwsgi/apps-available', '/etc/uwsgi/apps-enabled' ]:
         ensure  => directory,
         recurse => true,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1b7bbfb0891b0a0bc91983434263d429a78356b9
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda <yuvipa...@wikimedia.org>
Gerrit-Reviewer: Yuvipanda <yuvipa...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to