2017-08-09 06:01:05 |
Stéphane Graber |
bug |
|
|
added bug |
2017-08-09 06:01:13 |
Stéphane Graber |
bug task added |
|
systemd (Ubuntu) |
|
2017-08-09 06:02:02 |
Stéphane Graber |
tags |
|
lxd |
|
2017-08-14 10:26:06 |
Dimitri John Ledkov |
systemd (Ubuntu): assignee |
|
Dimitri John Ledkov (xnox) |
|
2017-08-14 10:26:09 |
Dimitri John Ledkov |
systemd (Ubuntu): milestone |
|
ubuntu-17.08 |
|
2017-08-14 10:26:12 |
Dimitri John Ledkov |
systemd (Ubuntu): importance |
Undecided |
High |
|
2017-08-14 10:26:15 |
Dimitri John Ledkov |
systemd (Ubuntu): status |
New |
Fix Committed |
|
2017-08-18 01:47:46 |
Paul Collins |
bug |
|
|
added subscriber The Canonical Sysadmins |
2017-08-18 01:53:50 |
Haw Loeung |
bug |
|
|
added subscriber Haw Loeung |
2017-08-21 12:38:12 |
Dimitri John Ledkov |
nominated for series |
|
Ubuntu Artful |
|
2017-08-21 12:38:12 |
Dimitri John Ledkov |
bug task added |
|
systemd (Ubuntu Artful) |
|
2017-08-21 12:38:12 |
Dimitri John Ledkov |
nominated for series |
|
Ubuntu Xenial |
|
2017-08-21 12:38:12 |
Dimitri John Ledkov |
bug task added |
|
systemd (Ubuntu Xenial) |
|
2017-08-21 12:38:16 |
Dimitri John Ledkov |
systemd (Ubuntu Xenial): status |
New |
Confirmed |
|
2017-08-21 12:38:22 |
Dimitri John Ledkov |
systemd (Ubuntu Xenial): importance |
Undecided |
Medium |
|
2017-08-21 12:38:25 |
Dimitri John Ledkov |
systemd (Ubuntu Xenial): assignee |
|
Dimitri John Ledkov (xnox) |
|
2017-08-21 12:38:27 |
Dimitri John Ledkov |
systemd (Ubuntu Artful): status |
Fix Committed |
Fix Released |
|
2017-08-22 09:11:49 |
Zygmunt Krynicki |
snapd: assignee |
|
Michael Vogt (mvo) |
|
2017-08-23 14:28:31 |
Simon Kollberg |
bug |
|
|
added subscriber Simon Kollberg |
2017-08-28 11:50:04 |
Stuart Bishop |
bug task added |
|
layer-snap |
|
2017-08-28 11:51:40 |
Stuart Bishop |
layer-snap: importance |
Undecided |
Critical |
|
2017-08-31 06:53:37 |
Dominique Poulain |
bug |
|
|
added subscriber Dominique Poulain |
2017-09-05 10:45:52 |
Dimitri John Ledkov |
systemd (Ubuntu Xenial): status |
Confirmed |
In Progress |
|
2017-09-09 06:04:11 |
Mathew Hodson |
description |
It looks like snapd in ubuntu-core (2.26.14 here) has been modified to use a negative Nice value in systemd. Systemd seems to treat 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 as those are restricted to the real root user. I believe the optimal fix would be for systemd to ignore permission errors when attempting to setup such custom nice values in containers but if that can't be resolved quickly, then it means that snapd will now fail to start inside containers.
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'.
I have confirmed that setting up a unit override by hand which sets Nice=0 does resolve the problem, confirming that the negative Nice value is the problem (snapd.service has Nice=-5 here). |
[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. |
|
2017-09-19 15:23:49 |
Brian Murray |
systemd (Ubuntu Xenial): status |
In Progress |
Fix Committed |
|
2017-09-19 15:23:52 |
Brian Murray |
bug |
|
|
added subscriber Ubuntu Stable Release Updates Team |
2017-09-19 15:23:54 |
Brian Murray |
bug |
|
|
added subscriber SRU Verification |
2017-09-19 15:23:59 |
Brian Murray |
tags |
lxd |
lxd verification-needed verification-needed-xenial |
|
2017-09-19 16:13:31 |
Stéphane Graber |
tags |
lxd verification-needed verification-needed-xenial |
lxd verification-done-xenial verification-needed |
|
2017-10-10 22:14:11 |
Nobuto Murata |
bug |
|
|
added subscriber Nobuto Murata |
2017-10-23 12:13:02 |
Launchpad Janitor |
systemd (Ubuntu Xenial): status |
Fix Committed |
Fix Released |
|
2017-10-23 12:13:30 |
Łukasz Zemczak |
removed subscriber Ubuntu Stable Release Updates Team |
|
|
|
2018-01-02 09:59:43 |
Michael Vogt |
snapd: status |
New |
Fix Released |
|
2020-06-01 15:52:53 |
Stéphane Graber |
layer-snap: status |
New |
Invalid |
|