diff options
author | Dmitry Tantsur <dtantsur@protonmail.com> | 2022-01-26 14:59:34 +0100 |
---|---|---|
committer | Dmitry Tantsur <dtantsur@protonmail.com> | 2022-01-26 15:18:40 +0100 |
commit | 2c58ab3703675b43d9f197f609fc576e850ac0da (patch) | |
tree | 06a6d7441ae280add92ffeed84b131384ce7d8e7 /ironic/cmd/conductor.py | |
parent | e841fa05456ae8cfa35222fc6b787d9aadababe6 (diff) | |
download | ironic-2c58ab3703675b43d9f197f609fc576e850ac0da.tar.gz |
Wait for conductor start before notifying systemd
Currently, the launcher first notifies systemd, then starts checking the
services (RPC and WSGI). So any failures will be reported, but only
after systemd declares the service ready.
This change adds a polling loop to make sure RpcService.start() finishes
successfully.
Change-Id: Ib460622d69a9cb1cb82e796a6ab294bbbb40c359
Diffstat (limited to 'ironic/cmd/conductor.py')
-rw-r--r-- | ironic/cmd/conductor.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ironic/cmd/conductor.py b/ironic/cmd/conductor.py index 5fa4c8489..a932cb22f 100644 --- a/ironic/cmd/conductor.py +++ b/ironic/cmd/conductor.py @@ -67,6 +67,12 @@ def main(): issue_startup_warnings(CONF) launcher = service.launch(CONF, mgr, restart_method='mutate') + + # NOTE(dtantsur): handling start-up failures before launcher.wait() helps + # notify systemd about them. Otherwise the launcher will report successful + # service start-up before checking the threads. + mgr.wait_for_start() + sys.exit(launcher.wait()) |