ArielGlenn has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/379198 )
Change subject: Move datasets nginx logs rsync to dumps web manifest where it
belongs
......................................................................
Move datasets nginx logs rsync to dumps web manifest where it belongs
Only the dumps web server will ever have these logs, keep this rsync
job separate from the generic "gran this dataset" or "rsync these dumps"
jobs
Bug: T175528
Change-Id: I08b8c024c1d901670795757351bcead8b78c8ccf
---
D modules/dataset/manifests/cron/rsync/nginxlogs.pp
A modules/dumps/manifests/web/rsync/nginxlogs.pp
M modules/dumps/manifests/web/xmldumps.pp
M modules/role/manifests/dataset/primary.pp
4 files changed, 21 insertions(+), 30 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/98/379198/1
diff --git a/modules/dataset/manifests/cron/rsync/nginxlogs.pp
b/modules/dataset/manifests/cron/rsync/nginxlogs.pp
deleted file mode 100644
index c9624fc..0000000
--- a/modules/dataset/manifests/cron/rsync/nginxlogs.pp
+++ /dev/null
@@ -1,25 +0,0 @@
-class dataset::cron::rsync::nginxlogs (
- $enable = true,
- $dest = undef,
- $user = 'root',
-)
-{
- include ::dataset::common
-
- $ensure = $enable ? {
- true => 'present',
- default => 'absent',
- }
-
- $rsync_args = '-rt --perms --chmod=go+r --bwlimit=50000'
- cron { 'rsync_nginxlogs':
- ensure => $ensure,
- user => $user,
- minute => 55,
- hour => 4,
- command => "/usr/bin/rsync ${rsync_args} /var/log/nginx/*.gz
${dest}",
- environment => '[email protected]',
- require => User[$user],
- }
-}
-
diff --git a/modules/dumps/manifests/web/rsync/nginxlogs.pp
b/modules/dumps/manifests/web/rsync/nginxlogs.pp
new file mode 100644
index 0000000..dc761bd
--- /dev/null
+++ b/modules/dumps/manifests/web/rsync/nginxlogs.pp
@@ -0,0 +1,17 @@
+class dumps::web::rsync::nginxlogs (
+ $dest = undef,
+)
+{
+ include ::dataset::common
+
+ $rsync_args = '-rt --perms --chmod=go+r --bwlimit=50000'
+ cron { 'rsync_nginxlogs':
+ ensure => 'present',
+ user => 'root',
+ minute => 55,
+ hour => 4,
+ command => "/usr/bin/rsync ${rsync_args} /var/log/nginx/*.gz
${dest}",
+ environment => '[email protected]',
+ }
+}
+
diff --git a/modules/dumps/manifests/web/xmldumps.pp
b/modules/dumps/manifests/web/xmldumps.pp
index 7cdf844..e32a940 100644
--- a/modules/dumps/manifests/web/xmldumps.pp
+++ b/modules/dumps/manifests/web/xmldumps.pp
@@ -29,4 +29,8 @@
group => 'root',
mode => '0444',
}
+
+ class {'::dumps::web::rsync::nginxlogs':
+ dest =>
'stat1005.eqiad.wmnet::srv/log/webrequest/archive/dumps.wikimedia.org/',
+ }
}
diff --git a/modules/role/manifests/dataset/primary.pp
b/modules/role/manifests/dataset/primary.pp
index 7e7a4f1..180603f 100644
--- a/modules/role/manifests/dataset/primary.pp
+++ b/modules/role/manifests/dataset/primary.pp
@@ -38,11 +38,6 @@
minute => '41',
}
- class { '::dataset::cron::rsync::nginxlogs':
- enable => true,
- dest =>
'stat1005.eqiad.wmnet::srv/log/webrequest/archive/dumps.wikimedia.org/',
- }
-
class { '::dataset::cron::wikitech_dumps':
enable => true,
url => 'https://wikitech.wikimedia.org/dumps/',
--
To view, visit https://gerrit.wikimedia.org/r/379198
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I08b8c024c1d901670795757351bcead8b78c8ccf
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