Merge "Set rootfstype=ramfs for low memory Ironic nodes"

This commit is contained in:
Jenkins 2015-03-09 12:04:49 +00:00 committed by Gerrit Code Review
commit 924079b890

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