Set rootfstype=ramfs for low memory Ironic nodes

When running with low memory (<1024), we need to switch from the default
rootfstype from tmpfs to ramfs to ensure nodes can decompress deployment
ramdisks.

Change-Id: I1b9dd614e592d99b2f59dea899b1ed3859ae0811
This commit is contained in:
Adam Gandelman 2015-03-04 14:53:05 -08:00
parent cfbf8a1659
commit 8c32e0df7b

View File

@ -343,13 +343,24 @@ function configure_ironic_conductor {
iniset $IRONIC_CONF_FILE pxe tftp_server $IRONIC_TFTPSERVER_IP iniset $IRONIC_CONF_FILE pxe tftp_server $IRONIC_TFTPSERVER_IP
iniset $IRONIC_CONF_FILE pxe tftp_root $IRONIC_TFTPBOOT_DIR iniset $IRONIC_CONF_FILE pxe tftp_root $IRONIC_TFTPBOOT_DIR
iniset $IRONIC_CONF_FILE pxe tftp_master_path $IRONIC_TFTPBOOT_DIR/master_images iniset $IRONIC_CONF_FILE pxe tftp_master_path $IRONIC_TFTPBOOT_DIR/master_images
local pxe_params=""
if [[ "$IRONIC_VM_LOG_CONSOLE" == "True" ]] ; then if [[ "$IRONIC_VM_LOG_CONSOLE" == "True" ]] ; then
local pxe_params="nofb nomodeset vga=normal console=ttyS0" pxe_params+="nofb nomodeset vga=normal console=ttyS0"
if is_deployed_with_ipa_ramdisk; then if is_deployed_with_ipa_ramdisk; then
pxe_params+=" systemd.journald.forward_to_console=yes" pxe_params+=" systemd.journald.forward_to_console=yes"
fi fi
fi
# When booting with less than 1GB, we need to switch from default tmpfs
# to ramfs for ramdisks to decompress successfully.
if (is_ironic_hardware && [[ "$IRONIC_HW_NODE_RAM" -lt 1024 ]]) ||
(! is_ironic_hardware && [[ "$IRONIC_VM_SPECS_RAM" -lt 1024 ]]); then
pxe_params+=" rootfstype=ramfs"
fi
if [[ -n "$pxe_params" ]]; then
iniset $IRONIC_CONF_FILE pxe pxe_append_params "$pxe_params" iniset $IRONIC_CONF_FILE pxe pxe_append_params "$pxe_params"
fi fi
if is_deployed_by_agent; then if is_deployed_by_agent; then
if [[ "$SWIFT_ENABLE_TEMPURLS" == "True" ]] ; then if [[ "$SWIFT_ENABLE_TEMPURLS" == "True" ]] ; then
iniset $IRONIC_CONF_FILE glance swift_temp_url_key $SWIFT_TEMPURL_KEY iniset $IRONIC_CONF_FILE glance swift_temp_url_key $SWIFT_TEMPURL_KEY