Project

General

Profile

action #62606

GENERAL_HW_POWEROFF_CMD broken with scripts if started from openQA

Added by ggardet_arm over 1 year ago. Updated 12 months ago.

Status:
New
Priority:
Normal
Assignee:
Category:
Feature requests
Target version:
Start date:
2020-01-23
Due date:
% Done:

0%

Estimated time:
Difficulty:

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.

History

#1 Updated by ggardet_arm over 1 year ago

If I copy /usr/bin/lsto /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.

#2 Updated by ggardet_arm over 1 year 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.

#3 Updated by okurz over 1 year ago

  • Project changed from openQA Tests to openQA Project
  • Category changed from Bugs in existing tests to Feature requests
  • Assignee set to ggardet_arm

#4 Updated by okurz 12 months ago

  • Target version set to future

Also available in: Atom PDF