diff options
author | Dmitry Tantsur <dtantsur@protonmail.com> | 2022-02-17 15:36:11 +0100 |
---|---|---|
committer | Dmitry Tantsur <dtantsur@protonmail.com> | 2022-02-17 15:36:11 +0100 |
commit | 7ac480412626c38fa3493088dbf49e29303491b6 (patch) | |
tree | 4451bba7479265948cdd18eb18564d11dca61d1e | |
parent | 8452de687efe14a335fd93784b528c8eeea4db10 (diff) | |
download | ironic-20.0.0.tar.gz |
Build the new cirros image even when netboot is the default20.0.0
The standalone job changes boot_option in runtime, so local boot
can be used even when the default boot option is netboot.
Change-Id: Ia538907f3662e8cd84d988ea5d862c7f488558e1
-rw-r--r-- | devstack/lib/ironic | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/devstack/lib/ironic b/devstack/lib/ironic index fa563ddb5..366eb03b8 100644 --- a/devstack/lib/ironic +++ b/devstack/lib/ironic @@ -2853,9 +2853,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 @@ -2884,8 +2882,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 } |