Bug#1065174: incus: VM agent isn't injected if /etc/environment sets PATH

2024-03-04 Thread Mathias Gibbens
Control: tags -1 + confirmed pending

  Thanks for the report -- I've moved setting $PATH from the service
files to /etc/default/incus which is then read in via another
EnvironmentFile statement.
https://salsa.debian.org/go-team/packages/incus/-/commit/33e55353824a7bb0781f362ae3babb8932d84fef

Mathias


signature.asc
Description: This is a digitally signed message part


Bug#1065174: incus: VM agent isn't injected if /etc/environment sets PATH

2024-03-01 Thread Colin Watson
Package: incus
Version: 0.6-1
Severity: normal

If /etc/environment sets PATH (as is the case by default in Ubuntu, but
it's possible users have done this too), then the changes in
https://salsa.debian.org/go-team/packages/incus/-/commit/0048583bbb4d10f86cb402b9c51b8660afaf5402
to incus.service and incus-user.service to add /usr/libexec/incus to
PATH don't work, because EnvironmentFile= overrides Environment= (see
systemd.exec(5)).

We spent a bit of time debugging this in
https://discuss.linuxcontainers.org/t/incus-agent-fails-to-start/18969.
It looks like the right answer is to arrange that
"PATH=/usr/libexec/incus:/usr/sbin:/usr/bin:/sbin:/bin" is in a file
that you can give to EnvironmentFile=, and then things will work
properly: settings read from later files will override those read from
earlier files.

Thanks,

-- 
Colin Watson (he/him)  [cjwat...@debian.org]