ArielGlenn has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/400233 )
Change subject: manage directories locally on dumps workers if there is no nfs
server
......................................................................
manage directories locally on dumps workers if there is no nfs server
Change-Id: I7949196fdaacb71633206019119ff734a5626cfb
---
M hieradata/common.yaml
M modules/profile/manifests/dumps/generation/worker/common.pp
M modules/snapshot/manifests/dumps/nfsmount.pp
3 files changed, 21 insertions(+), 3 deletions(-)
Approvals:
ArielGlenn: Looks good to me, approved
jenkins-bot: Verified
diff --git a/hieradata/common.yaml b/hieradata/common.yaml
index 821bdc2..2cfc1b1 100644
--- a/hieradata/common.yaml
+++ b/hieradata/common.yaml
@@ -351,6 +351,7 @@
- odysseus.ip6.fi.muni.cz
- poincare.acc.umu.se
dumps_nfs_server: dumpsdata1001.eqiad.wmnet
+dumps_managed_subdirs: []
# Schemas names that match this regex
# will not be produced to the eventlogging-valid-mixed
diff --git a/modules/profile/manifests/dumps/generation/worker/common.pp
b/modules/profile/manifests/dumps/generation/worker/common.pp
index 11855e1..940a017 100644
--- a/modules/profile/manifests/dumps/generation/worker/common.pp
+++ b/modules/profile/manifests/dumps/generation/worker/common.pp
@@ -1,5 +1,6 @@
class profile::dumps::generation::worker::common(
- $nfs_server = hiera('dumps_nfs_server')
+ $nfs_server = hiera('dumps_nfs_server'),
+ $managed_subdirs = hiera('dumps_managed_subdirs'),
) {
# mw packages and dependencies
require ::profile::mediawiki::scap_proxy
@@ -11,8 +12,11 @@
class { '::dumpsuser': }
snapshot::dumps::nfsmount { 'dumpsdatamount':
- mountpoint => $xmldumpsmount,
- server => $nfs_server,
+ mountpoint => $xmldumpsmount,
+ server => $nfs_server,
+ managed_subdirs => $managed_subdirs,
+ user => 'dumpsgen',
+ group => 'dumpsgen',
}
# dataset server config files,
# stages files, dblists, html templates
diff --git a/modules/snapshot/manifests/dumps/nfsmount.pp
b/modules/snapshot/manifests/dumps/nfsmount.pp
index bbb1765..31f2027 100644
--- a/modules/snapshot/manifests/dumps/nfsmount.pp
+++ b/modules/snapshot/manifests/dumps/nfsmount.pp
@@ -1,6 +1,9 @@
define snapshot::dumps::nfsmount(
$mountpoint = undef,
$server = undef,
+ $managed_subdirs = [],
+ $user = undef,
+ $group = undef,
) {
require_package('nfs-common')
@@ -19,4 +22,14 @@
remounts => false,
}
}
+ else {
+ # manage some directories that the nfs server
+ # server would otherwise take care of for us
+ file { $managed_subdirs:
+ ensure => 'directory',
+ mode => '0755',
+ owner => $user,
+ group => $group,
+ }
+ }
}
--
To view, visit https://gerrit.wikimedia.org/r/400233
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I7949196fdaacb71633206019119ff734a5626cfb
Gerrit-PatchSet: 5
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: ArielGlenn <[email protected]>
Gerrit-Reviewer: ArielGlenn <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits