Andrew Bogott has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/262838

Change subject: Enable memory cgroups for labs debian instances
......................................................................

Enable memory cgroups for labs debian instances

This won't take effect until reboot, but a followup patch will
apply it to the base image as well.

Bug: T122734
Change-Id: I13f1989070e24127a75addeb538c2be58633dd2a
---
M modules/base/manifests/labs.pp
1 file changed, 11 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/38/262838/1

diff --git a/modules/base/manifests/labs.pp b/modules/base/manifests/labs.pp
index f910e82..feb7835 100644
--- a/modules/base/manifests/labs.pp
+++ b/modules/base/manifests/labs.pp
@@ -21,5 +21,16 @@
             mode   => '0444',
             source => 'puppet:///modules/base/labs/nfs-common.default',
         }
+
+        # enable memory cgroups
+        augeas { 'grub2':
+            incl    => '/etc/default/grub',
+            lens    => 'Shellvars_list.lns',
+            changes => [
+                'set GRUB_CMDLINE_LINUX/value[. = "cgroup_enable=memory"] 
cgroup_enable=memory',
+                'set GRUB_CMDLINE_LINUX/value[. = "swapaccount=1"] 
swapaccount=1',
+            ],
+            notify  => Exec['update-grub'],
+        }
     }
 }

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

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

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

Reply via email to