Commit c2feeef
Wait for startup to complete before running shutdown
If PrepareForShutdown fires while Supervisor is still starting up,
wait for startup to complete before running the graceful shutdown
sequence. This prevents shutting down partially initialized
containers and services.
The _startup_complete event is set automatically in set_state()
whenever state transitions to RUNNING. If SIGTERM arrives during
startup, core.stop() cancels the monitor task via host.unload(),
cleanly interrupting the wait.
Co-Authored-By: Claude Opus 4.6 <[email protected]>1 parent 3b2e4c7 commit c2feeef
1 file changed
+10
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| |||
82 | 83 | | |
83 | 84 | | |
84 | 85 | | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
85 | 89 | | |
86 | 90 | | |
87 | 91 | | |
| |||
360 | 364 | | |
361 | 365 | | |
362 | 366 | | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
363 | 373 | | |
364 | 374 | | |
365 | 375 | | |
| |||
0 commit comments