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
This commit is contained in:
Vanou Ishii
2019-07-07 21:15:32 -04:00
parent 66b0739831
commit d2967b41a3

View File

@@ -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