Remove detect_vendor decorator

And move a lock creation to vendor storage, which... should be
okay.

mgoddard reported issues in one of his projects where ironic was
reporting that there were errors on the power sync process,
ultimately due to the decorator from the very first iteration of
the detect vendor code.

Change-Id: Icd0dc3fe59a3815d6f78d881eb280f406e7d0c69
This commit is contained in:
Julia Kreger 2020-12-16 09:54:26 -08:00
parent a58b88c737
commit 9a858ad4ff
1 changed files with 1 additions and 1 deletions

View File

@ -950,6 +950,7 @@ class IPMIPower(base.PowerInterface):
# call to store it.
vendor = task.driver.management.detect_vendor(task)
if vendor:
task.upgrade_lock()
props = task.node.properties
props['vendor'] = vendor
task.node.properties = props
@ -1241,7 +1242,6 @@ class IPMIManagement(base.ManagementInterface):
response['persistent'] = 'Options apply to all future boots' in out
return response
@task_manager.require_exclusive_lock
@METRICS.timer('IPMIManagement.detect_vendor')
def detect_vendor(self, task):
"""Detects, stores, and returns the hardware vendor.