Add logic to determine Ironic node is HW or not into configure_ironic_dirs

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 (3) 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: I28ab77c063e0ce8da36f1368ac456cd910a9166f
Story: 2006174
Task: 35698
This commit is contained in:
Vanou Ishii 2019-07-07 22:19:17 -04:00
parent 66b0739831
commit 0913c94842

View File

@ -1127,7 +1127,7 @@ function configure_ironic_dirs {
setup_syslinux_modules
fi
if [[ "$IRONIC_BOOT_MODE" == "uefi" ]]; then
if [[ "$IRONIC_BOOT_MODE" == "uefi" && "$IRONIC_IS_HARDWARE" == "False" ]]; then
local uefi_boot_file
local uefi_loader
local uefi_nvram