diff --git a/src/slurmctld/job_mgr.c b/src/slurmctld/job_mgr.c index 7c89e61d88e6da6e8deb9d8e45ef3fc3d086faf2..ec17713a319816b5f2dcb744d2a8d1e5046df826 100644 --- a/src/slurmctld/job_mgr.c +++ b/src/slurmctld/job_mgr.c @@ -6135,7 +6135,11 @@ extern int job_requeue (uid_t uid, uint32_t job_id, slurm_fd conn_fd) rc = ESLURM_ALREADY_DONE; goto reply; } - if ((job_ptr->details == NULL) || (job_ptr->details->requeue == 0)) { + if (job_ptr->details == NULL) { + /* NOTE: the job_ptr->details->requeue value is only + * used for automatic job requeue after a node failure. + * It does not apply when a job requeue is explicitly + * requested. */ rc = ESLURM_DISABLED; goto reply; } diff --git a/testsuite/expect/test3.8 b/testsuite/expect/test3.8 index 9222eab84a87c43fb68d69ea5076a820d23f7640..a0bb018faeecb91b7e3de562901ebf21bac06b4e 100755 --- a/testsuite/expect/test3.8 +++ b/testsuite/expect/test3.8 @@ -177,80 +177,6 @@ if {[file exists $file_flag_4]} { set exit_code 1 } -# -# Now run the same test, but with job requeue disabled via the -# srun --no-requeue option -# -set job_id 0 - -exec $bin_rm -f $file_flag_1 $file_flag_2 $file_flag_3 $file_flag_4 - -set sbatch_pid [spawn $sbatch --no-requeue --output=$file_out --error=$file_err -t1 $file_in] -expect { - -re "Submitted batch job ($number)" { - set job_id $expect_out(1,string) - exp_continue - } - timeout { - send_user "\nFAILURE: srun not responding\n" - slow_kill $sbatch_pid - set exit_code 1 - } - eof { - wait - } -} -if {$job_id == 0} { - send_user "\nFAILURE: batch submit failure\n" - exit 1 -} - -# -# Wait for job to begin, then requeue it -# -if {[wait_for_job $job_id "RUNNING"] != 0} { - send_user "\nFAILURE: waiting for job to begin\n" - set exit_code 1 -} -set disabled 0 -exec $bin_sleep 5 -spawn $scontrol requeue $job_id -expect { - -re "error.*disabled" { - set disabled 1 - send_user "This error was expected, no worries\n" - exp_continue - } - timeout { - send_user "\nFAILURE: scontrol not responding\n" - set exit_code 1 - } - eof { - wait - } -} -if {$disabled == 0} { - send_user "\nFAILURE: srun's --no-requeue option ignored\n" - set exit_code 1 -} - -# -# Wait for job to complete and check for files -# -if {[wait_for_job $job_id "DONE"] != 0} { - send_user "\nFAILURE: waiting for job to complete\n" - set exit_code 1 -} -if {[wait_for_file $file_flag_1] != 0} { - send_user "\nFAILURE: file $file_flag_1 is missing\n" - set exit_code 1 -} -if {[file exists $file_flag_2]} { - send_user "\nFAILURE: file $file_flag_2 is found\n" - set exit_code 1 -} - - if {$exit_code == 0} { exec $bin_rm -f $file_in $file_out $file_err exec $bin_rm -f $file_flag_1 $file_flag_2 $file_flag_3 $file_flag_4