Fix race at shutdown
Currently we first stop the zk connection and afterwards the providers. This leads to a race condition where the providers may still want to communicate with zk while the connection is already dead. Instead stop the zk connection after stopping the providers. This also fixes some occational and misleading zk connection exception logs at the end of test cases. Change-Id: Ibb13f74a1130190403dd79922ccd6c2b75daffc9
This commit is contained in:
parent
eb52394c8c
commit
e8ee29c570
@ -1270,9 +1270,10 @@ class NodePoolBuilder(object):
|
||||
for worker in (workers):
|
||||
worker.join()
|
||||
|
||||
self.log.debug('Stopping providers')
|
||||
provider_manager.ProviderManager.stopProviders(self._config)
|
||||
|
||||
self.log.debug('Terminating ZooKeeper connection')
|
||||
self.zk.disconnect()
|
||||
|
||||
self.log.debug('Stopping providers')
|
||||
provider_manager.ProviderManager.stopProviders(self._config)
|
||||
self.log.debug('Finished stopping')
|
||||
|
Loading…
x
Reference in New Issue
Block a user