Assert EFI part UUID is not None before editing fstab
The EFI partition UUID may be None and this will break
the fstab editing. While this is not necessarily fatal when
instantiating a node, it creates an exception at the end of
bootloader installation, so only attempt to add a line to
fstab when the UUID is not None.
Change-Id: I68799980e67c05afe4ca68ca9733605dd166d54d
(cherry picked from commit 333ed70c94
)
This commit is contained in:
parent
a0c55b917b
commit
5898a9301d
|
@ -760,7 +760,7 @@ def _install_grub2(device, root_uuid, efi_system_part_uuid=None,
|
|||
# recommended path.
|
||||
_configure_grub(device, path)
|
||||
|
||||
if efi_mounted:
|
||||
if efi_system_part_uuid and efi_mounted:
|
||||
_append_uefi_to_fstab(path, efi_system_part_uuid)
|
||||
|
||||
LOG.info("GRUB2 successfully installed on %s", device)
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
fixes:
|
||||
- |
|
||||
Fixes an issue when the EFI partition UUID is not set and an attempt
|
||||
to edit /etc/fstab is made.
|
||||
|
Loading…
Reference in New Issue