Giuseppe Lavagetto has uploaded a new change for review. https://gerrit.wikimedia.org/r/204504
Change subject: cache: mock change to show use of hiera ...................................................................... cache: mock change to show use of hiera Change-Id: Ia3ef682739bcb1107e1cf7f5cb408492a6f9d25c --- A hieradata/common/role/cache/base.yaml M hieradata/labs.yaml M modules/role/manifests/cache/1layer.pp M modules/role/manifests/cache/2layer.pp M modules/role/manifests/cache/base.pp 5 files changed, 9 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/04/204504/1 diff --git a/hieradata/common/role/cache/base.yaml b/hieradata/common/role/cache/base.yaml new file mode 100644 index 0000000..4babf46 --- /dev/null +++ b/hieradata/common/role/cache/base.yaml @@ -0,0 +1 @@ +storage_partitions: ['sda3', 'sdb3'] diff --git a/hieradata/labs.yaml b/hieradata/labs.yaml index a0157d3..41b101b 100644 --- a/hieradata/labs.yaml +++ b/hieradata/labs.yaml @@ -24,3 +24,4 @@ cache::parsoid::nodes: eqiad: - '127.0.0.1' +role::cache::base::storage_partitions: ['vdb'] diff --git a/modules/role/manifests/cache/1layer.pp b/modules/role/manifests/cache/1layer.pp index ee7c26c..66ca01e 100644 --- a/modules/role/manifests/cache/1layer.pp +++ b/modules/role/manifests/cache/1layer.pp @@ -1,7 +1,8 @@ # Ancestor class for common resources of 1-layer clusters -class role::cache::1layer inherits role::cache::base { +class role::cache::1layer { # Any changes here will affect all descendent Varnish clusters # unless they're overridden! + include role::cache::base if $::role::cache::configuration::has_ganglia { include varnish::monitoring::ganglia diff --git a/modules/role/manifests/cache/2layer.pp b/modules/role/manifests/cache/2layer.pp index 7ea9b89..69f7989 100644 --- a/modules/role/manifests/cache/2layer.pp +++ b/modules/role/manifests/cache/2layer.pp @@ -1,8 +1,8 @@ # Ancestor class for common resources of 2-layer clusters -class role::cache::2layer inherits role::cache::base { +class role::cache::2layer { # Any changes here will affect all descendent Varnish clusters # unless they're overridden! - + include role::cache::base # This is now only used for director retries math, not for setting the # actual backend weights. The math itself has been left alone, as # this will be close enough to approximate previous behavior before diff --git a/modules/role/manifests/cache/base.pp b/modules/role/manifests/cache/base.pp index 70d52a9..03b7388 100644 --- a/modules/role/manifests/cache/base.pp +++ b/modules/role/manifests/cache/base.pp @@ -1,5 +1,7 @@ # Ancestor class for all Varnish clusters -class role::cache::base { +class role::cache::base( + $storage_partitions = [] + ) { include lvs::configuration include role::cache::configuration include network::constants @@ -14,11 +16,6 @@ $default_backend = $::mw_primary } $wikimedia_networks = flatten([$network::constants::all_networks, '127.0.0.0/8', '::1/128']) - - $storage_partitions = $::realm ? { - 'production' => ['sda3', 'sdb3'], - 'labs' => ['vdb'], - } # This seems to prevent long term memory fragmentation issues that # can cause VM perf issues. This seems to be less necessary on jessie -- To view, visit https://gerrit.wikimedia.org/r/204504 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia3ef682739bcb1107e1cf7f5cb408492a6f9d25c Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Giuseppe Lavagetto <glavage...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits