Muehlenhoff has submitted this change and it was merged.

Change subject: deployment_server: Daemonise redis when running on systemd
......................................................................


deployment_server: Daemonise redis when running on systemd

Otherwise the redis startup fails since the systemd unit uses
Type=forking.

Bug: T144578
Change-Id: I7d2b015d6c1aab9af65d999e0c884378266a3845
---
M modules/deployment/manifests/redis.pp
1 file changed, 8 insertions(+), 2 deletions(-)

Approvals:
  Giuseppe Lavagetto: Looks good to me, but someone else must approve
  Muehlenhoff: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/deployment/manifests/redis.pp 
b/modules/deployment/manifests/redis.pp
index 3b3d4a0..b8d3139 100644
--- a/modules/deployment/manifests/redis.pp
+++ b/modules/deployment/manifests/redis.pp
@@ -3,12 +3,18 @@
 
 class deployment::redis($deployment_server) {
 
+    if $::initsystem == 'upstart' {
+        $daemonize_redis = false
+    } else {
+        $daemonize_redis = true
+    }
+
     if ($::fqdn != $deployment_server) {
         $deployment_ipv4 = ipresolve($deployment_server, 4)
         # Just a read-only slave for now
         redis::instance { 6379:
             settings => {
-                daemonize       => false,
+                daemonize       => $daemonize_redis,
                 slave_read_only => true,
                 slaveof         => "${deployment_ipv4} 6379",
                 bind            => '0.0.0.0',
@@ -17,7 +23,7 @@
     } else {
         redis::instance{ 6379:
             settings => {
-                daemonize => false,
+                daemonize => $daemonize_redis,
                 bind      => '0.0.0.0',
             }
         }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7d2b015d6c1aab9af65d999e0c884378266a3845
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Muehlenhoff <mmuhlenh...@wikimedia.org>
Gerrit-Reviewer: Giuseppe Lavagetto <glavage...@wikimedia.org>
Gerrit-Reviewer: Hashar <has...@free.fr>
Gerrit-Reviewer: Muehlenhoff <mmuhlenh...@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