Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

job-timeout not working with nrunner #5295

Closed
beraldoleal opened this issue Mar 25, 2022 · 0 comments · Fixed by #5530
Closed

job-timeout not working with nrunner #5295

beraldoleal opened this issue Mar 25, 2022 · 0 comments · Fixed by #5530
Assignees
Labels

Comments

@beraldoleal
Copy link
Member

beraldoleal commented Mar 25, 2022

Describe the bug
--job-timeout option is not working when using the new runner.

Steps to reproduce

$ cat /tmp/test.sh
#!/bin/bash
sleep 2
$ avocado run --job-timeout=1 /tmp/test.sh 
JOB ID     : a76b3d11917d2749f0126a9bc71ac63516caaae8
JOB LOG    : /home/local/avocado/job-results/job-2022-03-25T15.36-a76b3d1/job.log
 (1/1) /tmp/test.sh: STARTED

RESULTS    : PASS 0 | ERROR 0 | FAIL 0 | SKIP 1 | WARN 0 | INTERRUPT 0 | CANCEL 0
_GatheringFuture exception was never retrieved
future: <_GatheringFuture finished exception=CancelledError()>
concurrent.futures._base.CancelledError
JOB HTML   : /home/local/avocado/job-results/job-2022-03-25T15.36-a76b3d1/results.html
JOB TIME   : 1.76 s

Expected behavior

 avocado run --test-runner='runner' --job-timeout=1 /tmp/test.sh
JOB ID     : 1e009d0b2feec331b20e1f906eb868f426e1e7c0
JOB LOG    : /home/local/avocado/job-results/job-2022-03-25T15.36-1e009d0/job.log
 (1/1) /tmp/test.sh: STARTED
\ (1/1) /tmp/test.sh: INTERRUPTED: Test interrupted by SIGTERM\nRunner error occurred: Timeout reached\nOriginal status: ERROR\n{'name': '1-/tmp/test.sh', 'logdir': '/home/local/avocado/job-results/job-2022-03-25T15.36-1e009d0', 'logfile': '/home/local/avocado/job-results/job-2022-03-25T15.36... (1.09 s)
RESULTS    : PASS 0 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 1 | CANCEL 0
JOB HTML   : /home/local/avocado/job-results/job-2022-03-25T15.36-1e009d0/results.html
JOB TIME   : 1.52 s

Current behavior
Vide reproducible

System information (please complete the following information):

  • OS: ```LSB Version: :core-4.1-amd64:core-4.1-noarch
    Distributor ID: Fedora
    Description: Fedora release 34 (Thirty Four)
    Release: 34
    Codename: ThirtyFour
 - Avocado version: master
 - Avocado installation method:  github/venv
 
**Additional information**
Add any other information about the problem here. Test details can be added here.
@beraldoleal beraldoleal added bug nrunner (previously nrun2run) triage labels Mar 25, 2022
@beraldoleal beraldoleal added this to the #96 Nueve reinas milestone Mar 25, 2022
@clebergnu clebergnu modified the milestones: #96 Nueve reinas, #97 TBD Apr 4, 2022
beraldoleal added a commit to beraldoleal/avocado that referenced this issue Apr 10, 2022
Currently we cannot count on any test based on the legacy runner, as it
is in a disassembly state. Those in particular can't be migrated because
issue avocado-framework#5295. Keeping those tests running on partially broken legacy
runner is not desired.

Signed-off-by: Beraldo Leal <bleal@redhat.com>
TasmiyaNalatwad pushed a commit to TasmiyaNalatwad/avocado that referenced this issue Apr 20, 2022
Currently we cannot count on any test based on the legacy runner, as it
is in a disassembly state. Those in particular can't be migrated because
issue avocado-framework#5295. Keeping those tests running on partially broken legacy
runner is not desired.

Signed-off-by: Beraldo Leal <bleal@redhat.com>
@clebergnu clebergnu modified the milestones: #97 Dopesick, #98 May 9, 2022
This was referenced Jun 3, 2022
@richtja richtja modified the milestones: #98 The Thing, #99 (TBD) Jul 12, 2022
richtja added a commit to richtja/avocado that referenced this issue Nov 28, 2022
This commit adds a mechanism for terminating running tasks after the job
reaches its timeout.

Reference: avocado-framework#5295
Signed-off-by: Jan Richter <jarichte@redhat.com>
@richtja richtja self-assigned this Nov 28, 2022
@richtja richtja linked a pull request Nov 28, 2022 that will close this issue
richtja added a commit to richtja/avocado that referenced this issue Nov 29, 2022
This commit adds a mechanism for terminating running tasks after the job
reaches its timeout.

Reference: avocado-framework#5295
Signed-off-by: Jan Richter <jarichte@redhat.com>
richtja added a commit to richtja/avocado that referenced this issue Dec 2, 2022
This commit adds a mechanism for terminating running tasks after the job
reaches its timeout.

Reference: avocado-framework#5295
Signed-off-by: Jan Richter <jarichte@redhat.com>
richtja added a commit to richtja/avocado that referenced this issue Jul 14, 2023
This will remove unsystematic timeout inside avocado-instrumented
runner. This timeout has been set to 24 hours and users haven't had a
way how to change it. Because we solved problems with
`task.timeout.running` in avocado-framework#5383 and `job-timeout` in avocado-framework#5295 this default
timeout is not needed anymore. After this change, the users will have
more power over timeouts and will be able to run instrumented tests
longer than 24 hours.

Reference: avocado-framework#5394
Signed-off-by: Jan Richter <jarichte@redhat.com>
richtja added a commit to richtja/avocado that referenced this issue Jul 17, 2023
This will remove unsystematic timeout inside avocado-instrumented
runner. This timeout has been set to 24 hours and users haven't had a
way how to change it. Because we solved problems with
`task.timeout.running` in avocado-framework#5383 and `job-timeout` in avocado-framework#5295 this default
timeout is not needed anymore. After this change, the users will have
more power over timeouts and will be able to run instrumented tests
longer than 24 hours.

Reference: avocado-framework#5394
Signed-off-by: Jan Richter <jarichte@redhat.com>
richtja added a commit to richtja/avocado that referenced this issue Aug 28, 2023
This will remove unsystematic timeout inside avocado-instrumented
runner. This timeout has been set to 24 hours and users haven't had a
way how to change it. Because we solved problems with
`task.timeout.running` in avocado-framework#5383 and `job-timeout` in avocado-framework#5295 this default
timeout is not needed anymore. After this change, the users will have
more power over timeouts and will be able to run instrumented tests
longer than 24 hours.

Reference: avocado-framework#5394
Signed-off-by: Jan Richter <jarichte@redhat.com>
maramsmurthy pushed a commit to maramsmurthy/avocado that referenced this issue Sep 6, 2023
This commit adds a mechanism for terminating running tasks after the job
reaches its timeout.

Reference: avocado-framework#5295
Signed-off-by: Jan Richter <jarichte@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants