20after4 has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/284852

Change subject: Fix race in puppet::self (puppet.conf compilation)
......................................................................

Fix race in puppet::self (puppet.conf compilation)

Sometimes puppet::self compiles the puppet.conf before removing the
10-main.conf in puppet.conf.d, causing the puppet.con to contain
both the main.conf and self.conf templates.

It should have only one or the other and this change should ensure
that the operations happen in the correct order (hopefully!)

Bug: T132689
Change-Id: I4c08e6e74764a51f31d57c97d383c4dbb03f021a
---
M modules/puppet/manifests/self/config.pp
1 file changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/52/284852/1

diff --git a/modules/puppet/manifests/self/config.pp 
b/modules/puppet/manifests/self/config.pp
index 40158e3..1900a60 100644
--- a/modules/puppet/manifests/self/config.pp
+++ b/modules/puppet/manifests/self/config.pp
@@ -76,9 +76,12 @@
         }
     }
 
-    File <| title == '/etc/puppet/puppet.conf.d/10-main.conf' |> {
+    # ensure '10-main.conf is removed when 10-self.conf is present'
+    Base::Puppet::Config <| title == 'main' |> {
         ensure => absent,
     }
+    Base::Puppet::Config['main'] ~> Exec['compile puppet.conf']
+    Base::Puppet::Config['main'] ~> Base::Puppet::Config['self']
 
     base::puppet::config { 'self':
         prio    => 10,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4c08e6e74764a51f31d57c97d383c4dbb03f021a
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: 20after4 <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to