Vanou Ishii d2967b41a3 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
2019-07-08 04:51:23 -04:00
..
2019-06-05 14:21:13 -07:00