summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDhuldev Valekar <dhuldev.valekar@gmail.com>2021-06-15 07:10:12 -0500
committerDhuldev Valekar <dhuldev.valekar@gmail.com>2021-06-29 13:33:25 +0000
commit52af7c757d5ff4417bc7604b892c2c091253f68b (patch)
tree20b6406d81590f5a8014376a4873a4e663dea8a1
parentf1b87e82d0328a5750258879b680c930c944faf0 (diff)
downloadironic-52af7c757d5ff4417bc7604b892c2c091253f68b.tar.gz
Update the clear job id's constant
Fixes an issue of powering off with the ``idrac-wsman`` management interface while the execution of a clear job queue cleaning step is proceeding. Prior to this fix, the clean step would fail when powering off a node. Story: 2008988 Task: 42641 Change-Id: Ib4ab755c806f028d97379b80a8c27d6ade63cba1 (cherry picked from commit 741a4d8a88bbc51f5903fc00cc4f1decf8f4ea1a)
-rw-r--r--ironic/drivers/modules/drac/management.py2
-rw-r--r--ironic/tests/unit/drivers/modules/drac/test_management.py4
-rw-r--r--releasenotes/notes/update-clear-job-id-constant-fix-c69cf96c55364bb3.yaml7
3 files changed, 10 insertions, 3 deletions
diff --git a/ironic/drivers/modules/drac/management.py b/ironic/drivers/modules/drac/management.py
index f595bea3b..ce864b79c 100644
--- a/ironic/drivers/modules/drac/management.py
+++ b/ironic/drivers/modules/drac/management.py
@@ -79,7 +79,7 @@ _DRAC_BOOT_MODES = ['Bios', 'Uefi']
_NON_PERSISTENT_BOOT_MODE = 'OneTime'
# Clear job id's constant
-_CLEAR_JOB_IDS = 'JID_CLEARALL_FORCE'
+_CLEAR_JOB_IDS = 'JID_CLEARALL'
# Clean steps constant
_CLEAR_JOBS_CLEAN_STEPS = ['clear_job_queue', 'known_good_state']
diff --git a/ironic/tests/unit/drivers/modules/drac/test_management.py b/ironic/tests/unit/drivers/modules/drac/test_management.py
index 74f2ea372..4d9c791c2 100644
--- a/ironic/tests/unit/drivers/modules/drac/test_management.py
+++ b/ironic/tests/unit/drivers/modules/drac/test_management.py
@@ -806,7 +806,7 @@ class DracManagementTestCase(test_utils.BaseDracTest):
mock_client.reset_idrac.assert_called_once_with(
force=True, wait=True)
mock_client.delete_jobs.assert_called_once_with(
- job_ids=['JID_CLEARALL_FORCE'])
+ job_ids=['JID_CLEARALL'])
self.assertIsNone(return_value)
@@ -818,6 +818,6 @@ class DracManagementTestCase(test_utils.BaseDracTest):
shared=False) as task:
return_value = task.driver.management.clear_job_queue(task)
mock_client.delete_jobs.assert_called_once_with(
- job_ids=['JID_CLEARALL_FORCE'])
+ job_ids=['JID_CLEARALL'])
self.assertIsNone(return_value)
diff --git a/releasenotes/notes/update-clear-job-id-constant-fix-c69cf96c55364bb3.yaml b/releasenotes/notes/update-clear-job-id-constant-fix-c69cf96c55364bb3.yaml
new file mode 100644
index 000000000..9ecaac9f2
--- /dev/null
+++ b/releasenotes/notes/update-clear-job-id-constant-fix-c69cf96c55364bb3.yaml
@@ -0,0 +1,7 @@
+---
+fixes:
+ - |
+ Fixes an issue of powering off with the ``idrac-wsman`` management
+ interface while the execution of a clear job queue cleaning step is
+ proceeding.
+ Prior to this fix, the clean step would fail when powering off a node.