Skip to content
This repository has been archived by the owner on Feb 25, 2023. It is now read-only.

Commit

Permalink
aqr: Fix shutdown procedure
Browse files Browse the repository at this point in the history
cephadm appears to leave open a thread lock, use os._exit to
quit when we're ready.

Signed-off-by: Joshua Hesketh <jhesketh@suse.com>
  • Loading branch information
jhesketh committed Jan 18, 2022
1 parent 9b1798e commit a1452b1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/aquarium.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -337,6 +338,7 @@ def main():

aqr = Aquarium()
asyncio.run(aqr.run())
os._exit(0)


if __name__ == "__main__":
Expand Down

0 comments on commit a1452b1

Please sign in to comment.