[lxc-users] Containers on linux-4.8-rc1 sometimes(?) requiring "cgmanager -m name=systemd" (bisected, but is it a bug?)

Adam Richter adamrichter4 at gmail.com
Wed Sep 14 04:53:53 UTC 2016


Hello, Serge.

Thank you for responding to my posting.

For now, if Eric thinks the current behavior is acceptable, I can live
with the workaround of running "cgmanager -m name=systemd &", but I'll
answer your questions in case that is helpful.

>Does starting lxcfs or installing the cgroupfs-mount package also work?

With the change that appeared in Linux 4.8-rc1, on the host machine I
was using, it was necessary to complete cgroupfs-mount and then spawn
"cgmanager -m name-systemd" in the background.  Doing only the latter
results in lxc-start complaining about numerous directories missing
from /sys/fs/cgroup, as is the case if I do neither of these commands
at boot time.

I did not notice starting or skipping lxcfs making any difference.

>Which hierarchy is failing to be mounted?

The error message that I included in my original email mentions
/sys/fs/cgroup/systemd .

>Is it the name=systemd or a kernel one?

Apparently name=systemd, since that eliminates the symptom.

>When you say "fails to start", at which point does it fail?  There are
>two possibilities - (1) lxc or the lxc container config is asking for
>new hierarchies to be mounted.  If that's the case, that should be fixed
>to not balk when a not-mounted hierarchy can't be mounted.  Or (2) the
>container init is trying to mount all the hierarchies.  In that case
>I guess there's nothing we can do to help.

Case #2, because the messages "Failed to mount API filesystems,
freezing.", and "Freezing execution." in the failure log in my
original message are strings in /lib/systemd/system in the guest, and
the host is not running systemd.

Because I am OK with Eric's response for now, you should not feel that
it behooves you to respond further, although I am happy to respond
more if there is anything you'd like to discuss further.

Thank you for your helpful questions and comments.  At the very least,
it they clarify what I may not have been clear enough about for anyone
who finds this discussion in the future from a web search.

Adam Richter


On Tue, Sep 13, 2016 at 6:42 AM, Serge E. Hallyn <serge at hallyn.com> wrote:
> On Tue, Sep 13, 2016 at 01:11:50AM -0700, Adam Richter wrote:
>> On Linux 4.8-rc1 through 4-8-rc6 (latest rc), lxc fails start to
>> Ubuntu 16.04 and Centos 7 containers [1], unless I first run
>> "cgmanager -m name=systemd &" on the host, which, unlike the
>
> Does starting lxcfs or installing the cgroupfs-mount package also
> work?  Which hierarchy is failing to be mounted?  Is it the
> name=systemd or a kernel one?
>
>> containers, was not running systemd or cgmanager.
>
> When you say "fails to start", at which point does it fail?  There are
> two possibilities - (1) lxc or the lxc container config is asking for
> new hierarchies to be mounted.  If that's the case, that should be fixed
> to not balk when a not-mounted hierarchy can't be mounted.  Or (2) the
> container init is trying to mount all the hierarchies.  In that case
> I guess there's nothing we can do to help.
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users


More information about the lxc-users mailing list