Follow up to ISO image build patch
This change addresses a few nits pointed out in the Gerrit review (Change-Id: Idf912ff2146434b666fdb4250dc1ecad39bc5a04). Change-Id: I8668b02a2f46427567526189caa2040fc1e3b402 Story: 1526753 Task: 28098
This commit is contained in:
parent
738d4eafdc
commit
e95515a075
@ -261,18 +261,16 @@ def create_isolinux_image_for_uefi(output_file, kernel, ramdisk,
|
|||||||
# Open the deploy iso used to initiate deploy and copy the
|
# Open the deploy iso used to initiate deploy and copy the
|
||||||
# efiboot.img i.e. boot loader to the current temporary
|
# efiboot.img i.e. boot loader to the current temporary
|
||||||
# directory.
|
# directory.
|
||||||
if deploy_iso:
|
if deploy_iso and not esp_image:
|
||||||
uefi_path_info, e_img_rel_path, grub_rel_path = (
|
uefi_path_info, e_img_rel_path, grub_rel_path = (
|
||||||
_mount_deploy_iso(deploy_iso, mountdir))
|
_mount_deploy_iso(deploy_iso, mountdir))
|
||||||
|
|
||||||
grub_cfg = os.path.join(tmpdir, grub_rel_path)
|
grub_cfg = os.path.join(tmpdir, grub_rel_path)
|
||||||
|
|
||||||
# Use ELF boot loader provided
|
# Use ELF boot loader provided
|
||||||
elif esp_image:
|
elif esp_image and not deploy_iso:
|
||||||
e_img_rel_path = EFIBOOT_LOCATION
|
e_img_rel_path = EFIBOOT_LOCATION
|
||||||
grub_rel_path = CONF.grub_config_path.strip()
|
grub_rel_path = CONF.grub_config_path.lstrip(' ' + os.sep)
|
||||||
while grub_rel_path.startswith(os.sep):
|
|
||||||
grub_rel_path = grub_rel_path[1:]
|
|
||||||
grub_cfg = os.path.join(tmpdir, grub_rel_path)
|
grub_cfg = os.path.join(tmpdir, grub_rel_path)
|
||||||
|
|
||||||
uefi_path_info = {
|
uefi_path_info = {
|
||||||
@ -281,9 +279,10 @@ def create_isolinux_image_for_uefi(output_file, kernel, ramdisk,
|
|||||||
}
|
}
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
msg = _('Neither deploy ISO nor ESP image configured or '
|
||||||
|
'both of them configured')
|
||||||
raise exception.ImageCreationFailed(
|
raise exception.ImageCreationFailed(
|
||||||
image_type='iso',
|
image_type='iso', error=msg)
|
||||||
error='Neither `deploy_iso` nor `esp_image` configured')
|
|
||||||
|
|
||||||
files_info.update(uefi_path_info)
|
files_info.update(uefi_path_info)
|
||||||
|
|
||||||
|
@ -230,11 +230,12 @@ image_opts = [
|
|||||||
'efficiently. ESP image should contain a '
|
'efficiently. ESP image should contain a '
|
||||||
'FAT12/16/32-formatted file system holding EFI boot '
|
'FAT12/16/32-formatted file system holding EFI boot '
|
||||||
'loaders (e.g. GRUB2) for each hardware architecture '
|
'loaders (e.g. GRUB2) for each hardware architecture '
|
||||||
'ironic needs to boot. If not configured, ironic '
|
'ironic needs to boot. This option is only used when '
|
||||||
'will attempt to fetch ESP image from some remote '
|
'neither ESP nor ISO deploy image is configured to '
|
||||||
'store (if configured) or extract ESP image from '
|
'the node being deployed in which case ironic will '
|
||||||
'UEFI-bootable deploy ISO image.')),
|
'attempt to fetch ESP image from the configured '
|
||||||
|
'location or extract ESP image from UEFI-bootable '
|
||||||
|
'deploy ISO image.')),
|
||||||
]
|
]
|
||||||
|
|
||||||
img_cache_opts = [
|
img_cache_opts = [
|
||||||
|
@ -5,7 +5,7 @@ features:
|
|||||||
building UEFI-bootable ISO images, in form of a local file or UUID
|
building UEFI-bootable ISO images, in form of a local file or UUID
|
||||||
or URI reference. The new ``[conductor]esp_image`` option can be used
|
or URI reference. The new ``[conductor]esp_image`` option can be used
|
||||||
to configure ironic to use local file.
|
to configure ironic to use local file.
|
||||||
other:
|
fixes:
|
||||||
- |
|
- |
|
||||||
Makes ironic building UEFI-only bootable ISO image (when being asked to
|
Makes ironic building UEFI-only bootable ISO image (when being asked to
|
||||||
build a UEFI-bootable image) rather than building a hybrid
|
build a UEFI-bootable image) rather than building a hybrid
|
||||||
|
Loading…
Reference in New Issue
Block a user