Giuseppe Lavagetto has uploaded a new change for review. https://gerrit.wikimedia.org/r/204461
Change subject: cache: change the label of the hiera lookup ...................................................................... cache: change the label of the hiera lookup This worked in production "by chance" of being in the common/ hierarchy, but not in labs. Change-Id: I7de9e91e1a06e6c3f9427c366dd7d15229ac40a8 --- M manifests/role/analytics/kafkatee.pp M modules/role/manifests/cache/mobile.pp M modules/role/manifests/cache/parsoid.pp M modules/role/manifests/cache/text.pp M modules/role/manifests/cache/upload.pp M modules/torrus/templates/cdn-aggregates.xml.erb M modules/torrus/templates/varnish.xml.erb M templates/udp2log/filters.oxygen.erb 8 files changed, 56 insertions(+), 58 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/61/204461/1 diff --git a/manifests/role/analytics/kafkatee.pp b/manifests/role/analytics/kafkatee.pp index e267ab2..cd317b0 100644 --- a/manifests/role/analytics/kafkatee.pp +++ b/manifests/role/analytics/kafkatee.pp @@ -78,7 +78,7 @@ # Include this to infer mobile varnish frontend hostnames on which to filter. include role::cache::configuration - $mobile_nodes = hiera('::cache::mobile::nodes') + $mobile_nodes = hiera('cache::mobile::nodes') $mobile_nodes_regex = inline_template('(<%= @mobile_nodes.values.flatten.sort.join(\'|\') %>)') # 1/100 sampling of traffic from mobile varnishes @@ -231,5 +231,3 @@ offset => 'stored', } } - - diff --git a/modules/role/manifests/cache/mobile.pp b/modules/role/manifests/cache/mobile.pp index 2c4e8fc..6452aed 100644 --- a/modules/role/manifests/cache/mobile.pp +++ b/modules/role/manifests/cache/mobile.pp @@ -1,6 +1,6 @@ class role::cache::mobile inherits role::cache::2layer { - $mobile_nodes = hiera('::cache::mobile::nodes') + $mobile_nodes = hiera('cache::mobile::nodes') $site_mobile_nodes = $mobile_nodes[$::site] if $::realm == 'production' { diff --git a/modules/role/manifests/cache/parsoid.pp b/modules/role/manifests/cache/parsoid.pp index 6c52794..39cf3cc 100644 --- a/modules/role/manifests/cache/parsoid.pp +++ b/modules/role/manifests/cache/parsoid.pp @@ -1,6 +1,6 @@ class role::cache::parsoid inherits role::cache::2layer { - $parsoid_nodes = hiera('::cache::parsoid::nodes') + $parsoid_nodes = hiera('cache::parsoid::nodes') $site_parsoid_nodes = $parsoid_nodes[$::site] if ( $::realm == 'production' ) { diff --git a/modules/role/manifests/cache/text.pp b/modules/role/manifests/cache/text.pp index dbe22dc..ec9026a 100644 --- a/modules/role/manifests/cache/text.pp +++ b/modules/role/manifests/cache/text.pp @@ -1,6 +1,6 @@ class role::cache::text inherits role::cache::2layer { - $text_nodes = hiera('::cache::text::nodes') + $text_nodes = hiera('cache::text::nodes') $site_text_nodes = $text_nodes[$::site] if $::realm == 'production' { diff --git a/modules/role/manifests/cache/upload.pp b/modules/role/manifests/cache/upload.pp index 9611a7b..b3f4bdd 100644 --- a/modules/role/manifests/cache/upload.pp +++ b/modules/role/manifests/cache/upload.pp @@ -1,6 +1,6 @@ class role::cache::upload inherits role::cache::2layer { - $upload_nodes = hiera('::cache::upload::nodes') + $upload_nodes = hiera('cache::upload::nodes') $site_upload_nodes = $upload_nodes[$::site] if $::realm == 'production' { diff --git a/modules/torrus/templates/cdn-aggregates.xml.erb b/modules/torrus/templates/cdn-aggregates.xml.erb index 4662ab7..228ed0f 100644 --- a/modules/torrus/templates/cdn-aggregates.xml.erb +++ b/modules/torrus/templates/cdn-aggregates.xml.erb @@ -2,7 +2,7 @@ <% def node_list(role, site) - role_nodes = scope.function_hiera(["::cache::#{role}::nodes"]) + role_nodes = scope.function_hiera(["cache::#{role}::nodes"]) return role_nodes[site] end @@ -22,9 +22,9 @@ <creator-info> Puppet class torrus::xml_generation::cdn </creator-info> - + <datasources> - + <param name="expr-Varnish_text_eqiad"> <%= varnish_rpn('text', 'eqiad', dual=true) %> </param> @@ -60,23 +60,23 @@ <template name="varnish-cluster"> <param name="ds-type" value="rrd-file"/> <param name="precedence" value="1000"/> - + <leaf name="Client_requests"> <param name="varnishmetric" value="Clients/client_req"/> - + <param name="leaf-type" value="rrd-cdef"/> <param name="rpn-expr" value="%expr-Varnish%,0,1000000,LIMIT"/> - + <param name="line-style" value="AREA"/> <param name="line-color" value="##%cluster%-%site%"/> </leaf> - + <leaf name="Backend_requests"> <param name="varnishmetric" value="Backends/backend_req"/> - + <param name="leaf-type" value="rrd-cdef"/> <param name="rpn-expr" value="%expr-Varnish%"/> - + <param name="line-style" value="LINE2"/> <param name="line-color" value="##%cluster%-%site%"/> </leaf> @@ -85,7 +85,7 @@ <template name="varnish-dual-layer-cluster"> <param name="ds-type" value="rrd-file"/> <param name="precedence" value="1000"/> - + <leaf name="Client_requests"> <param name="varnishmetric" value="Clients/client_req"/> <param name="layer" value="frontend"/> @@ -96,14 +96,14 @@ <param name="line-style" value="AREA"/> <param name="line-color" value="##%cluster%-%site%"/> </leaf> - + <leaf name="Backend_requests"> <param name="varnishmetric" value="Backends/backend_req"/> <param name="layer" value="backend"/> - + <param name="leaf-type" value="rrd-cdef"/> <param name="rpn-expr" value="%expr-Varnish%"/> - + <param name="line-style" value="LINE2"/> <param name="line-color" value="##%cluster%-%site%"/> </leaf> @@ -112,16 +112,16 @@ <subtree name="Varnish"> <param name="sumfunc" value="ADDNAN"/> <param name="sumsep" value=""/> - + <subtree name="eqiad"> <param name="site" value="eqiad"/> - + <subtree name="bits"> <param name="cluster" value="bits"/> - + <subtree name="Totals"> <param name="expr-Varnish" value="%expr-Varnish_bits_eqiad%"/> - + <apply-template name="varnish-cluster"/> </subtree> </subtree> @@ -131,50 +131,50 @@ <subtree name="Totals"> <param name="expr-Varnish" value="%expr-Varnish_upload_eqiad%"/> - + <apply-template name="varnish-dual-layer-cluster"/> </subtree> </subtree> <subtree name="mobile"> <param name="cluster" value="mobile"/> - + <subtree name="Totals"> <param name="expr-Varnish" value="%expr-Varnish_mobile_eqiad%"/> - + <apply-template name="varnish-dual-layer-cluster"/> </subtree> </subtree> </subtree> - + <subtree name="esams"> <param name="site" value="esams"/> - + <subtree name="bits"> <param name="cluster" value="bits"/> - + <subtree name="Totals"> <param name="expr-Varnish" value="%expr-Varnish_bits_esams%"/> - + <apply-template name="varnish-cluster"/> </subtree> </subtree> </subtree> - + <subtree name="Totals"> <param name="ds-type" value="rrd-file"/> - + <subtree name="bits"> <leaf name="Client_requests"> <param name="varnishmetric" value="Clients/client_req"/> - + <param name="ds-type" value="rrd-multigraph"/> <param name="ds-names" value="eqiad,esams"/> <param name="comment" value="Total client requests"/> <param name="vertical-label" value="requests/s"/> <param name="graph-lower-limit" value="0"/> - + <param name="ds-expr-eqiad" value="%expr-Varnish_bits_eqiad%,0,1000000,LIMIT"/> <param name="graph-legend-eqiad" value="eqiad"/> <param name="line-style-eqiad" value="AREA"/> @@ -192,23 +192,23 @@ </subtree> </subtree> </subtree> - + <subtree name="Totals"> <param name="sumfunc" value="ADDNAN"/> <param name="sumsep" value=""/> <param name="ds-type" value="rrd-file"/> - + <param name="precedence" value="1000"/> <param name="default-subtree-view" value="overview-dir-html"/> <param name="rrdgraph-views"> last24h-small,lasth24h,lastweek,lastmonth,lastyear </param> - + <leaf name="All_client_requests"> <param name="varnishmetric" value="Usage/HTTP_requests"/> <param name="layer" value="frontend"/> <param name="varnishmetric" value="Clients/client_req"/> - + <param name="ds-type" value="rrd-multigraph"/> <param name="ds-names" value="text-eqiad,bits-eqiad,upload-eqiad,mobile-eqiad,text-esams,bits-esams,upload-esams,total"/> <param name="comment" value="Total of all client requests"/> @@ -278,13 +278,13 @@ <param name="varnishmetric" value="Usage/Server_side_HTTP_requests"/> <param name="layer" value="backend"/> <param name="varnishmetric" value="Backends/backend_req"/> - + <param name="ds-type" value="rrd-multigraph"/> <param name="ds-names" value="text-eqiad,bits-eqiad,upload-eqiad,mobile-eqiad"/> <param name="comment" value="All backend requests"/> <param name="vertical-label" value="requests/s"/> <param name="graph-lower-limit" value="0"/> - + <param name="ds-expr-text-eqiad" value="%expr-Varnish_text_eqiad%"/> <param name="graph-legend-text-eqiad" value="text.eqiad"/> <param name="line-style-text-eqiad" value="LINE2"/> @@ -309,11 +309,11 @@ <param name="line-color-mobile-eqiad" value="##mobile-eqiad"/> <param name="line-order-mobile-eqiad" value="8"/> - <param name="precedence" value="999"/> + <param name="precedence" value="999"/> </leaf> </subtree> </datasources> - + <views> <view name="overview-dir-html"> <param name="view-type" value="html" /> @@ -323,13 +323,13 @@ <param name="width" value="600" /> <param name="height" value="300" /> </view> - + <view name="default-rrgraph"> <param name="rrd-params" value="--slope-mode"/> - + <param name="width" value="600" /> <param name="height" value="300" /> - + <!-- Daily graph, inherits parameters from the above --> <view name="last24h"> <param name="start" value="-40h" /> diff --git a/modules/torrus/templates/varnish.xml.erb b/modules/torrus/templates/varnish.xml.erb index 5609e61..de9acea 100644 --- a/modules/torrus/templates/varnish.xml.erb +++ b/modules/torrus/templates/varnish.xml.erb @@ -2,7 +2,7 @@ <% def node_lists(role, site) - role_nodes = scope.function_hiera(["::cache::#{role}::nodes"]) + role_nodes = scope.function_hiera(["cache::#{role}::nodes"]) return role_nodes[site] end @@ -16,7 +16,7 @@ result << "\t<apply-template name=\"wikimedia-#{template}\"/>" result << "</subtree>" end - + return result end @@ -85,7 +85,7 @@ <%= line %> <% end -%> </subtree> - + <subtree name="bits"> <param name="system-id" value="%hostname%"/> <param name="varnishcluster" value="Bits caches eqiad"/> @@ -95,17 +95,17 @@ <%= line %> <% end -%> </subtree> - + <subtree name="upload"> <param name="system-id" value="%hostname%"/> <param name="varnishcluster" value="Upload caches eqiad"/> <param name="site" value="eqiad"/> - + <% varnish_nodes('upload', 'eqiad', 'dual-layer-varnish-server').each do |line| -%> <%= line %> <% end -%> </subtree> - + <subtree name="mobile"> <param name="system-id" value="%hostname%"/> <param name="varnishcluster" value="Mobile caches eqiad"/> @@ -136,7 +136,7 @@ <% end -%> </subtree> </subtree> - + <subtree name="esams"> <subtree name="text"> <param name="system-id" value="%hostname%"/> @@ -147,7 +147,7 @@ <%= line %> <% end -%> </subtree> - + <subtree name="bits"> <param name="system-id" value="%hostname%"/> <param name="varnishcluster" value="Bits caches esams"/> @@ -157,17 +157,17 @@ <%= line %> <% end -%> </subtree> - + <subtree name="upload"> <param name="system-id" value="%hostname%"/> <param name="varnishcluster" value="Upload caches esams"/> <param name="site" value="esams"/> - + <% varnish_nodes('upload', 'esams', 'dual-layer-varnish-server').each do |line| -%> <%= line %> <% end -%> </subtree> - + <subtree name="mobile"> <param name="system-id" value="%hostname%"/> <param name="varnishcluster" value="Mobile caches esams"/> diff --git a/templates/udp2log/filters.oxygen.erb b/templates/udp2log/filters.oxygen.erb index f5c34f6..86ff960 100644 --- a/templates/udp2log/filters.oxygen.erb +++ b/templates/udp2log/filters.oxygen.erb @@ -19,7 +19,7 @@ <% # find mobile host names and build a regex on which to grep. -mobile_nodes = scope.function_hiera(['::cache::mobile::nodes']) +mobile_nodes = scope.function_hiera(['cache::mobile::nodes']) mobile_nodes_regex = '(' + mobile_nodes.values.flatten.sort.join('|') + ')' -%> -- To view, visit https://gerrit.wikimedia.org/r/204461 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7de9e91e1a06e6c3f9427c366dd7d15229ac40a8 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