DRAC : Fix issue for RAID-0 creation for multiple disks for PERC H740P

Story: 2006375
Task: 36164

Fix a bug which was introduced when executing ``create_configuration``
cleaning step for multiple disks of PERC H740P controller, first disks
gets created and then controller doesn't allow to create next couple
of disks because controller is getting busy at one time.

Change-Id: I02ec595e639c04dd65ce788851c5dde074cc1095
This commit is contained in:
Pradip Kadam 2019-08-06 04:46:59 -04:00
parent 71b7441b78
commit 81e4da55b9
3 changed files with 14 additions and 6 deletions

View File

@ -885,7 +885,8 @@ class DracRAID(base.RAIDInterface):
controller['raid_controller'] = logical_disk['controller'] controller['raid_controller'] = logical_disk['controller']
controller['is_reboot_required'] = controller_cap[ controller['is_reboot_required'] = controller_cap[
'is_reboot_required'] 'is_reboot_required']
controllers.append(controller) if controller not in controllers:
controllers.append(controller)
return _commit_to_controllers(node, controllers) return _commit_to_controllers(node, controllers)

View File

@ -968,7 +968,7 @@ class DracRaidInterfaceTestCase(test_utils.BaseDracTest):
reboot=False, realtime=True) reboot=False, realtime=True)
self.node.refresh() self.node.refresh()
self.assertEqual(['42', '12', '13'], self.assertEqual(['42'],
self.node.driver_internal_info['raid_config_job_ids']) self.node.driver_internal_info['raid_config_job_ids'])
@mock.patch.object(drac_common, 'get_drac_client', spec_set=True, @mock.patch.object(drac_common, 'get_drac_client', spec_set=True,
@ -1027,7 +1027,7 @@ class DracRaidInterfaceTestCase(test_utils.BaseDracTest):
reboot=False, realtime=True) reboot=False, realtime=True)
self.node.refresh() self.node.refresh()
self.assertEqual(['42', '12'], self.assertEqual(['42'],
self.node.driver_internal_info['raid_config_job_ids']) self.node.driver_internal_info['raid_config_job_ids'])
@mock.patch.object(drac_common, 'get_drac_client', spec_set=True, @mock.patch.object(drac_common, 'get_drac_client', spec_set=True,
@ -1097,7 +1097,7 @@ class DracRaidInterfaceTestCase(test_utils.BaseDracTest):
realtime=True) realtime=True)
self.node.refresh() self.node.refresh()
self.assertEqual(['42', '12', '13'], self.assertEqual(['42'],
self.node.driver_internal_info['raid_config_job_ids']) self.node.driver_internal_info['raid_config_job_ids'])
@mock.patch.object(drac_common, 'get_drac_client', spec_set=True, @mock.patch.object(drac_common, 'get_drac_client', spec_set=True,
@ -1184,7 +1184,7 @@ class DracRaidInterfaceTestCase(test_utils.BaseDracTest):
realtime=True) realtime=True)
self.node.refresh() self.node.refresh()
self.assertEqual(['42', '12'], self.assertEqual(['42'],
self.node.driver_internal_info['raid_config_job_ids']) self.node.driver_internal_info['raid_config_job_ids'])
@mock.patch.object(drac_common, 'get_drac_client', spec_set=True, @mock.patch.object(drac_common, 'get_drac_client', spec_set=True,
@ -1285,7 +1285,7 @@ class DracRaidInterfaceTestCase(test_utils.BaseDracTest):
realtime=True) realtime=True)
self.node.refresh() self.node.refresh()
self.assertEqual(['42', '42'], self.assertEqual(['42'],
self.node.driver_internal_info['raid_config_job_ids']) self.node.driver_internal_info['raid_config_job_ids'])
@mock.patch.object(drac_common, 'get_drac_client', spec_set=True, @mock.patch.object(drac_common, 'get_drac_client', spec_set=True,

View File

@ -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.