diff options
author | Aija Jauntēva <aija.jaunteva@dell.com> | 2021-08-20 07:46:32 -0400 |
---|---|---|
committer | Aija Jauntēva <aija.jaunteva@dell.com> | 2021-09-09 05:13:22 -0400 |
commit | 391543946b6c3cb21ae1c08a21b6f730926c9b9d (patch) | |
tree | c30dee5976c7a56a95c7cfd15393f22839a26f03 /ironic/drivers/modules/drac | |
parent | 743f206d0765da1e7eb97da01117947f7a968710 (diff) | |
download | ironic-391543946b6c3cb21ae1c08a21b6f730926c9b9d.tar.gz |
Fix iDRAC import configuration job with errors
In iDRAC import configuration task can be completed with OK health
but having some errors, for example, when one disk failed to be
created and another succeeded.
Also changed to exclude informational messages for error reporting.
Story: 2009198
Task: 43253
Change-Id: I02b63547566c94ffa1a5d0e84bd1b1f10d28bfc3
Diffstat (limited to 'ironic/drivers/modules/drac')
-rw-r--r-- | ironic/drivers/modules/drac/management.py | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/ironic/drivers/modules/drac/management.py b/ironic/drivers/modules/drac/management.py index 3bacde962..f20493934 100644 --- a/ironic/drivers/modules/drac/management.py +++ b/ironic/drivers/modules/drac/management.py @@ -538,9 +538,21 @@ class DracRedfishManagement(redfish_management.RedfishManagement): info.pop('import_task_monitor_url', None) node.driver_internal_info = info + succeeded = False if (import_task.task_state == sushy.TASK_STATE_COMPLETED and import_task.task_status in [sushy.HEALTH_OK, sushy.HEALTH_WARNING]): + + # Task could complete with errors (partial success) + # iDRAC 5.00.00.00 has stopped reporting Critical messages + # so checking also by message_id + succeeded = not any(m.message for m in import_task.messages + if (m.severity + and m.severity != sushy.SEVERITY_OK) + or (m.message_id and 'SYS055' + in m.message_id)) + + if succeeded: LOG.info('Configuration import %(task_monitor_url)s ' 'successful for node %(node)s', {'node': node.uuid, @@ -570,7 +582,11 @@ class DracRedfishManagement(redfish_management.RedfishManagement): # Select all messages, skipping OEM messages that don't have # `message` field populated. messages = [m.message for m in import_task.messages - if m.message is not None] + if m.message is not None + and ((m.severity + and m.severity != sushy.SEVERITY_OK) + or (m.message_id + and 'SYS055' in m.message_id))] error_msg = (_("Failed import configuration task: " "%(task_monitor_url)s. Message: '%(message)s'.") % {'task_monitor_url': task_monitor_url, |