From c7a42bdbff0eb29d25340cc9763a3c644096deab Mon Sep 17 00:00:00 2001 From: Ilya Etingof Date: Tue, 19 Nov 2019 13:17:39 +0100 Subject: [PATCH] Ensure text-only console in devstack Apparently, now days system boot chain is tempted to display fancy things on the console. While enjoyable, in non-text mode libvirt guest console can't make it to the log file. This change tries to ensure pure text mode kernel console in PXE and Redfish booting by disabling any graphics in the VM and in guest kernel. Note that it's not only kernel that can control display mode, but EFI boot loader as well. For getting on VM's text console in devstack one could use `virsh console --devname serial1 node-0` or just add `` section to `virsh edit node-0` XML. Change-Id: I14f78bcef4173eeaf659ee589ca938e2698e3505 --- devstack/lib/ironic | 14 ++++++++++++-- devstack/tools/ironic/templates/vm.xml | 5 ----- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/devstack/lib/ironic b/devstack/lib/ironic index 32cecf6ddb..855b332b89 100644 --- a/devstack/lib/ironic +++ b/devstack/lib/ironic @@ -156,7 +156,7 @@ IRONIC_VM_MACS_CSV_FILE=${IRONIC_VM_MACS_CSV_FILE:-$IRONIC_DATA_DIR/ironic_macs. IRONIC_CLEAN_NET_NAME=${IRONIC_CLEAN_NET_NAME:-${IRONIC_PROVISION_NETWORK_NAME:-${PRIVATE_NETWORK_NAME}}} IRONIC_RESCUE_NET_NAME=${IRONIC_RESCUE_NET_NAME:-${IRONIC_CLEAN_NET_NAME}} IRONIC_EXTRA_PXE_PARAMS=${IRONIC_EXTRA_PXE_PARAMS:-} -IRONIC_TTY_DEV=${IRONIC_TTY_DEV:-ttyS0} +IRONIC_TTY_DEV=${IRONIC_TTY_DEV:-ttyS0,115200} IRONIC_TEMPEST_BUILD_TIMEOUT=${IRONIC_TEMPEST_BUILD_TIMEOUT:-${BUILD_TIMEOUT:-}} if [[ -n "$BUILD_TIMEOUT" ]]; then @@ -1508,7 +1508,7 @@ function configure_ironic_conductor { -subj '/O=OpenStack/OU=DevStack Servers' fi - local pxe_params="nofb nomodeset vga=normal console=${IRONIC_TTY_DEV}" + local pxe_params="nofb nomodeset console=${IRONIC_TTY_DEV}" pxe_params+=" systemd.journald.forward_to_console=yes" if is_service_enabled tls-proxy; then pxe_params+=" ipa-insecure=1" @@ -1520,6 +1520,16 @@ function configure_ironic_conductor { iniset $IRONIC_CONF_FILE pxe pxe_append_params "$pxe_params" fi + local kernel_append_params="nofb nomodeset console=${IRONIC_TTY_DEV}" + kernel_append_params+=" systemd.journald.forward_to_console=yes" + if is_service_enabled tls-proxy; then + kernel_append_params+=" ipa-insecure=1" + fi + + if [[ -n "kernel_append_params" ]]; then + iniset $IRONIC_CONF_FILE redfish kernel_append_params "$kernel_append_params" + fi + # Set these options for scenarios in which the agent fetches the image # directly from glance, and don't set them where the image is pushed # over iSCSI. diff --git a/devstack/tools/ironic/templates/vm.xml b/devstack/tools/ironic/templates/vm.xml index ef2b3876ed..1df1d2c0c7 100644 --- a/devstack/tools/ironic/templates/vm.xml +++ b/devstack/tools/ironic/templates/vm.xml @@ -62,11 +62,6 @@ {% endfor %} - -