Skip to content
Snippets Groups Projects
Commit e1a84fca authored by Danny Auble's avatar Danny Auble
Browse files

altered account function to not run every time

parent 2c0c0ec8
No related branches found
No related tags found
No related merge requests found
...@@ -984,40 +984,44 @@ proc is_super_user { } { ...@@ -984,40 +984,44 @@ proc is_super_user { } {
# #
# #
################################################################ ################################################################
set found(13) 1 proc check_acct_associations { options } {
send_user [info exists found(13)] global sacctmgr number
send_user "\n"
# set rc 1
# Use sacctmgr to create a cluster set found(13) 1
# send_user [info exists found(13)]
set sadd_pid [spawn $sacctmgr -n -p list assoc format=lft,rgt cluster=clus1] send_user "\n"
expect { #
-re "($number)\\|($number)\\|" { # Use sacctmgr to check associations
set num1 $expect_out(1,string) #
set num2 $expect_out(2,string) set s_pid [spawn $sacctmgr -n -p list assoc format=lft,rgt $options]
set first [info exists found($num1)] expect {
set sec [info exists found($num2)] -re "($number)\\|($number)\\|" {
#send_user "$first=$num1 $sec=$num2\n"; set num1 $expect_out(1,string)
if { $first } { set num2 $expect_out(2,string)
send_user "\nFAILURE: NO BUENO.found $num1 again\n" set first [info exists found($num1)]
set exit_code 1 set sec [info exists found($num2)]
} elseif { $sec } { #send_user "$first=$num1 $sec=$num2\n";
send_user "\nFAILURE: NO BUENO.found $num2 again\n" if { $first } {
set exit_code 1 send_user "\nFAILURE: found lft $num1 again\n"
} else { set rc 1
set found($num1) 1 } elseif { $sec } {
set found($num2) 1 send_user "\nFAILURE: found rgt $num2 again\n"
} set rc 1
exp_continue } else {
} set found($num1) 1
timeout { set found($num2) 1
send_user "\nFAILURE: sacctmgr add not responding\n" }
slow_kill $sadd_pid exp_continue
set exit_code 1 }
} timeout {
eof { send_user "\nFAILURE: sacctmgr add not responding\n"
wait slow_kill $s_pid
} set exit_code 1
}
eof {
wait
}
}
return $rc
} }
exit;
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