diff --git a/ironic/drivers/modules/drac/raid.py b/ironic/drivers/modules/drac/raid.py index 42d86d3845..751f9d950d 100644 --- a/ironic/drivers/modules/drac/raid.py +++ b/ironic/drivers/modules/drac/raid.py @@ -885,7 +885,8 @@ class DracRAID(base.RAIDInterface): controller['raid_controller'] = logical_disk['controller'] controller['is_reboot_required'] = controller_cap[ 'is_reboot_required'] - controllers.append(controller) + if controller not in controllers: + controllers.append(controller) return _commit_to_controllers(node, controllers) diff --git a/ironic/tests/unit/drivers/modules/drac/test_raid.py b/ironic/tests/unit/drivers/modules/drac/test_raid.py index eb0cab3640..387e3c0c74 100644 --- a/ironic/tests/unit/drivers/modules/drac/test_raid.py +++ b/ironic/tests/unit/drivers/modules/drac/test_raid.py @@ -968,7 +968,7 @@ class DracRaidInterfaceTestCase(test_utils.BaseDracTest): reboot=False, realtime=True) self.node.refresh() - self.assertEqual(['42', '12', '13'], + self.assertEqual(['42'], self.node.driver_internal_info['raid_config_job_ids']) @mock.patch.object(drac_common, 'get_drac_client', spec_set=True, @@ -1027,7 +1027,7 @@ class DracRaidInterfaceTestCase(test_utils.BaseDracTest): reboot=False, realtime=True) self.node.refresh() - self.assertEqual(['42', '12'], + self.assertEqual(['42'], self.node.driver_internal_info['raid_config_job_ids']) @mock.patch.object(drac_common, 'get_drac_client', spec_set=True, @@ -1097,7 +1097,7 @@ class DracRaidInterfaceTestCase(test_utils.BaseDracTest): realtime=True) self.node.refresh() - self.assertEqual(['42', '12', '13'], + self.assertEqual(['42'], self.node.driver_internal_info['raid_config_job_ids']) @mock.patch.object(drac_common, 'get_drac_client', spec_set=True, @@ -1184,7 +1184,7 @@ class DracRaidInterfaceTestCase(test_utils.BaseDracTest): realtime=True) self.node.refresh() - self.assertEqual(['42', '12'], + self.assertEqual(['42'], self.node.driver_internal_info['raid_config_job_ids']) @mock.patch.object(drac_common, 'get_drac_client', spec_set=True, @@ -1285,7 +1285,7 @@ class DracRaidInterfaceTestCase(test_utils.BaseDracTest): realtime=True) self.node.refresh() - self.assertEqual(['42', '42'], + self.assertEqual(['42'], self.node.driver_internal_info['raid_config_job_ids']) @mock.patch.object(drac_common, 'get_drac_client', spec_set=True, diff --git a/releasenotes/notes/fix_raid0_creation_for_multiple_disks-f47957754fca0312.yaml b/releasenotes/notes/fix_raid0_creation_for_multiple_disks-f47957754fca0312.yaml new file mode 100644 index 0000000000..cdb7dd1daf --- /dev/null +++ b/releasenotes/notes/fix_raid0_creation_for_multiple_disks-f47957754fca0312.yaml @@ -0,0 +1,7 @@ +--- +fixes: + - | + Fixed a bug when executing ``create_configuration`` cleaning step for disks + of PERC H740P controller, first disks get created and then controller + doesn't allow to create next couple disks because controller is getting + busy.