Giuseppe Lavagetto has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/327164 )

Change subject: role::mediawiki::webserver: add hack to allow installing nginx
......................................................................


role::mediawiki::webserver: add hack to allow installing nginx

Without this, nginx cannot start when first installed, making puppet
fail.

Bug: T153042
Change-Id: I0374e27c50e50c465b18e20c7a14799b8ee7f918
---
M modules/role/manifests/mediawiki/webserver.pp
1 file changed, 15 insertions(+), 0 deletions(-)

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



diff --git a/modules/role/manifests/mediawiki/webserver.pp 
b/modules/role/manifests/mediawiki/webserver.pp
index 96cebe7..a05eebf 100644
--- a/modules/role/manifests/mediawiki/webserver.pp
+++ b/modules/role/manifests/mediawiki/webserver.pp
@@ -76,6 +76,21 @@
             $pooldata = pick($::lvs::configuration::lvs_services[$pool], {})
             $certs = [pick($pooldata['icinga']['sites'][$::site]['hostname'], 
$::fqdn)]
         }
+
+        # Given nginx will be installed on a system where apache is already
+        # running, the postinst script will fail to start it with the default
+        # configuration as port 80 is already in use. This is considered 
working
+        # as designed by Debian, see
+        #    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=754407
+        # However, we need the installation to complete correctly for puppet to
+        # work as expected, hence we pre-install a configuration that will make
+        # that possible. Note this file will be overwritten by puppet when
+        # the nginx configuration gets installed properly.
+        exec { 'Dummy nginx.conf for installation':
+            command => '/bin/mkdir -p /etc/nginx && /bin/echo -e "events { 
worker_connections 1; }\nhttp{ server{ listen 443; }}\n" > 
/etc/nginx/nginx.conf',
+            creates => '/etc/nginx/nginx.conf',
+            before  => Package['nginx-full'],
+        }
         tlsproxy::localssl { 'unified':
             server_name    => 'www.wikimedia.org',
             certs          => $certs,

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

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