diff --git a/src/srun/allocate.c b/src/srun/allocate.c index 49af546e3e1bbdfc3c6c11d6f4c8f00e8e655b69..4925466738e6e367c0902c053668d06415b0ef98 100644 --- a/src/srun/allocate.c +++ b/src/srun/allocate.c @@ -126,6 +126,8 @@ static void _signal_while_allocating(int signo) destroy_job = 1; if (pending_job_id != 0) { slurm_complete_job(pending_job_id, NO_VAL); + info("Job allocation %u has been revoked.", pending_job_id); + } } @@ -438,6 +440,8 @@ allocate_nodes(void) /* create message thread to handle pings and such from slurmctld */ msg_thr = slurm_allocation_msg_thr_create(&j->other_port, &callbacks); + /* NOTE: Do not process signals in separate pthread. The signal will + * cause slurm_allocate_resources_blocking() to exit immediately. */ xsignal_unblock(sig_array); for (i = 0; sig_array[i]; i++) xsignal(sig_array[i], _signal_while_allocating); @@ -448,7 +452,7 @@ allocate_nodes(void) if (destroy_job) { /* cancelled by signal */ break; - } else if(!resp && !_retry()) { + } else if (!resp && !_retry()) { break; } } diff --git a/testsuite/expect/test1.64 b/testsuite/expect/test1.64 index 86e0d6bb311a7fbd66486b2d56bde7e1f8263575..e49a71e73e4dd7427529f34dcb5d417613c3f972 100755 --- a/testsuite/expect/test1.64 +++ b/testsuite/expect/test1.64 @@ -56,7 +56,7 @@ expect { send_user "\nSent SIGINT\n" exp_continue } - -re "Terminated job" { + -re "Job allocation ($number) has been revoked" { incr matches exp_continue }