Giuseppe Lavagetto has submitted this change and it was merged.

Change subject: role::parsoid: switch to role::lvs::realserver
......................................................................


role::parsoid: switch to role::lvs::realserver

Change-Id: I9ad0df5c39054ce4f3c9557bf0c392a7956e9835
---
M hieradata/role/codfw/parsoid.yaml
M hieradata/role/common/parsoid.yaml
M hieradata/role/eqiad/parsoid.yaml
M manifests/role/parsoid.pp
M modules/role/manifests/lvs/realserver.pp
M modules/role/templates/lvs/realserver_ips.erb
6 files changed, 7 insertions(+), 12 deletions(-)

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



diff --git a/hieradata/role/codfw/parsoid.yaml 
b/hieradata/role/codfw/parsoid.yaml
index 2073f23..a10dfcb 100644
--- a/hieradata/role/codfw/parsoid.yaml
+++ b/hieradata/role/codfw/parsoid.yaml
@@ -1,5 +1,4 @@
 debdeploy::grains:
   debdeploy-parsoid-codfw:
     value: standard
-lvs::realserver::realserver_ips:
-  - 10.2.1.28
+
diff --git a/hieradata/role/common/parsoid.yaml 
b/hieradata/role/common/parsoid.yaml
index 7138624..63f3b9e 100644
--- a/hieradata/role/common/parsoid.yaml
+++ b/hieradata/role/common/parsoid.yaml
@@ -2,3 +2,5 @@
   - parsoid-roots
   - parsoid-admin
 cluster: parsoid
+role::lvs::realserver::pools:
+  parsoid: {}
diff --git a/hieradata/role/eqiad/parsoid.yaml 
b/hieradata/role/eqiad/parsoid.yaml
index 6f3fb72..504300a 100644
--- a/hieradata/role/eqiad/parsoid.yaml
+++ b/hieradata/role/eqiad/parsoid.yaml
@@ -1,5 +1,3 @@
 debdeploy::grains:
   debdeploy-parsoid-eqiad:
     value: standard
-lvs::realserver::realserver_ips:
-  - 10.2.2.28
diff --git a/manifests/role/parsoid.pp b/manifests/role/parsoid.pp
index 92cb226..62a7335 100644
--- a/manifests/role/parsoid.pp
+++ b/manifests/role/parsoid.pp
@@ -6,13 +6,9 @@
     }
 
     include base::firewall
-    include lvs::realserver
 
-    # LVS pooling/depoling scripts
-    include ::lvs::configuration
-    conftool::scripts::service { 'parsoid':
-        lvs_services_config => $::lvs::configuration::lvs_services,
-        lvs_class_hosts     => $::lvs::configuration::lvs_class_hosts,
+    if hiera('has_lvs', true) {
+        include role::lvs::realserver
     }
 
     include ::parsoid
diff --git a/modules/role/manifests/lvs/realserver.pp 
b/modules/role/manifests/lvs/realserver.pp
index 642371d..592cd7a 100644
--- a/modules/role/manifests/lvs/realserver.pp
+++ b/modules/role/manifests/lvs/realserver.pp
@@ -6,7 +6,7 @@
 class role::lvs::realserver {
     require ::lvs::configuration
     # Pools in the format: $service => { lvs_name => $name}
-    $lvs_pools = hiera('::role::lvs::realserver::pools', {})
+    $lvs_pools = hiera('role::lvs::realserver::pools', {})
 
     # TODO: fix this when we have the future parser
     $realserver_ips_str = template('role/lvs/realserver_ips.erb')
diff --git a/modules/role/templates/lvs/realserver_ips.erb 
b/modules/role/templates/lvs/realserver_ips.erb
index 03da882..a8fe8d8 100644
--- a/modules/role/templates/lvs/realserver_ips.erb
+++ b/modules/role/templates/lvs/realserver_ips.erb
@@ -1,5 +1,5 @@
 <%-
-lvs_ips = scope.lookupvar('::lvs::configuration::lvs_service_ips')
+lvs_ips = scope.lookupvar('::lvs::configuration::service_ips')
 site = scope.lookupvar('::site')
 ips = @lvs_pools.map do |svc, pool|
   name = pool['lvs_name'] || svc

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9ad0df5c39054ce4f3c9557bf0c392a7956e9835
Gerrit-PatchSet: 5
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto <glavage...@wikimedia.org>
Gerrit-Reviewer: Giuseppe Lavagetto <glavage...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to