Steps to replicate the issue (include links if applicable):
- restart a continuous running command by the following command
- toolforge jobs restart <jobname>
What happens?:
For a short period of time (~15-30 seconds) the "old" jobs still runs in parallel with the new restarted job
What should have happened instead?:
There shall only run one job with the same name at a time
I used this small script
#!/bin/bash outfile=/data/project/persondata/logs/testout.out echo "Process started" >>$outfile while `true` do date >>$outfile uname -a >>$outfile sleep 2 done
Then on the commandline I started a job like
toolforge jobs run --command '~/playground/continuous.sh' --image php8.2 -o --continuous test
half a minute later I restarted the job:
toolforge jobs restart test
and another 30 later deleted it
The following could be seen in the file /data/project/persondata/logs/testout.out
Please not: After the line "Process started" in the middle of the file, you see two hostnames: Linux test-bf66c58b8-7f8br and Linux test-bf66c58b8-xsjl9
Process started Mon Sep 23 08:26:34 AM UTC 2024 Linux test-bf66c58b8-xsjl9 6.1.0-25-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.106-3 (2024-08-26) x86_64 GNU/Linux Mon Sep 23 08:26:36 AM UTC 2024 … Mon Sep 23 08:26:59 AM UTC 2024 Linux test-bf66c58b8-xsjl9 6.1.0-25-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.106-3 (2024-08-26) x86_64 GNU/Linux Mon Sep 23 08:27:01 AM UTC 2024 Linux test-bf66c58b8-xsjl9 6.1.0-25-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.106-3 (2024-08-26) x86_64 GNU/Linux Process started Mon Sep 23 08:27:01 AM UTC 2024 Linux test-bf66c58b8-7f8br 6.1.0-25-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.106-3 (2024-08-26) x86_64 GNU/Linux Mon Sep 23 08:27:03 AM UTC 2024 Linux test-bf66c58b8-xsjl9 6.1.0-25-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.106-3 (2024-08-26) x86_64 GNU/Linux Mon Sep 23 08:27:03 AM UTC 2024 Linux test-bf66c58b8-7f8br 6.1.0-25-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.106-3 (2024-08-26) x86_64 GNU/Linux Mon Sep 23 08:27:05 AM UTC 2024 Mon Sep 23 08:27:05 AM UTC 2024 Linux test-bf66c58b8-7f8br 6.1.0-25-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.106-3 (2024-08-26) x86_64 GNU/Linux Linux test-bf66c58b8-xsjl9 6.1.0-25-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.106-3 (2024-08-26) x86_64 GNU/Linux Mon Sep 23 08:27:07 AM UTC 2024 Mon Sep 23 08:27:07 AM UTC 2024 Linux test-bf66c58b8-7f8br 6.1.0-25-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.106-3 (2024-08-26) x86_64 GNU/Linux Linux test-bf66c58b8-xsjl9 6.1.0-25-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.106-3 (2024-08-26) x86_64 GNU/Linux Mon Sep 23 08:27:09 AM UTC 2024 Mon Sep 23 08:27:09 AM UTC 2024 Linux test-bf66c58b8-7f8br 6.1.0-25-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.106-3 (2024-08-26) x86_64 GNU/Linux Linux test-bf66c58b8-xsjl9 6.1.0-25-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.106-3 (2024-08-26) x86_64 GNU/Linux Mon Sep 23 08:27:11 AM UTC 2024 Mon Sep 23 08:27:11 AM UTC 2024 Linux test-bf66c58b8-7f8br 6.1.0-25-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.106-3 (2024-08-26) x86_64 GNU/Linux Linux test-bf66c58b8-xsjl9 6.1.0-25-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.106-3 (2024-08-26) x86_64 GNU/Linux Mon Sep 23 08:27:13 AM UTC 2024 Mon Sep 23 08:27:13 AM UTC 2024 Linux test-bf66c58b8-xsjl9 6.1.0-25-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.106-3 (2024-08-26) x86_64 GNU/Linux Linux test-bf66c58b8-7f8br 6.1.0-25-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.106-3 (2024-08-26) x86_64 GNU/Linux Mon Sep 23 08:27:15 AM UTC 2024 Linux test-bf66c58b8-7f8br 6.1.0-25-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.106-3 (2024-08-26) x86_64 GNU/Linux Mon Sep 23 08:27:17 AM UTC 2024 Linux test-bf66c58b8-7f8br 6.1.0-25-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.106-3 (2024-08-26) x86_64 GNU/Linux Mon Sep 23 08:27:19 AM UTC 2024 Linux test-bf66c58b8-7f8br 6.1.0-25-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.106-3 (2024-08-26) x86_64 GNU/Linux …