Commit 29eea03d by Bach Dániel

vm: fix update_agent()

parent da2b020d
...@@ -86,7 +86,7 @@ def agent_started(vm, version=None): ...@@ -86,7 +86,7 @@ def agent_started(vm, version=None):
if version and version != settings.AGENT_VERSION: if version and version != settings.AGENT_VERSION:
try: try:
update_agent(vm, instance, act) update_agent(instance, act)
except TimeoutError: except TimeoutError:
pass pass
else: else:
...@@ -134,9 +134,9 @@ def agent_stopped(vm): ...@@ -134,9 +134,9 @@ def agent_stopped(vm):
pass pass
def update_agent(instance, vm, act=None): def update_agent(instance, act=None):
if act: if act:
act.sub_activity( act = act.sub_activity(
'update', 'update',
readable_name=create_readable( readable_name=create_readable(
ugettext_noop('update to %(version)s'), ugettext_noop('update to %(version)s'),
...@@ -150,5 +150,6 @@ def update_agent(instance, vm, act=None): ...@@ -150,5 +150,6 @@ def update_agent(instance, vm, act=None):
version=settings.AGENT_VERSION)) version=settings.AGENT_VERSION))
with act: with act:
queue = instance.get_remote_queue_name("agent") queue = instance.get_remote_queue_name("agent")
update.apply_async(queue=queue, update.apply_async(
args=(vm, create_agent_tar())).get(timeout=10) 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