Skip to content

Commit

Permalink
automatically delete/create node with correct info
Browse files Browse the repository at this point in the history
  • Loading branch information
sjpb committed Aug 16, 2023
1 parent 4ed0854 commit 334805d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions image/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,12 @@ then
done
echo "-- slurmctld is now active ..."

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

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

0 comments on commit 334805d

Please sign in to comment.