Commit 29eea03d by Bach Dániel

vm: fix update_agent()

parent da2b020d
......@@ -86,7 +86,7 @@ def agent_started(vm, version=None):
if version and version != settings.AGENT_VERSION:
try:
update_agent(vm, instance, act)
update_agent(instance, act)
except TimeoutError:
pass
else:
......@@ -134,9 +134,9 @@ def agent_stopped(vm):
pass
def update_agent(instance, vm, act=None):
def update_agent(instance, act=None):
if act:
act.sub_activity(
act = act.sub_activity(
'update',
readable_name=create_readable(
ugettext_noop('update to %(version)s'),
......@@ -150,5 +150,6 @@ def update_agent(instance, vm, act=None):
version=settings.AGENT_VERSION))
with act:
queue = instance.get_remote_queue_name("agent")
update.apply_async(queue=queue,
args=(vm, create_agent_tar())).get(timeout=10)
update.apply_async(
queue=queue,
args=(instance.vm_name, create_agent_tar())).get(timeout=10)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment