Merge ~sylvain-pineau/checkbox-ng:remote-deb-restart-strategy into checkbox-ng:master
Status: | Merged |
---|---|
Approved by: | Sylvain Pineau |
Approved revision: | 3e48104d8cc1b000a7b1d4ac8f02ff1334989ef6 |
Merged at revision: | 4ce0831a45a72cf1c36a41f4fdad49f34e944ead |
Proposed branch: | ~sylvain-pineau/checkbox-ng:remote-deb-restart-strategy |
Merge into: | checkbox-ng:master |
Diff against target: |
318 lines (+105/-25) 6 files modified
checkbox_ng/launcher/slave.py (+14/-2) plainbox/impl/ctrl.py (+1/-1) plainbox/impl/execution.py (+5/-2) plainbox/impl/session/assistant.py (+29/-11) plainbox/impl/session/remote_assistant.py (+18/-6) plainbox/impl/session/restart.py (+38/-3) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jonathan Cave (community) | Approve | ||
Review via email: mp+381568@code.launchpad.net |
Description of the change
I'd like to abuse the current API bump already in master to propose support for a new kind of restart strategy, RemoteDebRestar
This patchset will allow jobs mainly based on p-p-c pm_test script to run via remote. To replicate the pure local invocation, the slave service is disabled when a noreturn flag is set in the job definition and reactivated via the restart command callback written in the __respawn magic file.
In order to work such jobs running as root over remote require more than the DISPLAY env var, they do need access to the running X server via XAUTHORITY. The extra env is now including this var and sent to the runner.
The same env also contains the NORMAL_USER set in launcher as scripts like pm_test which run `sudo --user` but now miss vars like SUDO_ID.
Tested using the following launcher on two 18.04 desktops:
[launcher]
app_id = com.canonical.
launcher_version = 1
stock_reports = text, submission_files
[test plan]
#unit = com.canonical.
unit = com.canonical.
#unit = com.canonical.
forced = yes
[test selection]
forced = no
[ui]
output = hide-resource-
[daemon]
normal_user = u
[environment]
STRESS_
STRESS_
STRESS_
LGTM