From 0f15e7cda519373c00b61e54212d0e55bd5b3d57 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Wed, 19 Jun 2019 14:52:47 -0400 Subject: [PATCH] Set shutdown state after final keepalive --- node-daemon/pvcd/Daemon.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/node-daemon/pvcd/Daemon.py b/node-daemon/pvcd/Daemon.py index c761fe56..79a848bf 100644 --- a/node-daemon/pvcd/Daemon.py +++ b/node-daemon/pvcd/Daemon.py @@ -472,12 +472,12 @@ zk_conn.add_listener(zk_listener) def cleanup(): global zk_conn, update_timer, d_domains - # Set stop state in Zookeeper - zkhandler.writedata(zk_conn, { '/nodes/{}/daemonstate'.format(myhostname): 'shutdown' }) - logger.out('Performing final keepalive update', state='s') update_zookeeper() + # Set shutdown state in Zookeeper + zkhandler.writedata(zk_conn, { '/nodes/{}/daemonstate'.format(myhostname): 'shutdown' }) + logger.out('Terminating pvcd and cleaning up', state='s') # Stop keepalive thread