Commit 44b310a
committed
flux-perilog-run: do not drain ranks when job is canceled
Problem: When a user cancels a job while the prolog is running,
the prolog is canceled with a SIGTERM. This causes the flux-exec
tasks spawned by the flux-perilog-run --exec-per-rank option to be
terminated, which causes those ranks to be drained. Thus, a user can
cause nodes to be drained by canceling their job.
If an exec-per-rank process is terminated by a signal but wasn't
canceled by flux-perilog-run itself (i.e. proc.canceled is not True),
then assume the prolog was terminated and do not drain ranks. That is,
only drain ranks when subprocess returncode is between 0 and 129 to
account for shell-reported signal (128+n) or actual signal (-n).
Fixes #57341 parent 35c2c10 commit 44b310a
1 file changed
+7
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
178 | | - | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
179 | 181 | | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
180 | 186 | | |
181 | 187 | | |
182 | 188 | | |
| |||
0 commit comments