From 983daceaedf22740a2e7698f8f67b09e897cbdcb Mon Sep 17 00:00:00 2001 From: Joshua Boniface Date: Sat, 7 Sep 2019 12:08:31 -0400 Subject: [PATCH] Fix shutdown abort during restart Restart state, being different from shutdown, would trigger an abort of the shutdown. Fix this by including restart in the valid states to continue. --- node-daemon/pvcd/VMInstance.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node-daemon/pvcd/VMInstance.py b/node-daemon/pvcd/VMInstance.py index 7d793f57..6cd017bf 100644 --- a/node-daemon/pvcd/VMInstance.py +++ b/node-daemon/pvcd/VMInstance.py @@ -296,7 +296,7 @@ class VMInstance(object): # Abort shutdown if the state changes to start current_state = zkhandler.readdata(self.zk_conn, '/domains/{}/state'.format(self.domuuid)) - if current_state != 'shutdown': + if current_state not in ['shutdown', 'restart']: self.logger.out('Aborting VM shutdown due to state change', state='i', prefix='Domain {}:'.format(self.domuuid)) is_aborted = True break