summaryrefslogtreecommitdiff
path: root/ironic/drivers/modules
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2022-07-06 13:15:07 +0000
committerGerrit Code Review <review@openstack.org>2022-07-06 13:15:07 +0000
commiteb4327ae5d36fdc09d83e1cd567715bbe557e2eb (patch)
tree6c20bb4ee4b7fa7152add772b41aabe661090dcf /ironic/drivers/modules
parenta4bf31de61809da4c7eae945ac2e9f9073a41602 (diff)
parent1dda97c783653aef638113cb1faa250836ed99e1 (diff)
downloadironic-eb4327ae5d36fdc09d83e1cd567715bbe557e2eb.tar.gz
Merge "Prevent clear_job_queue and reset_idrac failures on older iDRACs"
Diffstat (limited to 'ironic/drivers/modules')
-rw-r--r--ironic/drivers/modules/drac/management.py42
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)