Merge "[iRMC] Fix IPMI incompatibility handling error"
This commit is contained in:
commit
2bd69444d9
@ -197,7 +197,8 @@ def _inspect_hardware(node, existing_traits=None, **kwargs):
|
|||||||
props = irmc.scci.get_essential_properties(
|
props = irmc.scci.get_essential_properties(
|
||||||
report, IRMCInspect.ESSENTIAL_PROPERTIES)
|
report, IRMCInspect.ESSENTIAL_PROPERTIES)
|
||||||
d_info = irmc_common.parse_driver_info(node)
|
d_info = irmc_common.parse_driver_info(node)
|
||||||
if node.driver_internal_info.get('irmc_ipmi_succeed'):
|
if (getattr(node, 'power_interface') == 'ipmitool'
|
||||||
|
or node.driver_internal_info.get('irmc_ipmi_succeed')):
|
||||||
capabilities = irmc.scci.get_capabilities_properties(
|
capabilities = irmc.scci.get_capabilities_properties(
|
||||||
d_info,
|
d_info,
|
||||||
capabilities_props,
|
capabilities_props,
|
||||||
|
@ -226,7 +226,8 @@ class IRMCManagement(ipmitool.IPMIManagement,
|
|||||||
:raises: InvalidParameterValue if required parameters are invalid.
|
:raises: InvalidParameterValue if required parameters are invalid.
|
||||||
:raises: MissingParameterValue if a required parameter is missing.
|
:raises: MissingParameterValue if a required parameter is missing.
|
||||||
"""
|
"""
|
||||||
if task.node.driver_internal_info.get('irmc_ipmi_succeed'):
|
if (getattr(task.node, 'power_interface') == 'ipmitool'
|
||||||
|
or task.node.driver_internal_info.get('irmc_ipmi_succeed')):
|
||||||
irmc_common.parse_driver_info(task.node)
|
irmc_common.parse_driver_info(task.node)
|
||||||
irmc_common.update_ipmi_properties(task)
|
irmc_common.update_ipmi_properties(task)
|
||||||
super(IRMCManagement, self).validate(task)
|
super(IRMCManagement, self).validate(task)
|
||||||
@ -245,7 +246,8 @@ class IRMCManagement(ipmitool.IPMIManagement,
|
|||||||
in :mod:`ironic.common.boot_devices`.
|
in :mod:`ironic.common.boot_devices`.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
if task.node.driver_internal_info.get('irmc_ipmi_succeed'):
|
if (getattr(task.node, 'power_interface') == 'ipmitool'
|
||||||
|
or task.node.driver_internal_info.get('irmc_ipmi_succeed')):
|
||||||
return super(IRMCManagement, self).get_supported_boot_devices(task)
|
return super(IRMCManagement, self).get_supported_boot_devices(task)
|
||||||
else:
|
else:
|
||||||
return super(ipmitool.IPMIManagement,
|
return super(ipmitool.IPMIManagement,
|
||||||
@ -271,7 +273,8 @@ class IRMCManagement(ipmitool.IPMIManagement,
|
|||||||
:raises: RedfishConnectionError on Redfish operation failure.
|
:raises: RedfishConnectionError on Redfish operation failure.
|
||||||
:raises: RedfishError on Redfish operation failure.
|
:raises: RedfishError on Redfish operation failure.
|
||||||
"""
|
"""
|
||||||
if task.node.driver_internal_info.get('irmc_ipmi_succeed'):
|
if (getattr(task.node, 'power_interface') == 'ipmitool'
|
||||||
|
or task.node.driver_internal_info.get('irmc_ipmi_succeed')):
|
||||||
if device not in self.get_supported_boot_devices(task):
|
if device not in self.get_supported_boot_devices(task):
|
||||||
raise exception.InvalidParameterValue(_(
|
raise exception.InvalidParameterValue(_(
|
||||||
"Invalid boot device %s specified.") % device)
|
"Invalid boot device %s specified.") % device)
|
||||||
@ -331,7 +334,8 @@ class IRMCManagement(ipmitool.IPMIManagement,
|
|||||||
:persistent: Whether the boot device will persist to all
|
:persistent: Whether the boot device will persist to all
|
||||||
future boots or not, None if it is unknown.
|
future boots or not, None if it is unknown.
|
||||||
"""
|
"""
|
||||||
if task.node.driver_internal_info.get('irmc_ipmi_succeed'):
|
if (getattr(task.node, 'power_interface') == 'ipmitool'
|
||||||
|
or task.node.driver_internal_info.get('irmc_ipmi_succeed')):
|
||||||
return super(IRMCManagement, self).get_boot_device(task)
|
return super(IRMCManagement, self).get_boot_device(task)
|
||||||
else:
|
else:
|
||||||
return super(
|
return super(
|
||||||
@ -426,7 +430,8 @@ class IRMCManagement(ipmitool.IPMIManagement,
|
|||||||
if sensor_method == 'scci':
|
if sensor_method == 'scci':
|
||||||
return _get_sensors_data(task)
|
return _get_sensors_data(task)
|
||||||
elif sensor_method == 'ipmitool':
|
elif sensor_method == 'ipmitool':
|
||||||
if task.node.driver_internal_info.get('irmc_ipmi_succeed'):
|
if (getattr(task.node, 'power_interface') == 'ipmitool'
|
||||||
|
or task.node.driver_internal_info.get('irmc_ipmi_succeed')):
|
||||||
return super(IRMCManagement, self).get_sensors_data(task)
|
return super(IRMCManagement, self).get_sensors_data(task)
|
||||||
else:
|
else:
|
||||||
raise exception.InvalidParameterValue(_(
|
raise exception.InvalidParameterValue(_(
|
||||||
@ -567,7 +572,8 @@ class IRMCManagement(ipmitool.IPMIManagement,
|
|||||||
:returns: String representing the BMC reported Vendor or
|
:returns: String representing the BMC reported Vendor or
|
||||||
Manufacturer, otherwise returns None.
|
Manufacturer, otherwise returns None.
|
||||||
"""
|
"""
|
||||||
if task.node.driver_internal_info.get('irmc_ipmi_succeed'):
|
if (getattr(task.node, 'power_interface') == 'ipmitool'
|
||||||
|
or task.node.driver_internal_info.get('irmc_ipmi_succeed')):
|
||||||
return super(IRMCManagement, self).detect_vendor(task)
|
return super(IRMCManagement, self).detect_vendor(task)
|
||||||
else:
|
else:
|
||||||
return super(ipmitool.IPMIManagement, self).detect_vendor(task)
|
return super(ipmitool.IPMIManagement, self).detect_vendor(task)
|
||||||
|
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
fixes:
|
||||||
|
- |
|
||||||
|
Fixes bug in iRMC driver, where `irmc` power_interface sets and updates
|
||||||
|
`irmc_ipmi_succeed` flag which is used by rest of iRMC driver code to deal
|
||||||
|
with iRMC firmware's IPMI incompatibility but `ipmitool` power_interface
|
||||||
|
doesn't set nor update `irmc_ipmi_succeed` flag and rest of iRMC driver
|
||||||
|
code fail to handle iRMC firmware's IPMI incompatibility correctly.
|
Loading…
Reference in New Issue
Block a user