Build the new cirros image even when netboot is the default
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
(cherry picked from commit 7ac4804126
)
This commit is contained in:
parent
d21144fd2d
commit
ae7f3760e2
|
@ -2822,9 +2822,7 @@ function build_ipa_dib_ramdisk {
|
||||||
}
|
}
|
||||||
|
|
||||||
function upload_image_if_needed {
|
function upload_image_if_needed {
|
||||||
if [[ "$IRONIC_PARTITIONED_IMAGE_NAME" =~ cirros ]] \
|
if [[ "$IRONIC_PARTITIONED_IMAGE_NAME" =~ cirros ]] && is_service_enabled glance; then
|
||||||
&& [[ "$IRONIC_DEFAULT_BOOT_OPTION" == local ]] \
|
|
||||||
&& is_service_enabled glance; then
|
|
||||||
echo Building a Cirros image suitable for local boot
|
echo Building a Cirros image suitable for local boot
|
||||||
|
|
||||||
local dest
|
local dest
|
||||||
|
@ -2853,8 +2851,12 @@ function upload_image_if_needed {
|
||||||
--property kernel_id=$kernel_id --property ramdisk_id=$ramdisk_id \
|
--property kernel_id=$kernel_id --property ramdisk_id=$ramdisk_id \
|
||||||
--file "$dest"
|
--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
|
IRONIC_IMAGE_NAME=$IRONIC_PARTITIONED_IMAGE_NAME
|
||||||
|
DEFAULT_IMAGE_NAME=$IRONIC_IMAGE_NAME
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue