BBlack has uploaded a new change for review.

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

Change subject: varnish: director->backends is now always an array
......................................................................

varnish: director->backends is now always an array

Change-Id: I18a411e9433081abacb32ea3c10dbf4513f5862d
---
M modules/role/manifests/cache/configuration.pp
M modules/varnish/templates/vcl/wikimedia.vcl.erb
2 files changed, 20 insertions(+), 23 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/06/230806/1

diff --git a/modules/role/manifests/cache/configuration.pp 
b/modules/role/manifests/cache/configuration.pp
index b99eb46..477ba09 100644
--- a/modules/role/manifests/cache/configuration.pp
+++ b/modules/role/manifests/cache/configuration.pp
@@ -7,42 +7,42 @@
     $backends = {
         'production' => {
             'appservers'        => {
-                'eqiad' => 'appservers.svc.eqiad.wmnet',
-                'codfw' => 'appservers.svc.codfw.wmnet',
+                'eqiad' => ['appservers.svc.eqiad.wmnet'],
+                'codfw' => ['appservers.svc.codfw.wmnet'],
             },
             'api'               => {
-                'eqiad' => 'api.svc.eqiad.wmnet',
-                'codfw' => 'api.svc.codfw.wmnet',
+                'eqiad' => ['api.svc.eqiad.wmnet'],
+                'codfw' => ['api.svc.codfw.wmnet'],
             },
             'rendering'         => {
-                'eqiad' => 'rendering.svc.eqiad.wmnet',
-                'codfw' => 'rendering.svc.codfw.wmnet',
+                'eqiad' => ['rendering.svc.eqiad.wmnet'],
+                'codfw' => ['rendering.svc.codfw.wmnet'],
             },
             'test_appservers' => {
-                'eqiad' => 'mw1017.eqiad.wmnet',
+                'eqiad' => ['mw1017.eqiad.wmnet'],
             },
             'parsoid' => {
-                'eqiad' => 'parsoid.svc.eqiad.wmnet',
+                'eqiad' => ['parsoid.svc.eqiad.wmnet'],
             },
             'cxserver' => {
-                'eqiad' => 'cxserver.svc.eqiad.wmnet',
+                'eqiad' => ['cxserver.svc.eqiad.wmnet'],
             },
             'citoid' => {
-                'eqiad' => 'citoid.svc.eqiad.wmnet',
+                'eqiad' => ['citoid.svc.eqiad.wmnet'],
             },
             'graphoid' => {
-                'eqiad' => 'graphoid.svc.eqiad.wmnet',
+                'eqiad' => ['graphoid.svc.eqiad.wmnet'],
             },
             'restbase' => {
-                'eqiad' => 'restbase.svc.eqiad.wmnet',
+                'eqiad' => ['restbase.svc.eqiad.wmnet'],
             },
             'swift' => {
-                'eqiad' => 'ms-fe.svc.eqiad.wmnet',
-                'codfw' => 'ms-fe.svc.codfw.wmnet',
+                'eqiad' => ['ms-fe.svc.eqiad.wmnet'],
+                'codfw' => ['ms-fe.svc.codfw.wmnet'],
             },
             'security_audit' => { 'eqiad' => [] }, # no audit backend for prod 
at this time
             'kartotherian' => {
-                'codfw' => 'kartotherian.svc.codfw.wmnet',
+                'codfw' => ['kartotherian.svc.codfw.wmnet'],
             }
         },
         'labs' => {
@@ -74,21 +74,21 @@
                 'eqiad' => [ '10.68.16.120' ],  # deployment-parsoid05
             },
             'cxserver' => {
-                'eqiad' => 'cxserver-beta.wmflabs.org',
+                'eqiad' => ['cxserver-beta.wmflabs.org'],
             },
             'citoid' => {
-                'eqiad' => 'citoid.wmflabs.org',
+                'eqiad' => ['citoid.wmflabs.org'],
             },
             'restbase' => {
-                'eqiad' => 'deployment-restbase01.eqiad.wmflabs',
+                'eqiad' => ['deployment-restbase01.eqiad.wmflabs'],
             },
             'graphoid' => {
-                'eqiad' => '10.68.16.145', # deployment-sca01
+                'eqiad' => ['10.68.16.145'], # deployment-sca01
             },
             'swift' => {
                 # ms emulator set in July 2013. Beta does not have Swift yet.
                 # instance is an unpuppetized hack with nginx proxy.
-                'eqiad' => '10.68.16.189',  # deployment-upload.eqiad.wmflabs
+                'eqiad' => ['10.68.16.189'],  # deployment-upload.eqiad.wmflabs
             },
         }
     }
diff --git a/modules/varnish/templates/vcl/wikimedia.vcl.erb 
b/modules/varnish/templates/vcl/wikimedia.vcl.erb
index 7f190cb..9d2343a 100644
--- a/modules/varnish/templates/vcl/wikimedia.vcl.erb
+++ b/modules/varnish/templates/vcl/wikimedia.vcl.erb
@@ -129,9 +129,6 @@
 director = @varnish_directors[director_name] 
 if (!@dynamic_directors or director['dynamic'] != 'yes')
        backends = director['backends']
-       if not backends.is_a?(Array)
-               backends = [backends]
-       end
        if (!backends.empty?)
 -%>
 director <%= director_name %> <%= director['type'] %> {

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

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

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

Reply via email to