Increase memory restriction to 9023M

On OVH and Bluebox, the memory layout is such that there is still
significant (~900M) memory above the 8192M address.  Increase the
limit to encompass that, which will bring these providers up to
approximately 8G, while increasing hpcloud (which is the actual
target of this restriction) to about 8.5G.

Change-Id: I5c121be55cadad13ad5807968f33b492f9b1e215
This commit is contained in:
James E. Blair 2015-12-15 10:32:06 -08:00
parent 548045b894
commit 381d507b04
2 changed files with 4 additions and 4 deletions
nodepool
elements/nodepool-base/finalise.d
scripts

View File

@ -29,7 +29,7 @@ set -e
# cpu resources can be used without the risk of becoming dependent on more
# memory.
if [ -f /etc/default/grub ] ; then
sed -i -e 's/^GRUB_TIMEOUT=[0-9]\+/GRUB_TIMEOUT=0/' -e 's/#\?GRUB_CMDLINE_LINUX="/GRUB_CMDLINE_LINUX="mem=8G /g' /etc/default/grub
sed -i -e 's/^GRUB_TIMEOUT=[0-9]\+/GRUB_TIMEOUT=0/' -e 's/#\?GRUB_CMDLINE_LINUX="/GRUB_CMDLINE_LINUX="mem=9023M /g' /etc/default/grub
if which update-grub &> /dev/null ; then
update-grub
else
@ -37,5 +37,5 @@ if [ -f /etc/default/grub ] ; then
/usr/sbin/grub2-mkconfig -o /boot/grub2/grub.cfg
fi
elif [ -f /boot/grub/grub.conf ] ; then
sed -i -e 's/^timeout=[0-9]\+/timeout=0/' -e 's/\(^\s\+kernel.*\)/\1 mem=8G/' /boot/grub/grub.conf
sed -i -e 's/^timeout=[0-9]\+/timeout=0/' -e 's/\(^\s\+kernel.*\)/\1 mem=9023M/' /boot/grub/grub.conf
fi

View File

@ -19,7 +19,7 @@
# cpu resources can be used without the risk of becoming dependent on more
# memory.
if [ -f /etc/default/grub ] ; then
sudo sed -i -e 's/^GRUB_TIMEOUT=[0-9]\+/GRUB_TIMEOUT=0/' -e 's/#\?GRUB_CMDLINE_LINUX="/GRUB_CMDLINE_LINUX="mem=8G /g' /etc/default/grub
sudo sed -i -e 's/^GRUB_TIMEOUT=[0-9]\+/GRUB_TIMEOUT=0/' -e 's/#\?GRUB_CMDLINE_LINUX="/GRUB_CMDLINE_LINUX="mem=9023M /g' /etc/default/grub
if which update-grub &> /dev/null ; then
sudo update-grub
else
@ -27,5 +27,5 @@ if [ -f /etc/default/grub ] ; then
sudo /usr/sbin/grub2-mkconfig -o /boot/grub2/grub.cfg
fi
elif [ -f /boot/grub/grub.conf ] ; then
sudo sed -i -e 's/^timeout=[0-9]\+/timeout=0/' -e 's/\(^\s\+kernel.*\)/\1 mem=8G/' /boot/grub/grub.conf
sudo sed -i -e 's/^timeout=[0-9]\+/timeout=0/' -e 's/\(^\s\+kernel.*\)/\1 mem=9023M/' /boot/grub/grub.conf
fi