From a1452b16691f6acee6f5c6b06a842de490736c63 Mon Sep 17 00:00:00 2001 From: Joshua Hesketh Date: Tue, 18 Jan 2022 15:23:39 +1100 Subject: [PATCH] aqr: Fix shutdown procedure cephadm appears to leave open a thread lock, use os._exit to quit when we're ready. Signed-off-by: Joshua Hesketh --- src/aquarium.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/aquarium.py b/src/aquarium.py index 0c1428e27..39bef2b3e 100755 --- a/src/aquarium.py +++ b/src/aquarium.py @@ -179,8 +179,6 @@ async def run(self): await self.stop_uvicorn() await self.shutdown() - # await self.gstate.shutdown() - # await self.nodemgr.shutdown() async def bootstrap(self): logger.debug("Starting main Aquarium task.") @@ -291,6 +289,9 @@ async def shutdown(self): logger.info("Stopping deployment task.") await self.deployment.shutdown() + logger.info("Closing KVStore") + await self.kvstore.close() + async def start_uvicorn(self): logger.debug("Starting uvicorn") if self.gstate.config.options.ssl.use_ssl: @@ -337,6 +338,7 @@ def main(): aqr = Aquarium() asyncio.run(aqr.run()) + os._exit(0) if __name__ == "__main__":