Log a warning of target_boot_mode does not match current boot mode
This is not a normal situation and is likely to cause problems.
Change-Id: Id0668fd160ac0539d85997e985f8c43d9da75c90
(cherry picked from commit 1a67dddde7
)
This commit is contained in:
parent
a27bb12be6
commit
38e6c36407
|
@ -712,7 +712,15 @@ class ImageExtension(base.BaseAgentExtension):
|
||||||
device = hardware.dispatch_to_managers('get_os_install_device')
|
device = hardware.dispatch_to_managers('get_os_install_device')
|
||||||
if self.agent.iscsi_started:
|
if self.agent.iscsi_started:
|
||||||
iscsi.clean_up(device)
|
iscsi.clean_up(device)
|
||||||
|
|
||||||
boot = hardware.dispatch_to_managers('get_boot_info')
|
boot = hardware.dispatch_to_managers('get_boot_info')
|
||||||
|
if boot.current_boot_mode != target_boot_mode:
|
||||||
|
LOG.warning('Boot mode mismatch: target boot mode is %(target)s, '
|
||||||
|
'current boot mode is %(current)s. Installing boot '
|
||||||
|
'loader may fail or work incorrectly.',
|
||||||
|
{'target': target_boot_mode,
|
||||||
|
'current': boot.current_boot_mode})
|
||||||
|
|
||||||
# FIXME(arne_wiebalck): make software RAID work with efibootmgr
|
# FIXME(arne_wiebalck): make software RAID work with efibootmgr
|
||||||
if (boot.current_boot_mode == 'uefi'
|
if (boot.current_boot_mode == 'uefi'
|
||||||
and not hardware.is_md_device(device)):
|
and not hardware.is_md_device(device)):
|
||||||
|
|
Loading…
Reference in New Issue