From d2967b41a363c3a55d4b878bca41e107675e9641 Mon Sep 17 00:00:00 2001 From: Vanou Ishii Date: Sun, 7 Jul 2019 21:15:32 -0400 Subject: [PATCH] Add logic to determine Ironic node is HW or not into install_ironic Trying to deploy OpenStack environment consisting of ironic nova hypervisor & hardware Ironic node (not VM Ironic node) with devstack got failed. When trying this, followings are set in devstack local.conf file; "VIRT_DRIVER=ironic", "IRONIC_BOOT_MODE=uefi' and "IRONIC_IS_HARDWARE=true". Failure is due to three bugs in script in "devstack" & "Ironic": (1) function configure_nova_hypervisor in devstack/lib/nova_plugins/hypervisor-ironic, (2) function install_ironic in ironic/devstack/lib/ironic and (3) function configure_ironic_dirs in ironic/devstack/lib/ironic. Because "VIRT_DRIVER=ironic" & "IRONIC_IS_HARDWARE=true" is set, devstack doesn't install libvirt related packages. So, attempt to copy files/directories to filesystem paths to be created when installing libvirt related packages gets failed. When "IRONIC_BOOT_MODE=uefi" is set, bug (2) & (3) occurs. Because function install_ironic & configure_ironic_dirs tries to configure libvirt related settings (e.g. modify /etc/libvirt/qemu.conf) and there is no filesystem path related to libvirt, error occurs. This commit fixes bug (2) by adding "if" clause to determine Ironic node is hardware or not and to skip libvirt related operations when Ironic node is hardware. Launchpad URL of 1st bug: https://bugs.launchpad.net/devstack/+bug/1834985 Change-Id: I73459d3c8c31329f17b609a3704a43738576d33c Story: 2006174 Task: 35697 --- devstack/lib/ironic | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devstack/lib/ironic b/devstack/lib/ironic index 0b9f5808ac..000ad808f7 100644 --- a/devstack/lib/ironic +++ b/devstack/lib/ironic @@ -975,7 +975,7 @@ function install_ironic { install_apache_wsgi fi - if [[ "$IRONIC_BOOT_MODE" == "uefi" ]]; then + if [[ "$IRONIC_BOOT_MODE" == "uefi" && "$IRONIC_IS_HARDWARE" == "False" ]]; then # Append the nvram configuration to libvirt if it's not present already if ! sudo grep -q "^nvram" /etc/libvirt/qemu.conf; then