Set shutdown state after final keepalive

This commit is contained in:
Joshua Boniface 2019-06-19 14:52:47 -04:00
parent 80de40252b
commit 0f15e7cda5
1 changed files with 3 additions and 3 deletions

View File

@ -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