summaryrefslogtreecommitdiff
path: root/ironic/tests
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/tests
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/tests')
-rw-r--r--ironic/tests/unit/drivers/modules/test_agent_base.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/ironic/tests/unit/drivers/modules/test_agent_base.py b/ironic/tests/unit/drivers/modules/test_agent_base.py
index 30a0cb9dd..02d271110 100644
--- a/ironic/tests/unit/drivers/modules/test_agent_base.py
+++ b/ironic/tests/unit/drivers/modules/test_agent_base.py
@@ -1101,7 +1101,7 @@ class AgentDeployMixinTest(AgentDeployMixinBaseTest):
install_bootloader_mock.assert_called_once_with(
mock.ANY, task.node, root_uuid='some-root-uuid',
efi_system_part_uuid=None, prep_boot_part_uuid=None,
- target_boot_mode='whatever'
+ target_boot_mode='whatever', software_raid=False
)
@mock.patch.object(agent_client.AgentClient, 'install_bootloader',
@@ -1126,7 +1126,7 @@ class AgentDeployMixinTest(AgentDeployMixinBaseTest):
install_bootloader_mock.assert_called_once_with(
mock.ANY, task.node, root_uuid='some-root-uuid',
efi_system_part_uuid=None, prep_boot_part_uuid='fake-prep',
- target_boot_mode='whatever'
+ target_boot_mode='whatever', software_raid=False
)
@mock.patch.object(agent_client.AgentClient, 'install_bootloader',
@@ -1152,7 +1152,7 @@ class AgentDeployMixinTest(AgentDeployMixinBaseTest):
mock.ANY, task.node, root_uuid='some-root-uuid',
efi_system_part_uuid='efi-system-part-uuid',
prep_boot_part_uuid=None,
- target_boot_mode='uefi'
+ target_boot_mode='uefi', software_raid=False
)
@mock.patch.object(deploy_utils, 'try_set_boot_device', autospec=True)
@@ -1199,7 +1199,8 @@ class AgentDeployMixinTest(AgentDeployMixinBaseTest):
install_bootloader_mock.assert_called_once_with(
mock.ANY, task.node, root_uuid=None,
efi_system_part_uuid='efi-system-part-uuid',
- prep_boot_part_uuid=None, target_boot_mode='uefi')
+ prep_boot_part_uuid=None, target_boot_mode='uefi',
+ software_raid=False)
@mock.patch.object(image_service, 'GlanceImageService', autospec=True)
@mock.patch.object(deploy_utils, 'try_set_boot_device', autospec=True)
@@ -1264,7 +1265,7 @@ class AgentDeployMixinTest(AgentDeployMixinBaseTest):
install_bootloader_mock.assert_called_once_with(
mock.ANY, task.node, root_uuid=root_uuid,
efi_system_part_uuid=None, prep_boot_part_uuid=None,
- target_boot_mode='bios')
+ target_boot_mode='bios', software_raid=True)
try_set_boot_device_mock.assert_called_once_with(
task, boot_devices.DISK, persistent=True)
@@ -1366,7 +1367,7 @@ class AgentDeployMixinTest(AgentDeployMixinBaseTest):
install_bootloader_mock.assert_called_once_with(
mock.ANY, task.node, root_uuid='some-root-uuid',
efi_system_part_uuid=None, prep_boot_part_uuid=None,
- target_boot_mode='whatever'
+ target_boot_mode='whatever', software_raid=False
)
collect_logs_mock.assert_called_once_with(mock.ANY, task.node)
self.assertEqual(states.DEPLOYFAIL, task.node.provision_state)
@@ -1399,7 +1400,7 @@ class AgentDeployMixinTest(AgentDeployMixinBaseTest):
install_bootloader_mock.assert_called_once_with(
mock.ANY, task.node, root_uuid='some-root-uuid',
efi_system_part_uuid=None, prep_boot_part_uuid=None,
- target_boot_mode='whatever')
+ target_boot_mode='whatever', software_raid=False)
try_set_boot_device_mock.assert_called_once_with(
task, boot_devices.DISK, persistent=True)
collect_logs_mock.assert_called_once_with(mock.ANY, task.node)