Skip to content

Commit 50a682f

Browse files
gmarcianihanwen-cluster
authored andcommitted
[Shutdown] 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 6d36830 commit 50a682f

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This file is used to list changes made in each version of the aws-parallelcluste
77
------
88

99
**CHANGES**
10-
- There were no changes for this version.
10+
- Kill slurmd and slurmstepd before shutdown to prevent the shutdown hanging on those processing be running.
1111

1212
3.12.0
1313
------

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)