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

Spawner support for killing tasks #4994

Open
clebergnu opened this issue Sep 30, 2021 · 2 comments
Open

Spawner support for killing tasks #4994

clebergnu opened this issue Sep 30, 2021 · 2 comments
Assignees
Labels
customer:QEMU Requirements/issues raised by the QEMU project enhancement nrunner (previously nrun2run)

Comments

@clebergnu
Copy link
Contributor

Is your feature request related to a problem? Please describe.
The legacy "runner" architecture has the ability to kill tests, and its children. But, completely limited to processes. With the nrunner architecture, which relies on spawners to create and check on tasks, this feature does not exist.

Spawners have the ability to create tasks (reporting success or not), and check on their status, but nothing that allows tasks to be forcefully terminated.

When users have tests a current Avocado job running, and signal that they don't want to proceed any further, Avocado (nrunner) should, in addition to not spawn pending tasks, also attempt (best effort) to terminate existing ones.

Describe the solution you'd like
A new interface can be added to the Spanwer plugin interface, such as terminate_task(). For the process spawner, the implementation kill probably be similar to the existing legacy runner approach of sending SIGKILL/SIGTERM to the task process and its children. But for the Podman spawner, it can be as simple as killing (podman kill) the container itself (and thus the task running inside it would be killed too).

This is related to #4911, but it's considered an enhancement instead of a bug.

@clebergnu clebergnu added this to the #93 milestone Sep 30, 2021
@clebergnu clebergnu added this to Long Term Backlog in Avocado Kanban via automation Sep 30, 2021
@clebergnu clebergnu added the nrunner (previously nrun2run) label Sep 30, 2021
@clebergnu clebergnu self-assigned this Oct 27, 2021
@clebergnu clebergnu modified the milestones: #93, #94 Nov 8, 2021
@richtja richtja moved this from Long Term Backlog to Short Term Backlog in Avocado Kanban Nov 16, 2021
@clebergnu clebergnu moved this from Short Term Backlog to In progress in Avocado Kanban Dec 6, 2021
@richtja richtja modified the milestones: #94 Gran Torino, #95(TBD) Dec 20, 2021
@clebergnu clebergnu moved this from In progress to Short Term Backlog in Avocado Kanban Mar 16, 2022
@clebergnu
Copy link
Contributor Author

Adding the QEMU label, because this was partially motivated by tests leaving QEMU running.

@clebergnu clebergnu added the customer:QEMU Requirements/issues raised by the QEMU project label Mar 16, 2022
@clebergnu clebergnu moved this from Short Term Backlog to Long Term Backlog in Avocado Kanban Mar 16, 2022
@clebergnu clebergnu modified the milestones: #96 Nueve reinas, #97 TBD Apr 4, 2022
clebergnu added a commit to clebergnu/avocado that referenced this issue Apr 26, 2022
These tests are legacy runner specific, but their intedend feature
coverage makes sense for the nrunner.  Still, nrunner spawners are
currently lacking support for killing tasks.

Let's skip those tests until the feature is implemented.

Reference: avocado-framework#4994
Signed-off-by: Cleber Rosa <crosa@redhat.com>
clebergnu added a commit to clebergnu/avocado that referenced this issue Apr 27, 2022
These tests are legacy runner specific, but their intedend feature
coverage makes sense for the nrunner.  Still, nrunner spawners are
currently lacking support for killing tasks.

Let's skip those tests until the feature is implemented.

Reference: avocado-framework#4994
Signed-off-by: Cleber Rosa <crosa@redhat.com>
clebergnu added a commit to clebergnu/avocado that referenced this issue Apr 27, 2022
These tests are legacy runner specific, but their intedend feature
coverage makes sense for the nrunner.  Still, nrunner spawners are
currently lacking support for killing tasks.

Let's skip those tests until the feature is implemented.

Reference: avocado-framework#4994
Signed-off-by: Cleber Rosa <crosa@redhat.com>
@clebergnu clebergnu modified the milestones: #97 Dopesick, #98 May 6, 2022
@richtja richtja modified the milestones: #98 The Thing, #99 (TBD) Jul 12, 2022
@clebergnu clebergnu removed their assignment Oct 25, 2022
clebergnu added a commit to clebergnu/avocado that referenced this issue Oct 25, 2022
These tests are legacy runner specific, but their intedend feature
coverage makes sense for the nrunner.  Still, nrunner spawners are
currently lacking support for killing tasks.

Let's skip those tests until the feature is implemented.

Reference: avocado-framework#4994
Signed-off-by: Cleber Rosa <crosa@redhat.com>
@clebergnu
Copy link
Contributor Author

I'll re-evaluate this in terms of latest Avocado and QEMU.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer:QEMU Requirements/issues raised by the QEMU project enhancement nrunner (previously nrun2run)
Projects
Avocado Kanban
  
Long Term (Next Q) Backlog
Status: Long Term (Next Q) Backlog
Development

No branches or pull requests

2 participants