Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/207374
Change subject: labs_lvm: Mount swap partition so it sticks ...................................................................... labs_lvm: Mount swap partition so it sticks Otherwise you end up not mounting it at boot by default Change-Id: Ic1beae6c45e720a9139787837fadc01e3452542e --- M modules/labs_lvm/manifests/swap.pp 1 file changed, 13 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/74/207374/1 diff --git a/modules/labs_lvm/manifests/swap.pp b/modules/labs_lvm/manifests/swap.pp index fcd7ef9..801b783 100644 --- a/modules/labs_lvm/manifests/swap.pp +++ b/modules/labs_lvm/manifests/swap.pp @@ -11,9 +11,7 @@ include labs_lvm - # Both these are symlinks to /dev/dm*, but swapon returns mapper and lvdisplay volume $volume_path = "/dev/vd/${name}" - $mapper_path = "/dev/mapper/vd-${name}" exec { "create-swap-${name}": require => [ @@ -24,9 +22,19 @@ unless => "/sbin/lvdisplay -c | grep ${volume_path}", } - exec { "swapon-$name": - unless => "/sbin/swapon -s | grep ${mapper_path}", - command => "/sbin/swapon ${mapper_path}", + mount { "mount-swap-${name}": + ensure => present, + name => '-', + atboot => true, + device => $volume_path, + options => 'defaults', + fstype => 'swap', require => Exec["create-swap-${name}"], + notify => Exec["swapon-${name}"] + } + + exec { "swapon-$}name}": + refreshonly => true, + command => "/sbin/swapon ${volume_path}", } } -- To view, visit https://gerrit.wikimedia.org/r/207374 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic1beae6c45e720a9139787837fadc01e3452542e Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Yuvipanda <yuvipa...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits