-
Notifications
You must be signed in to change notification settings - Fork 343
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
Restore LXC spawner task output path handling #5674
Conversation
Before this adaptation we get simple avocado runs to result in ``` [root@c5 site-packages]# avocado run --status-server-disable-auto --spawner=lxc -- /bin/true JOB ID : 937ec5bb7275feabd48fcf5b5b315ad2cd2b63fc JOB LOG : /mnt/local/results/job-2023-05-02T22.51-937ec5b/job.log (1/1) /bin/true: STARTED (1/1) /bin/true: ERROR: [Errno 2] No such file or directory: '/mnt/local/results/job-2023-05-02T22.51-937ec5b/test-results/1-_bin_true/stdout' (0.00 s) RESULTS : PASS 0 | ERROR 1 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0 JOB HTML : /mnt/local/results/job-2023-05-02T22.51-937ec5b/results.html JOB TIME : 2.69 s ``` while after this fix we finally get ``` [root@c5 site-packages]# avocado run --status-server-disable-auto --spawner=lxc -- /bin/true JOB ID : 1b736d172710a2d0d85d63b181cd65d0bc8ff518 JOB LOG : /mnt/local/results/job-2023-05-02T22.54-1b736d1/job.log (1/1) /bin/true: STARTED (1/1) /bin/true: PASS (0.01 s) RESULTS : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0 JOB HTML : /mnt/local/results/job-2023-05-02T22.54-1b736d1/results.html JOB TIME : 2.66 s ``` Note that all of this requires mounting the results directory into the LXC container, similarly to the way it is done for podman containers. Signed-off-by: Plamen Dimitrov <[email protected]>
This pull request addresses parts of #5666. |
Interestingly the previous diff worked just fine for me for years now using LXC containers. Turns out the reason was that the Avocado I2N plugin was providing @richtja I can see Avocado VT has the def _parameters_to_runnable(self, params):
params = self.convert_parameters(params)
uri = params.get('name')
vt_params = params.get('vt_params')
# Flatten the vt_params, discarding the attributes that are not
# scalars, and will not be used in the context of nrunner
for key in ('_name_map_file', '_short_name_map_file', 'dep'):
if key in vt_params:
del(vt_params[key])
return Runnable('avocado-vt', uri, **vt_params) However, I fail to understand where is this |
Hi @pevogam if you can see But, I did some changes to |
In fact I didn't phrase my wording well enough - I meant that I cannot find it anywhere in our configs and is also missing during the test run resulting in
I guess you mean some part of the code of the default avocado scheduler since the |
Avocado VT is not setting |
Then I assume you imply that Avocado VT uses |
Yes I expect that avocado-vt uses |
Ok, this all makes sense then. The way I fix it in our scheduling then is by adding the line: raw_task = Task(node.get_runnable(), node.id_test,
[job.config.get('run.status_server_uri')],
category=TASK_DEFAULT_CATEGORY,
job_id=self.job.unique_id)
+ raw_task.runnable.output_dir = os.path.join(job.test_results_path,
+ raw_task.identifier.str_filesystem)
task = RuntimeTask(raw_task)
if spawner == "lxc":
task.spawner_handle = host
elif spawner == "remote":
task.spawner_handle = node.get_session_to_net()
self.tasks += [task] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks.
Before this adaptation we get simple avocado runs to result in
while after this fix we finally get
Note that all of this requires mounting the results directory into the LXC container, similarly to the way it is done for podman containers.