ArielGlenn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/381527 )

Change subject: move most dataset1001 and ms1001 references from dumps modules 
to profile
......................................................................

move most dataset1001 and ms1001 references from dumps modules to profile

There is still a python script to convert; it should take these as
arguments.

Bug: T175528
Change-Id: Id7b1996971f8567249c44e5817d33d94b6c1402f
---
M modules/dumps/manifests/rsync/peers.pp
R modules/dumps/templates/rsync/rsyncd.conf.datasets_to_peers.erb
M modules/profile/manifests/dumps/rsyncer.pp
M modules/profile/manifests/dumps/rsyncer_peer.pp
4 files changed, 14 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/27/381527/1

diff --git a/modules/dumps/manifests/rsync/peers.pp 
b/modules/dumps/manifests/rsync/peers.pp
index cce5f26..ee87f41 100644
--- a/modules/dumps/manifests/rsync/peers.pp
+++ b/modules/dumps/manifests/rsync/peers.pp
@@ -1,11 +1,13 @@
-class dumps::rsync::peers {
+class dumps::rsync::peers(
+    $hosts_allow = undef,
+) {
     include ::dumps::rsync::common
     file { '/etc/rsyncd.d/10-rsync-datasets_to_peers.conf':
-        ensure => 'present',
-        mode   => '0444',
-        owner  => 'root',
-        group  => 'root',
-        source => 
'puppet:///modules/dumps/rsync/rsyncd.conf.datasets_to_peers',
-        notify => Exec['update-rsyncd.conf'],
+        ensure  => 'present',
+        mode    => '0444',
+        owner   => 'root',
+        group   => 'root',
+        content => template('dumps/rsync/rsyncd.conf.datasets_to_peers.erb'),
+        notify  => Exec['update-rsyncd.conf'],
     }
 }
diff --git a/modules/dumps/files/rsync/rsyncd.conf.datasets_to_peers 
b/modules/dumps/templates/rsync/rsyncd.conf.datasets_to_peers.erb
similarity index 91%
rename from modules/dumps/files/rsync/rsyncd.conf.datasets_to_peers
rename to modules/dumps/templates/rsync/rsyncd.conf.datasets_to_peers.erb
index 731b1ea..7d74c17 100644
--- a/modules/dumps/files/rsync/rsyncd.conf.datasets_to_peers
+++ b/modules/dumps/templates/rsync/rsyncd.conf.datasets_to_peers.erb
@@ -9,7 +9,7 @@
 gid = root
 read only = false
 path = /data
-hosts allow = dataset1001.wikimedia.org, ms1001.wikimedia.org
+hosts allow = <%= @hosts_allow %>
 
 # slow-parse logs contain long render times for Wiki articles per server.
 # They are rsynced from MW log host to this directory.
diff --git a/modules/profile/manifests/dumps/rsyncer.pp 
b/modules/profile/manifests/dumps/rsyncer.pp
index a8d8e84..8ecd3cc 100644
--- a/modules/profile/manifests/dumps/rsyncer.pp
+++ b/modules/profile/manifests/dumps/rsyncer.pp
@@ -2,11 +2,12 @@
     $rsync_clients = hiera('dumps_web_rsync_server_clients'),
 ) {
     $stats_hosts = 'stat1005.eqiad.wmnet stat1006.eqiad.wmnet'
+    $peer_hosts = 'dataset1001.wikimedia.org ms1001.wikimedia.org'
     class {'::dumps::rsync::default':}
     class {'::dumps::rsync::media': hosts_allow => $stats_hosts}
     class {'::dumps::rsync::memfix':}
     class {'::dumps::rsync::pagecounts_ez': hosts_allow => $stats_hosts}
-    class {'::dumps::rsync::peers':}
+    class {'::dumps::rsync::peers': hosts_allow => $peer_hosts}
     class {'::dumps::rsync::phab_dump':}
     $hosts_allow = join(concat($rsync_clients['ipv4']['external'], 
$rsync_clients['ipv6']['external']), ' ')
     class {'::dumps::rsync::public': hosts_allow => $hosts_allow,}
diff --git a/modules/profile/manifests/dumps/rsyncer_peer.pp 
b/modules/profile/manifests/dumps/rsyncer_peer.pp
index e978ded..47aee06 100644
--- a/modules/profile/manifests/dumps/rsyncer_peer.pp
+++ b/modules/profile/manifests/dumps/rsyncer_peer.pp
@@ -1,5 +1,6 @@
 class profile::dumps::rsyncer_peer {
+    $peer_hosts = 'dataset1001.wikimedia.org ms1001.wikimedia.org'
     class {'::dumps::rsync::default':}
     class {'::dumps::rsync::memfix':}
-    class {'::dumps::rsync::peers':}
+    class {'::dumps::rsync::peers': hosts_allow => $peer_hosts}
 }

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

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

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

Reply via email to