diff options
author | Jacob Anders <janders@redhat.com> | 2022-06-21 13:18:12 +1000 |
---|---|---|
committer | Jacob Anders <janders@redhat.com> | 2022-07-05 22:27:43 +1000 |
commit | 1dda97c783653aef638113cb1faa250836ed99e1 (patch) | |
tree | d3df7098d2eb1a5d4e5711701bcb2dccda9774d5 /ironic/drivers/modules | |
parent | 39a7f58002eac8ad10720c7347f001c8afd24a6f (diff) | |
download | ironic-1dda97c783653aef638113cb1faa250836ed99e1.tar.gz |
Prevent clear_job_queue and reset_idrac failures on older iDRACs
Currently, clear_job_queue and reset_idrac steps are only supported on
idrac-redfish driver on iDRAC9 hardware. However, Ironic still attempts
to run these steps on iDRAC8 BMCs configured with idrac-redfish driver
which results in verification failures. This change attempts to resolve
it by catching the related exception, logging a warning and continuing
verification. In case of cleaning, it still fails.
Story: 2010091
Task: 45630
Change-Id: Icd8c5378469887962ff32eea2f38697c539f7e95
Diffstat (limited to 'ironic/drivers/modules')
-rw-r--r-- | ironic/drivers/modules/drac/management.py | 42 |
1 files changed, 34 insertions, 8 deletions
diff --git a/ironic/drivers/modules/drac/management.py b/ironic/drivers/modules/drac/management.py index df6942611..ca250ae27 100644 --- a/ironic/drivers/modules/drac/management.py +++ b/ironic/drivers/modules/drac/management.py @@ -33,6 +33,7 @@ from ironic.common import boot_devices from ironic.common import exception from ironic.common.i18n import _ from ironic.common import molds +from ironic.common import states from ironic.conductor import periodics from ironic.conductor import task_manager from ironic.conductor import utils as manager_utils @@ -623,9 +624,22 @@ class DracRedfishManagement(redfish_management.RedfishManagement): on. :raises: RedfishError on an error. """ - drac_utils.execute_oem_manager_method( - task, 'clear job queue', - lambda m: m.job_service.delete_jobs(job_ids=['JID_CLEARALL'])) + try: + drac_utils.execute_oem_manager_method( + task, 'clear job queue', + lambda m: m.job_service.delete_jobs(job_ids=['JID_CLEARALL'])) + except exception.RedfishError as exc: + if "Oem/Dell/DellJobService is missing" in str(exc): + LOG.warning('iDRAC on node %(node)s does not support ' + 'clearing Lifecycle Controller job queue ' + 'using the idrac-redfish driver. ' + 'If using iDRAC9, consider upgrading firmware. ' + 'If using iDRAC8, consider switching to ' + 'idrac-wsman for management interface if ' + 'possible.', + {'node': task.node.uuid}) + if task.node.provision_state != states.VERIFYING: + raise @METRICS.timer('DracRedfishManagement.reset_idrac') @base.verify_step(priority=0) @@ -637,11 +651,23 @@ class DracRedfishManagement(redfish_management.RedfishManagement): on. :raises: RedfishError on an error. """ - drac_utils.execute_oem_manager_method( - task, 'reset iDRAC', lambda m: m.reset_idrac()) - redfish_utils.wait_until_get_system_ready(task.node) - LOG.info('Reset iDRAC for node %(node)s done', - {'node': task.node.uuid}) + try: + drac_utils.execute_oem_manager_method( + task, 'reset iDRAC', lambda m: m.reset_idrac()) + redfish_utils.wait_until_get_system_ready(task.node) + LOG.info('Reset iDRAC for node %(node)s done', + {'node': task.node.uuid}) + except exception.RedfishError as exc: + if "Oem/Dell/DelliDRACCardService is missing" in str(exc): + LOG.warning('iDRAC on node %(node)s does not support ' + 'iDRAC reset using the idrac-redfish driver. ' + 'If using iDRAC9, consider upgrading firmware. ' + 'If using iDRAC8, consider switching to ' + 'idrac-wsman for management interface if ' + 'possible.', + {'node': task.node.uuid}) + if task.node.provision_state != states.VERIFYING: + raise @METRICS.timer('DracRedfishManagement.known_good_state') @base.verify_step(priority=0) |