Skip to content

Commit 16b3724

Browse files
committed
Kill slurmd and slurmstepd before shutting down to prevent shutdown hanging on these running processes, which is an unexpected behaviour observed in Ubuntu24.04.
1 parent 57f8c87 commit 16b3724

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/slurm_plugin/computemgtd.py

+4
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,10 @@ def _self_terminate():
131131
# Sleep for 10 seconds so termination log entries are uploaded to CW logs
132132
log.info("Preparing to self terminate the instance in 10 seconds!")
133133
time.sleep(10)
134+
log.info("Killing slurm processes")
135+
# TOFIX WORKAROUND: We kill Slurm processes because we observed in 3.13.0 on Ubuntu24.04
136+
# that the shutdown hangs waiting for these processes to terminate.
137+
run_command("sudo killall -9 --quiet slurmd slurmstepd")
134138
log.info("Self terminating instance now!")
135139
run_command("sudo shutdown -h now")
136140

0 commit comments

Comments
 (0)