Merge "Fix callback method interface to remove warning by tenacity"
This commit is contained in:
commit
15f59c4149
@ -32,6 +32,11 @@ LOG = logging.getLogger(__name__)
|
||||
CONF = cfg.CONF
|
||||
|
||||
|
||||
def _raise_compute_exception(retry_state):
|
||||
LOG.exception("Error retrieving nova virtual machine.")
|
||||
raise exceptions.ComputeGetException()
|
||||
|
||||
|
||||
class VirtualMachineManager(compute_base.ComputeBase):
|
||||
'''Compute implementation of virtual machines via nova.'''
|
||||
|
||||
@ -180,10 +185,6 @@ class VirtualMachineManager(compute_base.ComputeBase):
|
||||
raise exceptions.ComputeStatusException() from e
|
||||
return constants.DOWN
|
||||
|
||||
def _raise_compute_exception(self):
|
||||
LOG.exception("Error retrieving nova virtual machine.")
|
||||
raise exceptions.ComputeGetException()
|
||||
|
||||
@tenacity.retry(retry=tenacity.retry_if_exception_type(),
|
||||
stop=tenacity.stop_after_attempt(CONF.compute.max_retries),
|
||||
retry_error_callback=_raise_compute_exception,
|
||||
|
Loading…
Reference in New Issue
Block a user