Skip to content
Snippets Groups Projects
Commit 895d55cb authored by Morris Jette's avatar Morris Jette
Browse files

Disable test if not configured to support

Disable testing of QOS and association limits if the Slurm installation
lacks the configuration to support them.
parent 771d788e
No related branches found
No related tags found
No related merge requests found
...@@ -1179,6 +1179,39 @@ proc test_enforce_safe_set { } { ...@@ -1179,6 +1179,39 @@ proc test_enforce_safe_set { } {
return $enforce_limits return $enforce_limits
} }
################################################################
#
# Proc: test_enforce_qos_set
#
# Purpose: Determine if AccountingStorageEnforce=qos is set in the slurm.conf.
#
# Returns 1 if the system is running with safe limits, 0 otherwise
#
################################################################
proc test_enforce_qos_set { } {
global alpha_numeric_comma scontrol
log_user 0
set enforce_limits 0
spawn $scontrol show config
expect {
-re "AccountingStorageEnforce *= ($alpha_numeric_comma)" {
if {[string first "qos" $expect_out(1,string)] != -1 } {
set enforce_limits 1
}
exp_continue
}
eof {
wait
}
}
log_user 1
return $enforce_limits
}
################################################################ ################################################################
# #
# Proc: test_using_slurmdbd # Proc: test_using_slurmdbd
......
...@@ -56,9 +56,17 @@ if { [test_using_slurmdbd] == 0 } { ...@@ -56,9 +56,17 @@ if { [test_using_slurmdbd] == 0 } {
send_user "\nWARNING: This test can't be run without AccountStorageType=slurmdbd\n" send_user "\nWARNING: This test can't be run without AccountStorageType=slurmdbd\n"
exit 0 exit 0
} }
if { [test_enforce_limits] == 0 } {
send_user "\nWARNING: This test can't be run without AccountingStorageEnforce=limits\n"
exit 0
}
if { [test_enforce_qos_set] == 0 } {
send_user "\nWARNING: This test can't be run without AccountingStorageEnforce=qos\n"
exit 0
}
if {$node_cnt <= 1} { if {$node_cnt <= 1} {
send_user "\nWARNING: cluster has too few nodes\n" send_user "\nWARNING: cluster has too few nodes ($node_cnt <= 1)\n"
exit $exit_code exit $exit_code
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment