From 705e9cb5dc8b63c902f588d29271686501be0c6e Mon Sep 17 00:00:00 2001 From: Vanou Ishii Date: Tue, 2 Jul 2019 00:40:24 -0400 Subject: [PATCH] Fix error in configure_nova_hypervisor with hardware Ironic node Trying to deploy OpenStack environment consisting of ironic nova hypervisor & hardware Ironic node (not VM Ironic node) with devstack got failed. Devstack error says error occurred while calling configure_libvirt in configure_nova_hypervisor. This happens because libvirt related packages are not installed when specifying "VIRT_DRIVER=ironic" and "IRONIC_IS_HARDWARE=True". To fix this problem, this commit add "if" statement to check Ironic node is hardware or not using "is_ironic_hardware" function in "function-common" file. Change-Id: I1113478175fadec79d0f8bf6ae842ed86e5e686b Closes-Bug: #1834985 --- lib/nova_plugins/hypervisor-ironic | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/nova_plugins/hypervisor-ironic b/lib/nova_plugins/hypervisor-ironic index 1279256055..9bc04e2122 100644 --- a/lib/nova_plugins/hypervisor-ironic +++ b/lib/nova_plugins/hypervisor-ironic @@ -36,7 +36,9 @@ function cleanup_nova_hypervisor { # configure_nova_hypervisor - Set config files, create data dirs, etc function configure_nova_hypervisor { - configure_libvirt + if ! is_ironic_hardware; then + configure_libvirt + fi LIBVIRT_FIREWALL_DRIVER=${LIBVIRT_FIREWALL_DRIVER:-"nova.virt.firewall.NoopFirewallDriver"} iniset $NOVA_CONF DEFAULT compute_driver ironic.IronicDriver