-
-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate Slurm to use rockylinux (#650)
* Migrate Slurm to use rockylinux * Revert resource changes
- Loading branch information
1 parent
37143f8
commit 9d4c371
Showing
4 changed files
with
211 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
if [ "$1" = "slurmdbd" ] | ||
then | ||
echo "---> Starting the MUNGE Authentication service (munged) ..." | ||
gosu munge /usr/sbin/munged | ||
|
||
echo "---> Starting the Slurm Database Daemon (slurmdbd) ..." | ||
|
||
{ | ||
. /etc/slurm/slurmdbd.conf | ||
until echo "SELECT 1" | mysql -h $StorageHost -u$StorageUser -p$StoragePass 2>&1 > /dev/null | ||
do | ||
echo "-- Waiting for database to become active ..." | ||
sleep 2 | ||
done | ||
} | ||
echo "-- Database is now active ..." | ||
|
||
exec gosu slurm /usr/sbin/slurmdbd -Dvvv | ||
fi | ||
|
||
if [ "$1" = "slurmctld" ] | ||
then | ||
echo "---> Starting the MUNGE Authentication service (munged) ..." | ||
gosu munge /usr/sbin/munged | ||
|
||
echo "---> Waiting for slurmdbd to become active before starting slurmctld ..." | ||
|
||
until 2>/dev/null >/dev/tcp/slurmdbd/6819 | ||
do | ||
echo "-- slurmdbd is not available. Sleeping ..." | ||
sleep 2 | ||
done | ||
echo "-- slurmdbd is now active ..." | ||
|
||
echo "---> Starting the Slurm Controller Daemon (slurmctld) ..." | ||
if /usr/sbin/slurmctld -V | grep -q '17.02' ; then | ||
exec gosu slurm /usr/sbin/slurmctld -Dvvv | ||
else | ||
exec gosu slurm /usr/sbin/slurmctld -i -Dvvv | ||
fi | ||
fi | ||
|
||
if [ "$1" = "slurmd" ] | ||
then | ||
echo "---> Starting the MUNGE Authentication service (munged) ..." | ||
gosu munge /usr/sbin/munged | ||
|
||
echo "---> Waiting for slurmctld to become active before starting slurmd..." | ||
|
||
until 2>/dev/null >/dev/tcp/slurmctld/6817 | ||
do | ||
echo "-- slurmctld is not available. Sleeping ..." | ||
sleep 2 | ||
done | ||
echo "-- slurmctld is now active ..." | ||
|
||
echo "---> Starting the Slurm Node Daemon (slurmd) ..." | ||
exec /usr/sbin/slurmd -Dvvv | ||
fi | ||
|
||
exec "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# | ||
# Example slurmdbd.conf file. | ||
# | ||
# See the slurmdbd.conf man page for more information. | ||
# | ||
# Archive info | ||
#ArchiveJobs=yes | ||
#ArchiveDir="/tmp" | ||
#ArchiveSteps=yes | ||
#ArchiveScript= | ||
#JobPurge=12 | ||
#StepPurge=1 | ||
# | ||
# Authentication info | ||
AuthType=auth/munge | ||
#AuthInfo=/var/run/munge/munge.socket.2 | ||
# | ||
# slurmDBD info | ||
DbdAddr=slurmdbd | ||
DbdHost=slurmdbd | ||
#DbdPort=6819 | ||
SlurmUser=slurm | ||
#MessageTimeout=300 | ||
DebugLevel=4 | ||
#DefaultQOS=normal,standby | ||
LogFile=/var/log/slurm/slurmdbd.log | ||
PidFile=/var/run/slurmdbd/slurmdbd.pid | ||
#PluginDir=/usr/lib/slurm | ||
#PrivateData=accounts,users,usage,jobs | ||
#TrackWCKey=yes | ||
# | ||
# Database info | ||
StorageType=accounting_storage/mysql | ||
StorageHost=mysql | ||
StorageUser=slurm | ||
StoragePass=password | ||
#StorageLoc=slurm_acct_db |