developer mode: error message just when clicking "Cancel job"
|Target version:||Current Sprint|
So far the user gets a not so nice error message that the connection to os-autoinst has been lost when the test finishes.
#5 Updated by mkittler about 1 year ago
Even with my previous idea this turns out to be hard to be implemented. So far I'm unable to prevent the command server from being interrupted until it informs the web socket clients.
Maybe I can also just delay showing the error message in the front-end. That would be a not nice solution but not sure whether messing with os-autoinst's IPC code is worth it.
#6 Updated by mkittler about 1 year ago
The code in isotovideo to terminate (and eventually kill) its subprocesses is only one way those subprocesses are terminated/killed. The worker-side also attempts to terminate/kill those subprocesses. Apparently we or better mudler re-implemented his own container here. That is why I had no success with extending the livetime of the command server to send some last command.
When working on that I come to the conclusion that we really need more documentation about the whole openQA architecture (not only specific packages and methods). It occupied me quite a while to reverse-engineer/understand what's happening here.
I find it also weird to have isotovideo itself taking care about its subprocess and terminating them also on the worker-side. Additionally, the use of
Mojo::IOLoop::ReadWriteProcess::Container is kind of subtitle considering its impact/implications.
To solve this issue I could adjust the worker so it doesn't try to terminate/kill isotovideo. Instead it sends a command to the command server which will then informs web socket clients and stops. The worker could still attempt to terminate/kill isotovideo if stopping via the command server didn't work. That way I would not have to touch any of the session/container code and just let that be the fallback.
#8 Updated by mkittler about 1 year ago
WIP branches for 2nd approach:
Right now I'm stuck because the HTTP request from the worker to os-autoinst command server does not work yet. Maybe @kraih can help when he's no longer sick.
#9 Updated by mkittler about 1 year ago
- Status changed from Feedback to In Progress
It should work now:
- PR for isotovideo and command server part: https://github.com/os-autoinst/os-autoinst/pull/1093
- PR for worker and UI part: https://github.com/os-autoinst/openQA/pull/1981