From 90e42683c6e65e60cfe467a83be38d0cfeacad8b Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Tue, 4 Feb 2020 17:52:37 -0500 Subject: [PATCH] Reduce sleep time during VM migrations --- node-daemon/pvcd/NodeInstance.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/node-daemon/pvcd/NodeInstance.py b/node-daemon/pvcd/NodeInstance.py index 2456d6af..5c179f9c 100644 --- a/node-daemon/pvcd/NodeInstance.py +++ b/node-daemon/pvcd/NodeInstance.py @@ -644,7 +644,7 @@ class NodeInstance(object): # Wait for the VM to shut down while zkhandler.readdata(self.zk_conn, '/domains/{}/state'.format(dom_uuid)) in ['shutdown']: - time.sleep(1) + time.sleep(0.1) continue @@ -657,7 +657,7 @@ class NodeInstance(object): # Wait for the VM to migrate so the next VM's free RAM count is accurate (they migrate in serial anyways) while zkhandler.readdata(self.zk_conn, '/domains/{}/state'.format(dom_uuid)) in ['migrate', 'unmigrate', 'shutdown']: - time.sleep(1) + time.sleep(0.1) zkhandler.writedata(self.zk_conn, { '/nodes/{}/runningdomains'.format(self.name): '' }) zkhandler.writedata(self.zk_conn, { '/nodes/{}/domainstate'.format(self.name): 'flushed' }) @@ -706,7 +706,7 @@ class NodeInstance(object): # Wait for the VM to migrate back while zkhandler.readdata(self.zk_conn, '/domains/{}/state'.format(dom_uuid)) in ['migrate', 'unmigrate', 'shutdown']: - time.sleep(1) + time.sleep(0.1) zkhandler.writedata(self.zk_conn, { '/nodes/{}/domainstate'.format(self.name): 'ready' }) self.flush_thread = None