action #62606
openGENERAL_HW_POWEROFF_CMD broken with scripts if started from openQA
0%
Description
While using the generalhw
backend, I noticed that GENERAL_HW_POWEROFF_CMD
is broken with bash scripts, if started from openQA only.
If I start isotovideo
manually (out of openQA), with my own user, or geekotest
or _openqa-worker
users, with the same vars.json
file, it does work properly.
The error message is:
[2020-01-23T11:51:34.079 UTC] [debug] run_cmd: /var/lib/openqa/share/tests/opensuse/data/generalhw_scripts/power_off_tenma.sh
[2020-01-23T11:51:34.128 UTC] [debug] Backend process died, backend errors are reported below in the following lines:
exec failed: Permission denied at /usr/lib/os-autoinst/backend/generalhw.pm line 67.
at /usr/lib/os-autoinst/backend/generalhw.pm line 67.
at /usr/lib/os-autoinst/backend/generalhw.pm line 67.
The related code is at: https://github.com/os-autoinst/os-autoinst/blob/master/backend/generalhw.pm#L65
If I use an executable (tested /usr/bin/ls
), there is no problem.
I guess openQA context is different, but I have no clue how to fix this properly.
Updated by ggardet_arm almost 5 years ago
If I copy /usr/bin/ls
to /usr/bin/ls2
, I also get the permission denied whereas the perms are the same.
I think the problem could be the openQA apparmor profile.
Updated by ggardet_arm almost 5 years ago
Switching worker to complain mode, it does work properly.
But there are lots of new tools to add. Not sure how to handle this properly.
Updated by okurz over 4 years ago
- Project changed from openQA Tests to openQA Project
- Category changed from Bugs in existing tests to Feature requests
- Assignee set to ggardet_arm
just add the corresponding lines to https://github.com/os-autoinst/openQA/tree/master/profiles/apparmor.d