summaryrefslogtreecommitdiff
path: root/devstack
diff options
context:
space:
mode:
authorVanou Ishii <ishii.vanou@fujitsu.com>2019-07-22 00:59:21 -0400
committerVanou Ishii <ishii.vanou@fujitsu.com>2019-08-16 04:24:09 -0400
commit2d2a2e49a80d820012a817ef3d6a79e071745ef8 (patch)
tree264442ff232d83931029a2688a9ef5977c1ed084 /devstack
parent028ab71d3f8b180bb523446d3c4fb8bb4c3f4a3f (diff)
downloadironic-2d2a2e49a80d820012a817ef3d6a79e071745ef8.tar.gz
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 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: I5f2076bc1a450908bdf8360fd85add395b08e179 Story: 2006174 Task: 35945
Diffstat (limited to 'devstack')
-rw-r--r--devstack/lib/ironic17
1 files changed, 10 insertions, 7 deletions
diff --git a/devstack/lib/ironic b/devstack/lib/ironic
index b8b4dfc11..d9a16f370 100644
--- a/devstack/lib/ironic
+++ b/devstack/lib/ironic
@@ -1146,8 +1146,6 @@ function configure_ironic_dirs {
if [[ "$IRONIC_BOOT_MODE" == "uefi" ]]; then
local uefi_boot_file
- local uefi_loader
- local uefi_nvram
uefi_boot_file=$(get_uefi_ipxe_boot_file)
if [ ! -f $uefi_boot_file ]; then
@@ -1156,11 +1154,16 @@ function configure_ironic_dirs {
cp $uefi_boot_file $IRONIC_TFTPBOOT_DIR
- # Copy the OVMF images to libvirt's path
- uefi_loader=$(get_uefi_loader)
- uefi_nvram=$(get_uefi_nvram)
- sudo cp $uefi_loader $UEFI_LOADER_PATH
- sudo cp $uefi_nvram $UEFI_NVRAM_PATH
+ if [[ "$IRONIC_IS_HARDWARE" == "False" ]]; then
+ local uefi_loader
+ local uefi_nvram
+
+ # Copy the OVMF images to libvirt's path
+ uefi_loader=$(get_uefi_loader)
+ uefi_nvram=$(get_uefi_nvram)
+ sudo cp $uefi_loader $UEFI_LOADER_PATH
+ sudo cp $uefi_nvram $UEFI_NVRAM_PATH
+ fi
fi
# Create the logs directory when saving the deploy logs to the filesystem