snapd 2.26.14 on ubuntu-core won't start in containers anymore
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snap Layer |
Invalid
|
Critical
|
Unassigned | ||
snapd |
Fix Released
|
Undecided
|
Michael Vogt | ||
systemd (Ubuntu) |
Fix Released
|
High
|
Dimitri John Ledkov | ||
Xenial |
Fix Released
|
Medium
|
Dimitri John Ledkov | ||
Artful |
Fix Released
|
High
|
Dimitri John Ledkov |
Bug Description
[Impact]
Systemd treats a failure to apply the requested Nice value as critical to unit startup.
Unprivileged LXD containers do not allow the use of negative nice values. snapd will fail to start inside containers now that snapd uses a negative Nice value.
Aug 09 05:54:37 core systemd[1]: snapd.service: Main process exited, code=exited, status=201/NICE
Aug 09 05:54:37 core systemd[1]: snapd.service: Unit entered failed state.
Aug 09 05:54:37 core systemd[1]: snapd.service: Failed with result 'exit-code'.
The fix is for systemd to ignore permission errors when attempting to setup such custom nice values in containers.
I have confirmed that setting up a unit override by hand which sets Nice = 0 does resolve the problem.
[Test Case]
Boot a Xenial image in lxd:
$ lxc launch xenial x1
$ lxc exec x1 -- systemctl --state=failed
Observe failures for snapd :
● snapd.service loaded failed failed Snappy daemon
● snapd.socket loaded failed failed Socket activation for snapp
Install updated systemd from -proposed and get status: (lxc exec <container> reboot; lxc exec <container> systemctl status)
State: running
Jobs: 0 queued
Failed: 0 units
[Regression Potential]
Services will now run with a Nice value other than what was specified in the unit if it cannot be changed for some reason.
Changed in snapd: | |
assignee: | nobody → Michael Vogt (mvo) |
Changed in layer-snap: | |
importance: | Undecided → Critical |
Changed in systemd (Ubuntu Xenial): | |
status: | Confirmed → In Progress |
description: | updated |
Changed in snapd: | |
status: | New → Fix Released |
Changed in layer-snap: | |
status: | New → Invalid |
Added an Ubuntu systemd task.