summaryrefslogtreecommitdiff
path: root/ironic/drivers/modules/redfish/management.py
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2023-05-08 15:08:21 +0000
committerGerrit Code Review <review@openstack.org>2023-05-08 15:08:21 +0000
commit47b778977c7d0224d55a5416f57a0bb36fa188e8 (patch)
treee7259116502f5b53523c6929de4fc75a245a566e /ironic/drivers/modules/redfish/management.py
parentcae05c70e65c69530a243b7d8046e53d1aaba452 (diff)
parentf10958a542dd58ff301c386ce0981ec218e9eef6 (diff)
downloadironic-47b778977c7d0224d55a5416f57a0bb36fa188e8.tar.gz
Merge "Handle MissingAttributeError when using OOB inspections to fetch MACs"
Diffstat (limited to 'ironic/drivers/modules/redfish/management.py')
-rw-r--r--ironic/drivers/modules/redfish/management.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/ironic/drivers/modules/redfish/management.py b/ironic/drivers/modules/redfish/management.py
index a669d09bc..8bd7058a5 100644
--- a/ironic/drivers/modules/redfish/management.py
+++ b/ironic/drivers/modules/redfish/management.py
@@ -1197,9 +1197,18 @@ class RedfishManagement(base.ManagementInterface):
:raises: RedfishError on an error from the Sushy library
:returns: A list of MAC addresses for the node
"""
+ system = redfish_utils.get_system(task.node)
try:
- system = redfish_utils.get_system(task.node)
return list(redfish_utils.get_enabled_macs(task, system))
+ # NOTE(janders) we should handle MissingAttributeError separately
+ # from other SushyErrors - some servers (e.g. some Cisco UCSB and UCSX
+ # blades) are missing EthernetInterfaces attribute yet could be
+ # provisioned successfully if MAC information is provided manually AND
+ # this exception is caught and handled accordingly.
+ except sushy.exceptions.MissingAttributeError as exc:
+ LOG.warning('Cannot get MAC addresses for node %(node)s: %(exc)s',
+ {'node': task.node.uuid, 'exc': exc})
+ # if the exception is not a MissingAttributeError, raise it
except sushy.exceptions.SushyError as exc:
msg = (_('Failed to get network interface information on node '
'%(node)s: %(exc)s')