Skip to content

Commit c9ef04f

Browse files
author
Himani Anil Deshpande
committed
[SlurmDbd] Adding a message to make sure that we do not use # in Database Password
1 parent 6eda378 commit c9ef04f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cookbooks/aws-parallelcluster-slurm/templates/default/slurm/head_node/update_slurm_database_password.sh.erb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ fi
3030
echo "Reading password from AWS Secrets Manager: ${SECRET_ARN}"
3131
password_from_secrets_manager=$(aws secretsmanager get-secret-value --secret-id ${SECRET_ARN} --region ${REGION} --query 'SecretString' --output text)
3232

33+
if [[ "${password_from_secrets_manager}" =~ '#' ]]; then
34+
echo "You cannot use the # character in the database password as Slurm does not support it with $SLURMDBD_PROPERTY configuration paramter in $SLURMDBD_CONFIG_FILE. You can get more details in https://slurm.schedmd.com/slurmdbd.conf.html"
35+
exit 1
36+
fi
37+
3338
[ "${password_from_dbd_config}" == "${password_from_secrets_manager}" ] && echo "Password match, skipping update" && exit 0
3439

3540
echo "Writing AWS Secrets Manager password to ${SLURMDBD_CONFIG_FILE}"

0 commit comments

Comments
 (0)