Fix for failure in cleaning in iRMC driver
This patch will fix an issue for BIOS configuration during combine out-of-band an in-band in manual clean. The cleaning operation will be fail, if an in-band clean step were to execute after the completion of out-of-band clean step that performs reboot of the node. This fixing is following other patch [1] from Shivanand. [1] https://review.openstack.org/#/c/580136/ Tested on TX2540 M1 Fujitsu servers successfully. Co-authored-By: Dao Cong Tien <tiendc@vn.fujitsu.com> Change-Id: I0b37b93851cc56141c2fe78793296c50ad25f9ad
This commit is contained in:
parent
40af9848ac
commit
da82494b66
|
@ -87,6 +87,9 @@ class IRMCBIOS(base.BIOSInterface):
|
|||
'%(settings)s', {'settings': settings,
|
||||
'node_uuid': task.node.uuid})
|
||||
irmc.elcm.set_bios_configuration(irmc_info, settings)
|
||||
# NOTE(trungnv): Fix failed cleaning during rebooting node
|
||||
# when combine OOB and IB steps in manual clean.
|
||||
self._resume_cleaning(task)
|
||||
except irmc.scci.SCCIError as e:
|
||||
LOG.error('Failed to apply BIOS configuration on node '
|
||||
'%(node_uuid)s. Error: %(error)s',
|
||||
|
@ -138,3 +141,9 @@ class IRMCBIOS(base.BIOSInterface):
|
|||
delete_names = [setting['name'] for setting in delete_list]
|
||||
objects.BIOSSettingList.delete(task.context, node_id,
|
||||
delete_names)
|
||||
|
||||
def _resume_cleaning(self, task):
|
||||
driver_internal_info = task.node.driver_internal_info
|
||||
driver_internal_info['cleaning_reboot'] = True
|
||||
task.node.driver_internal_info = driver_internal_info
|
||||
task.node.save()
|
||||
|
|
|
@ -56,6 +56,7 @@ class IRMCBIOSTestCase(test_common.BaseIRMCTest):
|
|||
}]
|
||||
with task_manager.acquire(self.context, self.node.uuid) as task:
|
||||
irmc_info = irmc_common.parse_driver_info(task.node)
|
||||
task.node.save = mock.Mock()
|
||||
get_bios_settings_mock.return_value = settings
|
||||
task.driver.bios.apply_configuration(task, settings)
|
||||
set_bios_configuration_mock.assert_called_once_with(irmc_info,
|
||||
|
|
Loading…
Reference in New Issue