Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion checkbox-core-snap/series16/snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ parts:
################################################################################
plz-run:
plugin: go
source: https://gitlab.com/zygoon/plz-run.git
source: https://github.com/Hook25/plz-run.git
source-type: git
################################################################################
# Upstream: https://kernel.ubuntu.com/git/hwe/fwts.git/plain/snapcraft.yaml
Expand Down
2 changes: 1 addition & 1 deletion checkbox-core-snap/series18/snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ parts:
################################################################################
plz-run:
plugin: go
source: https://gitlab.com/zygoon/plz-run.git
source: https://github.com/Hook25/plz-run.git
source-type: git
################################################################################
# Upstream: https://github.com/fwts/fwts/blob/master/snapcraft.yaml
Expand Down
2 changes: 1 addition & 1 deletion checkbox-core-snap/series20/snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ parts:
################################################################################
plz-run:
plugin: go
source: https://gitlab.com/zygoon/plz-run.git
source: https://github.com/Hook25/plz-run.git
source-type: git
################################################################################
# Upstream: https://github.com/fwts/fwts/blob/master/snapcraft.yaml
Expand Down
2 changes: 1 addition & 1 deletion checkbox-core-snap/series22/snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ parts:
################################################################################
plz-run:
plugin: go
source: https://gitlab.com/zygoon/plz-run.git
source: https://github.com/Hook25/plz-run.git
build-snaps:
- go/latest/stable
################################################################################
Expand Down
2 changes: 1 addition & 1 deletion checkbox-core-snap/series24/snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ parts:
################################################################################
plz-run:
plugin: go
source: https://gitlab.com/zygoon/plz-run.git
source: https://github.com/Hook25/plz-run.git
build-snaps:
- go/latest/stable
################################################################################
Expand Down
2 changes: 1 addition & 1 deletion checkbox-ng/plainbox/impl/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ class DynamicSection(dict):
),
"systemd_based_job_runner": VarSpec(
bool,
False,
None,
"Run Checkbox jobs as a systemd unit escaping the snap sandbox",
),
},
Expand Down
2 changes: 1 addition & 1 deletion checkbox-ng/plainbox/impl/execution.py
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,7 @@ def get_execution_command_systemd_unit(
target_user,
]
if target_user != "root":
cmd += ["-pam", "systemd-login"]
cmd += ["-pam", "system-login"]
env = get_differential_execution_environment(
job, environ, session_id, nest_dir, extra_env
)
Expand Down
12 changes: 10 additions & 2 deletions checkbox-ng/plainbox/impl/session/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
from plainbox.impl.unit.job import JobDefinition
from plainbox.impl.unit.unit_with_id import UnitWithId
from plainbox.impl.unit.testplan import TestPlanUnitSupport
from plainbox.impl.unit.unit import on_ubuntucore
from plainbox.suspend_consts import Suspend
from plainbox.vendor import morris

Expand Down Expand Up @@ -178,16 +179,23 @@ def update_feature_flags(self, config):
self._flags.add(self.FLAG_FEATURE_STRICT_TEMPLATE_EXPANSION)
else:
logger.warning("Using legacy non-strict template expansion")
if config.get_value("features", "systemd_based_job_runner"):
systemd_based_job_runner = config.get_value(
"features", "systemd_based_job_runner"
)
if systemd_based_job_runner is None:
systemd_based_job_runner = on_ubuntucore()
if systemd_based_job_runner:
if shutil.which("plz-run"):
logger.warning("Using experimental systemd-based runner")
logger.info("Using systemd-based runner")
self._flags.add(self.FLAG_FEATURE_SYSTEMD_BASED_JOB_RUNNER)
else:
logger.error(
"Experimental systemd-based runner was requested but "
"required dependency plz-run is not installed"
)
logger.error("Falling back to shell based runner")
else:
logger.info("Using subprocess-based runner")

@property
def flags(self):
Expand Down
Loading