From 9be426507a64b5970c34b4a3338b28f6b2f678b5 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Sun, 30 May 2021 15:31:17 -0400 Subject: [PATCH] Fix erroneous lock calls --- daemon-common/vm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daemon-common/vm.py b/daemon-common/vm.py index 19d08ab4..ef7dabfa 100644 --- a/daemon-common/vm.py +++ b/daemon-common/vm.py @@ -623,7 +623,7 @@ def migrate_vm(zkhandler, domain, target_node, force_migrate, wait=False, force_ retmsg = 'Migrating VM "{}" to node "{}".'.format(domain, target_node) - lock = zkhandler.exclusivelock(zkhandler, '/domains/{}/state'.format(dom_uuid)) + lock = zkhandler.exclusivelock('/domains/{}/state'.format(dom_uuid)) with lock: zkhandler.write([ ('/domains/{}/state'.format(dom_uuid), target_state), @@ -666,7 +666,7 @@ def unmigrate_vm(zkhandler, domain, wait=False, force_live=False): retmsg = 'Unmigrating VM "{}" back to node "{}".'.format(domain, target_node) - lock = zkhandler.exclusivelock(zkhandler, '/domains/{}/state'.format(dom_uuid)) + lock = zkhandler.exclusivelock('/domains/{}/state'.format(dom_uuid)) with lock: zkhandler.write([ ('/domains/{}/state'.format(dom_uuid), target_state),