summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2022-03-14 11:24:08 +0000
committerGerrit Code Review <review@openstack.org>2022-03-14 11:24:08 +0000
commit3b13211607d1ed954f4a9ae7bf34b388f81085f2 (patch)
treef7bb58f267b24ac037a2ae46d3a8cbd563a5ca85
parentec2d04b7514eb60c607af352647447d6d569fa2a (diff)
parentae7f3760e278148cc1133e9ae45899adba90d292 (diff)
downloadironic-3b13211607d1ed954f4a9ae7bf34b388f81085f2.tar.gz
Merge "Build the new cirros image even when netboot is the default" into stable/wallaby
-rw-r--r--devstack/lib/ironic10
1 files changed, 6 insertions, 4 deletions
diff --git a/devstack/lib/ironic b/devstack/lib/ironic
index 9ff0e513a..b58196369 100644
--- a/devstack/lib/ironic
+++ b/devstack/lib/ironic
@@ -2822,9 +2822,7 @@ function build_ipa_dib_ramdisk {
}
function upload_image_if_needed {
- if [[ "$IRONIC_PARTITIONED_IMAGE_NAME" =~ cirros ]] \
- && [[ "$IRONIC_DEFAULT_BOOT_OPTION" == local ]] \
- && is_service_enabled glance; then
+ if [[ "$IRONIC_PARTITIONED_IMAGE_NAME" =~ cirros ]] && is_service_enabled glance; then
echo Building a Cirros image suitable for local boot
local dest
@@ -2853,8 +2851,12 @@ function upload_image_if_needed {
--property kernel_id=$kernel_id --property ramdisk_id=$ramdisk_id \
--file "$dest"
- if [[ "$IRONIC_TEMPEST_WHOLE_DISK_IMAGE" != True ]]; then
+ # Change the default image only if the provided settings prevent the
+ # default cirros image from working.
+ if [[ "$IRONIC_TEMPEST_WHOLE_DISK_IMAGE" != True \
+ && "$IRONIC_DEFAULT_BOOT_OPTION" == local ]]; then
IRONIC_IMAGE_NAME=$IRONIC_PARTITIONED_IMAGE_NAME
+ DEFAULT_IMAGE_NAME=$IRONIC_IMAGE_NAME
fi
fi
}