summaryrefslogtreecommitdiff
path: root/ironic/drivers/modules/agent_client.py
diff options
context:
space:
mode:
authorArne Wiebalck <Arne.Wiebalck@cern.ch>2020-04-17 18:28:19 +0200
committerJulia Kreger <juliaashleykreger@gmail.com>2020-04-27 09:03:28 -0700
commitb417d0ffa0fd46611ce9d4bdfe797259f9c26c3c (patch)
treef76222e493118478d0b5131259678bb6c7864d0b /ironic/drivers/modules/agent_client.py
parentbfeef067aac7572bb914396db4553da5c013403f (diff)
downloadironic-b417d0ffa0fd46611ce9d4bdfe797259f9c26c3c.tar.gz
Don't break UEFI install with older IPAs
For Software RAID, we need to pass the boot mode to the IPA via a new parameter. In case the IPA does not understand this new parameter yet, we catch the error and fail for UEFI. This patch proposes to only fail in the case of software RAID, since the older IPA can handle the general case of UEFIi, e.g. with a whole disk image. Change-Id: Id6b51dd19e83d20dc8d6d312cbec12d09bfd76c1
Diffstat (limited to 'ironic/drivers/modules/agent_client.py')
-rw-r--r--ironic/drivers/modules/agent_client.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/ironic/drivers/modules/agent_client.py b/ironic/drivers/modules/agent_client.py
index feb4ebc88..eba9e6de8 100644
--- a/ironic/drivers/modules/agent_client.py
+++ b/ironic/drivers/modules/agent_client.py
@@ -276,7 +276,8 @@ class AgentClient(object):
@METRICS.timer('AgentClient.install_bootloader')
def install_bootloader(self, node, root_uuid, target_boot_mode,
efi_system_part_uuid=None,
- prep_boot_part_uuid=None):
+ prep_boot_part_uuid=None,
+ software_raid=False):
"""Install a boot loader on the image.
:param node: A node object.
@@ -315,12 +316,12 @@ class AgentClient(object):
wait=True,
command_timeout_factor=2)
except exception.AgentAPIError:
- # NOTE(arne_wiebalck): If we require to pass 'uefi' as the boot
- # mode, but find that the IPA does not yet support the additional
+ # NOTE(arne_wiebalck): If for software RAID and 'uefi' as the boot
+ # mode, we find that the IPA does not yet support the additional
# 'target_boot_mode' parameter, we need to fail. For 'bios' boot
# mode on the other hand we can retry without the parameter,
# since 'bios' is the default value the IPA will use.
- if target_boot_mode == 'uefi':
+ if target_boot_mode == 'uefi' and software_raid:
LOG.error('Unable to pass UEFI boot mode to an out of date '
'agent ramdisk. Please contact the administrator '
'to update the ramdisk to contain an '