Ottomata has submitted this change and it was merged.
Change subject: Support eqiad labs secondary disk
......................................................................
Support eqiad labs secondary disk
Use the labs_lvm::volume class to mount varnish cache disk for labs
instances. Mount it as XFS to solve bug 46359
Bug: 46359
Change-Id: I52403cd1e32770d3c41c930dd6c836b0637e7a08
---
M modules/labs_lvm/manifests/volume.pp
M modules/varnish/manifests/setup_filesystem.pp
2 files changed, 24 insertions(+), 13 deletions(-)
Approvals:
Ottomata: Verified; Looks good to me, approved
diff --git a/modules/labs_lvm/manifests/volume.pp
b/modules/labs_lvm/manifests/volume.pp
index ad9ffd6..9388a65 100644
--- a/modules/labs_lvm/manifests/volume.pp
+++ b/modules/labs_lvm/manifests/volume.pp
@@ -17,6 +17,7 @@
# fstype => filesystem type. Defaults to ext4.
# mkfs_opt => options for the mkfs if the filesystem needs to
# be created.
+# options => mount options
#
# Requires:
# The node must have included the labs_lvm class.
@@ -30,7 +31,8 @@
$mountat = "/mnt/$volname",
$size = '100%FREE',
$fstype = 'ext4',
- $mkfs_opt = ''
+ $mkfs_opt = '',
+ $options = 'defaults',
) {
file { '/usr/local/sbin/make-instance-vol':
@@ -61,7 +63,7 @@
ensure => mounted,
atboot => true,
device => "/dev/vd/$volname",
- options => "defaults",
+ options => $options,
fstype => $fstype,
require => [
Exec["create-vd-$volname"],
diff --git a/modules/varnish/manifests/setup_filesystem.pp
b/modules/varnish/manifests/setup_filesystem.pp
index 576dea5..779179d 100644
--- a/modules/varnish/manifests/setup_filesystem.pp
+++ b/modules/varnish/manifests/setup_filesystem.pp
@@ -1,20 +1,29 @@
define varnish::setup_filesystem() {
- file { "/srv/${title}":
- ensure => directory,
- owner => 'root',
- group => 'root',
- }
-
$mount_options = $::realm ? {
'production' => 'noatime,nodiratime,nobarrier,logbufs=8',
'labs' => 'noatime,nodiratime,nobarrier,comment=cloudconfig',
}
- mount { "/srv/${title}":
- ensure => mounted,
- require => File["/srv/${title}"],
- device => "/dev/${title}",
- fstype => 'auto',
+ if $::realm == 'labs' and $::site == 'eqiad' {
+ include labs_lvm
+ labs_lvm::volume { $title:
+ mountat => "/srv/${title}",
options => $mount_options,
+ fstype => 'xfs',
+ }
+ } else {
+ file { "/srv/${title}":
+ ensure => directory,
+ owner => 'root',
+ group => 'root',
+ }
+
+ mount { "/srv/${title}":
+ ensure => mounted,
+ require => File["/srv/${title}"],
+ device => "/dev/${title}",
+ fstype => 'auto',
+ options => $mount_options,
+ }
}
}
--
To view, visit https://gerrit.wikimedia.org/r/119534
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I52403cd1e32770d3c41c930dd6c836b0637e7a08
Gerrit-PatchSet: 6
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BryanDavis <[email protected]>
Gerrit-Reviewer: Andrew Bogott <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: Ottomata <[email protected]>
Gerrit-Reviewer: coren <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits