You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
--keep-on-error is ignored for failed --mpi cohorts, and the CLI reports an already-terminated instance as kept #1509
CloudTrail TerminateInstances calls, both made by the spawn CLI's own credentials:
2026-11-02T20:36:55Z i-034180ce1059913a6 <- the instance reported as "kept"
2026-11-02T20:36:56Z i-04cff432582e83c5d <- the drain
Both members were terminated when the command returned. Two other problems show in the same output:
"after creating 1 instance(s)": 2 were created. The run without --keep-on-error printed the same miscount.
The cohort itself terminated i-034180ce1059913a6, the cancelled survivor, before the guard ran. So guard.live() still listed it, and the message named it as kept.
Cause (code)
cmd/launch_jobarray.go (~L840): the cohort-failure path always calls drainJobArray, whatever keepOnError is. The comment calls that deliberate ("Always draining is the only defensible default").
fleetGuard.finish (cmd/launch_fleet.go ~L318) then prints "keeping them" for whatever is left in live(). That list includes instances the cohort terminated without marking them gone.
Impact
The failure is on the safe side: nothing leaks. But the help text promises "For a job array or sweep, keep every member when the launch fails part way", and for --mpi that isn't true. This blocks diagnosis, because you can't keep a failed MPI node to read its cloud-init log, and that's exactly when you'd pass the flag. The "kept" message also tells the user to spawn terminate an instance that is already gone.
Expected
Either honour --keep-on-error for MPI cohort failures, skipping the drain and the cohort's survivor cancel, or refuse/warn that it has no effect with --mpi. Either way, only name an instance as kept if it is still live.
Activity