Return non-zero exit code on failures
Launcher.wait() does not raise, it returns an integer code. Propagate it to sys.exit() so that failures are correctly recognized. Change-Id: I38bf39e4e4845415640b3468e9fb3029f70dcded
This commit is contained in:
@@ -39,7 +39,7 @@ def main():
|
|||||||
launcher = ironic_service.process_launcher()
|
launcher = ironic_service.process_launcher()
|
||||||
server = wsgi_service.WSGIService('ironic_api', CONF.api.enable_ssl_api)
|
server = wsgi_service.WSGIService('ironic_api', CONF.api.enable_ssl_api)
|
||||||
launcher.launch_service(server, workers=server.workers)
|
launcher.launch_service(server, workers=server.workers)
|
||||||
launcher.wait()
|
sys.exit(launcher.wait())
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
@@ -67,7 +67,7 @@ def main():
|
|||||||
issue_startup_warnings(CONF)
|
issue_startup_warnings(CONF)
|
||||||
|
|
||||||
launcher = service.launch(CONF, mgr, restart_method='mutate')
|
launcher = service.launch(CONF, mgr, restart_method='mutate')
|
||||||
launcher.wait()
|
sys.exit(launcher.wait())
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
@@ -49,4 +49,4 @@ def main():
|
|||||||
wsgi = wsgi_service.WSGIService('ironic_api', CONF.api.enable_ssl_api)
|
wsgi = wsgi_service.WSGIService('ironic_api', CONF.api.enable_ssl_api)
|
||||||
launcher.launch_service(wsgi)
|
launcher.launch_service(wsgi)
|
||||||
|
|
||||||
launcher.wait()
|
sys.exit(launcher.wait())
|
||||||
|
5
releasenotes/notes/service-exit-77bcf3a538fab4bc.yaml
Normal file
5
releasenotes/notes/service-exit-77bcf3a538fab4bc.yaml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
fixes:
|
||||||
|
- |
|
||||||
|
Services (``ironic``, ``ironic-api``, ``ironic-conductor``) now correctly
|
||||||
|
return a non-zero exit code on start-up failures.
|
Reference in New Issue
Block a user