[MediaWiki-commits] [Gerrit] Labs: Subscribe self-hosted puppetmaster to hiera.yaml changes - change (operations/puppet)

2015-07-31 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: Labs: Subscribe self-hosted puppetmaster to hiera.yaml changes
..


Labs: Subscribe self-hosted puppetmaster to hiera.yaml changes

Currently, the local puppetmaster service for self-hosted puppet
masters is neither subscribed to changes to nor requires
/etc/puppet/hiera.yaml.  This can cause the puppetmaster service to be
started before the Hiera configuration is available, triggering
failures of Hiera look-ups.

This change subscribes the puppetmaster service for self-hosted puppet
masters to the Hiera configuration, thus postponing its start until
the Hiera configuration is written and restarting it when the
meta-configuration changes.  This will not cause (unnecessary)
restarts of the puppetmaster service when the data files themselves
beneath hieradata/ are changed.

Bug: T107205
Change-Id: I6786399d6713106a7eae693559cdf0116618e19d
---
M modules/puppet/manifests/self/master.pp
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/modules/puppet/manifests/self/master.pp 
b/modules/puppet/manifests/self/master.pp
index fc63434..b25cc4e 100644
--- a/modules/puppet/manifests/self/master.pp
+++ b/modules/puppet/manifests/self/master.pp
@@ -102,7 +102,9 @@
 service { 'puppetmaster':
 ensure= 'running',
 require   = Package['puppetmaster'],
-subscribe = Class['puppet::self::config'],
+subscribe = [Class['puppet::self::config'],
+  File['/etc/puppet/hieradata'],
+  File['/etc/puppet/hiera.yaml']],
 }
 
 include puppetmaster::scripts

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6786399d6713106a7eae693559cdf0116618e19d
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de
Gerrit-Reviewer: Tim Landscheidt t...@tim-landscheidt.de
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


[MediaWiki-commits] [Gerrit] Labs: Subscribe self-hosted puppetmaster to hiera.yaml changes - change (operations/puppet)

2015-07-28 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

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

Change subject: Labs: Subscribe self-hosted puppetmaster to hiera.yaml changes
..

Labs: Subscribe self-hosted puppetmaster to hiera.yaml changes

Currently, the local puppetmaster service for self-hosted puppet
masters is neither subscribed to changes to nor requires
/etc/puppet/hiera.yaml.  This can cause the puppetmaster service to be
started before the Hiera configuration is available, triggering
failures of Hiera look-ups.

This change subscribes the puppetmaster service for self-hosted puppet
masters to the Hiera configuration, thus postponing its start until
the Hiera configuration is written and restarting it when the
meta-configuration changes.  This will not cause (unnecessary)
restarts of the puppetmaster service when the data files themselves
beneath hieradata/ are changed.

Bug: T107205
Change-Id: I6786399d6713106a7eae693559cdf0116618e19d
---
M modules/puppet/manifests/self/master.pp
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/22/227622/1

diff --git a/modules/puppet/manifests/self/master.pp 
b/modules/puppet/manifests/self/master.pp
index c987131..82cd63f 100644
--- a/modules/puppet/manifests/self/master.pp
+++ b/modules/puppet/manifests/self/master.pp
@@ -103,7 +103,9 @@
 service { 'puppetmaster':
 ensure= 'running',
 require   = Package['puppetmaster'],
-subscribe = Class['puppet::self::config'],
+subscribe = [Class['puppet::self::config'],
+  File['/etc/puppet/hieradata'],
+  File['/etc/puppet/hiera.yaml']],
 }
 
 include puppetmaster::scripts

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6786399d6713106a7eae693559cdf0116618e19d
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de

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