manager: kill UI when manager failed to start

pull/23690/head
Adeeb Shihadeh 2022-02-01 11:06:32 -08:00
parent b98b583cc6
commit edcee81796
1 changed files with 5 additions and 0 deletions

View File

@ -216,6 +216,11 @@ if __name__ == "__main__":
add_file_handler(cloudlog)
cloudlog.exception("Manager failed to start")
try:
managed_processes['ui'].stop()
except Exception:
pass
# Show last 3 lines of traceback
error = traceback.format_exc(-3)
error = "Manager failed to start\n\n" + error