Comment 14 for bug 1422345

Revision history for this message
Brian Murray (brian-murray) wrote :

stgraber indicates this is causing issues in lxc containers:

11:14 < stgraber> bdmurray: your unattended-upgrade SRU
                  is making all my containers crash
                  once an hour ;)
11:14 < bdmurray> stgraber: hunh?
11:15 < stgraber> you can't set negative nice values in
                  an unprivileged LXC container even if
                  you're root inside it
11:15 < stgraber> so now every time unattended-upgrade
                  runs (in my case every hour), it
                  crashes on that os.nice call
11:18 < stgraber> what we've done in other tools (like
                  systemd) is make this non-fatel if
                  the error is EACCES (typical for
                  unprivileged containers) or EPERM
                  (typical for apparmor preventing it)
11:19 < bdmurray> stgraber: but then wouldn't bug
                  1422345 still happen?
11:22 < stgraber> bdmurray: sure, the bug would still
                  happen in this case
11:23 < stgraber> bdmurray: root in a userns has the
                  same rights as a regular user with
                  regard to process priorities
11:23 < stgraber> bdmurray: and as a regular user, you
                  can increase the niceness but never
                  decrease it
11:24 < bdmurray> would it better to first try
                  decreasing and only increase it if
                  decreasing works?
11:25 < stgraber> yep, that'd be a good trick
11:25 < stgraber> so -1, if that works then 20,
                  otherwise keep is it is