Filippo Giunchedi has uploaded a new change for review.

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

Change subject: graphite/txstatsd: fix require_packages vs package
......................................................................

graphite/txstatsd: fix require_packages vs package

when testing a related dependency (python-twisted-core) puppet gave a
dependency cycle:

(Package[graphite-carbon] => Class[Packages::Graphite_carbon] =>
Class[Graphite] => Package[python-twisted-core] =>
Class[Packages::Graphite_carbon] => Package[graphite-carbon])

since this has been giving us problems already, I fixed txstatsd debian package
dependencies to include graphite-carbon and python-twisted-web as it should
have been in the first place. Thus avoiding the need to duplicate
graphite-carbon dependency and require_packages

Change-Id: I28424dd4c00a97fa5af8e4ce110282badf158227
---
M modules/graphite/manifests/init.pp
M modules/txstatsd/manifests/init.pp
2 files changed, 8 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/15/188815/1

diff --git a/modules/graphite/manifests/init.pp 
b/modules/graphite/manifests/init.pp
index 0dd1d45..f60fbb1 100644
--- a/modules/graphite/manifests/init.pp
+++ b/modules/graphite/manifests/init.pp
@@ -14,7 +14,7 @@
     $storage_aggregation = {},
     $storage_dir = '/var/lib/carbon',
     ) {
-    require_package('graphite-carbon', 'python-whisper')
+    package { ['graphite-carbon', 'python-whisper']: }
 
     # force installation of python-twisted-core separatedly, there seem to be a
     # race condition with dropin.cache generation when apt-get installing
@@ -22,7 +22,7 @@
     # https://bugs.launchpad.net/graphite/+bug/833196
     package { 'python-twisted-core':
         ensure => installed,
-        before => Class['packages::graphite_carbon'],
+        before => Package['graphite-carbon'],
     }
 
     $carbon_service_defaults = {
@@ -50,24 +50,24 @@
         group   => '_graphite',
         mode    => '0755',
         before  => Service['carbon'],
-        require => Class['packages::graphite_carbon'],
+        require => Package['graphite-carbon'],
     }
 
     file { '/etc/carbon/storage-schemas.conf':
         content => configparser_format($storage_schemas),
-        require => Class['packages::graphite_carbon'],
+        require => Package['graphite-carbon'],
         notify  => Service['carbon'],
     }
 
     file { '/etc/carbon/carbon.conf':
         content => configparser_format($carbon_defaults, $carbon_settings),
-        require => Class['packages::graphite_carbon'],
+        require => Package['graphite-carbon'],
         notify  => Service['carbon'],
     }
 
     file { '/etc/carbon/storage-aggregation.conf':
         content => configparser_format($storage_aggregation),
-        require => Class['packages::graphite_carbon'],
+        require => Package['graphite-carbon'],
         notify  => Service['carbon'],
     }
 
diff --git a/modules/txstatsd/manifests/init.pp 
b/modules/txstatsd/manifests/init.pp
index df6d162..125d175 100644
--- a/modules/txstatsd/manifests/init.pp
+++ b/modules/txstatsd/manifests/init.pp
@@ -23,7 +23,7 @@
 #  }
 #
 class txstatsd($settings) {
-    require_package('python-txstatsd', 'python-twisted-web', 'graphite-carbon')
+    package { 'python-txstatsd': }
 
     file { '/etc/txstatsd':
         ensure => directory,
@@ -77,11 +77,7 @@
         subscribe => File['/etc/txstatsd/txstatsd.cfg'],
         require   => [
             File[$init_file],
-            Class[
-                  'packages::python_txstatsd',
-                  'packages::python_twisted_web',
-                  'packages::graphite_carbon'
-                  ],
+            Package['python-txstatsd'],
             User['txstatsd'],
         ],
     }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I28424dd4c00a97fa5af8e4ce110282badf158227
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Filippo Giunchedi <fgiunch...@wikimedia.org>

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

Reply via email to