Fix _retrigger_replaced in convergence worker
Fix missing argument in _retrigger_replaced when calling CheckResource. Closes-Bug: #1702487 Change-Id: Idc81b50fcc7036aa90f1489a348572ef03aa3381
This commit is contained in:
parent
1a7a113c71
commit
6d7506c690
@ -129,7 +129,7 @@ class WorkerService(object):
|
|||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def _retrigger_replaced(self, is_update, rsrc, stack, msg_queue):
|
def _retrigger_replaced(self, is_update, rsrc, stack, check_resource):
|
||||||
graph = stack.convergence_dependencies.graph()
|
graph = stack.convergence_dependencies.graph()
|
||||||
key = (rsrc.id, is_update)
|
key = (rsrc.id, is_update)
|
||||||
if key not in graph and rsrc.replaces is not None:
|
if key not in graph and rsrc.replaces is not None:
|
||||||
@ -141,10 +141,8 @@ class WorkerService(object):
|
|||||||
# The old resource might be in the graph (a rollback case);
|
# The old resource might be in the graph (a rollback case);
|
||||||
# just re-trigger it.
|
# just re-trigger it.
|
||||||
key = (rsrc.replaces, is_update)
|
key = (rsrc.replaces, is_update)
|
||||||
cr = check_resource.CheckResource(self.engine_id, self._rpc_client,
|
check_resource.retrigger_check_resource(stack.context, is_update,
|
||||||
self.thread_group_mgr, msg_queue)
|
key[0], stack)
|
||||||
cr.retrigger_check_resource(stack.context, is_update, key[0],
|
|
||||||
stack)
|
|
||||||
|
|
||||||
@context.request_context
|
@context.request_context
|
||||||
def check_resource(self, cnxt, resource_id, current_traversal, data,
|
def check_resource(self, cnxt, resource_id, current_traversal, data,
|
||||||
@ -166,15 +164,15 @@ class WorkerService(object):
|
|||||||
msg_queue = eventlet.queue.LightQueue()
|
msg_queue = eventlet.queue.LightQueue()
|
||||||
try:
|
try:
|
||||||
self.thread_group_mgr.add_msg_queue(stack.id, msg_queue)
|
self.thread_group_mgr.add_msg_queue(stack.id, msg_queue)
|
||||||
|
cr = check_resource.CheckResource(self.engine_id,
|
||||||
|
self._rpc_client,
|
||||||
|
self.thread_group_mgr,
|
||||||
|
msg_queue, in_data)
|
||||||
if current_traversal != stack.current_traversal:
|
if current_traversal != stack.current_traversal:
|
||||||
LOG.debug('[%s] Traversal cancelled; re-trigerring.',
|
LOG.debug('[%s] Traversal cancelled; re-trigerring.',
|
||||||
current_traversal)
|
current_traversal)
|
||||||
self._retrigger_replaced(is_update, rsrc, stack, msg_queue)
|
self._retrigger_replaced(is_update, rsrc, stack, cr)
|
||||||
else:
|
else:
|
||||||
cr = check_resource.CheckResource(self.engine_id,
|
|
||||||
self._rpc_client,
|
|
||||||
self.thread_group_mgr,
|
|
||||||
msg_queue, in_data)
|
|
||||||
cr.check(cnxt, resource_id, current_traversal, resource_data,
|
cr.check(cnxt, resource_id, current_traversal, resource_data,
|
||||||
is_update, adopt_stack_data, rsrc, stack)
|
is_update, adopt_stack_data, rsrc, stack)
|
||||||
finally:
|
finally:
|
||||||
|
Loading…
Reference in New Issue
Block a user