From 202b8f41af95b85d94ce4721bce8850d65dcdebe Mon Sep 17 00:00:00 2001 From: Joshua Boniface Date: Mon, 11 Jun 2018 21:32:13 -0400 Subject: [PATCH] Add a short delay before managing state --- VMInstance.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/VMInstance.py b/VMInstance.py index 8695e257..1d9ecebd 100644 --- a/VMInstance.py +++ b/VMInstance.py @@ -236,6 +236,9 @@ class VMInstance: # Main function to manage a VM (taking only self) # def manage_vm_state(self): + # Give ourselves a bit of leeway time + time.sleep(0.2) + # Get the current values from zookeeper self.state = self.zk.get('/domains/{}/state'.format(self.domuuid))[0].decode('ascii') self.hypervisor = self.zk.get('/domains/{}/hypervisor'.format(self.domuuid))[0].decode('ascii')