Skip to content

Commit 334805d

Browse files
committed
automatically delete/create node with correct info
1 parent 4ed0854 commit 334805d

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

image/docker-entrypoint.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,12 @@ then
7777
done
7878
echo "-- slurmctld is now active ..."
7979

80-
echo "---> Adding myself to node definitions ..."
81-
SLURMD_CONFIG=$(slurmd -C | head --lines 1)
82-
echo ${SLURMD_CONFIG}
83-
scontrol create ${SLURMD_CONFIG} State=FUTURE
80+
echo "---> Updating node definitions ..."
81+
SCONTROL_NODE=$(scontrol show node=$HOSTNAME)
82+
if [[ $? == 0 ]]; then # have an existing node definition
83+
scontrol delete node=$HOSTNAME
84+
fi
85+
scontrol create $(slurmd -C | head -n1) State=FUTURE
8486

8587
echo "---> Starting the Slurm Node Daemon (slurmd) ..."
8688
exec /usr/sbin/slurmd -D "${@:2}"

0 commit comments

Comments
 (0)