#746224 lxc: Container fails to start 'no ns_cgroup option specified'

#746224#5
Date:
2014-04-18 16:04:26 UTC
From:
To:
Dear Maintainer,
the container has not been running since March 7th) I cannot start the LXC
container I have on my jessie-powered laptop.

    # lxc-start -n test-lxc -f /var/lib/lxc/test-lxc/config
    lxc-start: no ns_cgroup option specified
    lxc-start: failed to spawn 'test-lxc'
    lxc-start: No such file or directory - failed to remove cgroup '/sys/fs/cgroup/cpuset//lxc/test-lxc'

These are the mounted cgroups, according to mount:

    # mount | grep cgroup
    cgroup on /sys/fs/cgroup type tmpfs (rw,relatime,mode=755)
    cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,relatime,cpuset)
    cgroup on /sys/fs/cgroup/cpu type cgroup (rw,relatime,cpu)
    cgroup on /sys/fs/cgroup/cpuacct type cgroup (rw,relatime,cpuacct)
    cgroup on /sys/fs/cgroup/memory type cgroup (rw,relatime,memory)
    cgroup on /sys/fs/cgroup/devices type cgroup (rw,relatime,devices)
    cgroup on /sys/fs/cgroup/freezer type cgroup (rw,relatime,freezer)
    cgroup on /sys/fs/cgroup/blkio type cgroup (rw,relatime,blkio)
    cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,relatime,perf_event)
    cgroup_root on /sys/fs/cgroup type tmpfs (rw,relatime)
    cgroup_memory on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
    cgroup_devices on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)

and this is /proc/cgroups content:

    # cat /proc/cgroups
    #subsys_name    hierarchy       num_cgroups     enabled
    cpuset  2       1       1
    cpu     3       1       1
    cpuacct 4       1       1
    memory  5       1       1
    devices 6       1       1
    freezer 7       1       1
    blkio   8       1       1
    perf_event      9       1       1

and, to be complete :

    # tree /sys/fs/cgroup/
    /sys/fs/cgroup/
    |-- devices
    |   |-- cgroup.clone_children
    |   |-- cgroup.event_control
    |   |-- cgroup.procs
    |   |-- cgroup.sane_behavior
    |   |-- devices.allow
    |   |-- devices.deny
    |   |-- devices.list
    |   |-- notify_on_release
    |   |-- release_agent
    |   `-- tasks
    `-- memory
        |-- cgroup.clone_children
        |-- cgroup.event_control
        |-- cgroup.procs
        |-- cgroup.sane_behavior
        |-- memory.failcnt
        |-- memory.force_empty
        |-- memory.limit_in_bytes
        |-- memory.max_usage_in_bytes
        |-- memory.move_charge_at_immigrate
        |-- memory.oom_control
        |-- memory.pressure_level
        |-- memory.soft_limit_in_bytes
        |-- memory.stat
        |-- memory.swappiness
        |-- memory.usage_in_bytes
        |-- memory.use_hierarchy
        |-- notify_on_release
        |-- release_agent
        `-- tasks

As for the kernel cmdline :

    # cat /proc/cmdline
    BOOT_IMAGE=/boot/vmlinuz-3.13-1-686-pae root=UUID=984f719f-8c9c-4686-8218-ee9657c96204 ro cgroup_enable=memory quiet

/etc/fstab does not contains cgroup stuff any more since it tented to conflict
with libvirtd (I'm using KVM virtual machine at times). The cgroups, AFAICT,
are created through libvirt-bin and cgroupfs-mount packages init.d scripts.

Actually, lxc-checkconfig reports about missing "Cgroup namespace" :

    Kernel configuration not found at /proc/config.gz; searching...
    Kernel configuration found at /boot/config-3.13-1-686-pae
    --- Namespaces ---
    Namespaces: enabled
    Utsname namespace: enabled
    Ipc namespace: enabled
    Pid namespace: enabled
    User namespace: enabled
    Network namespace: enabled
    Multiple /dev/pts instances: enabled

#746224#10
Date:
2014-04-18 19:26:24 UTC
From:
To:
Hi,

Le 18/04/2014 18:04, Patrice Pillot a écrit :

Actually, as soon as I purged libvirt-bin, the problem disappeared and the
container could be started.

It seems there's a conflict somehow between libvirt-bin and lxc as far as
cgroups creation and/or management is concerned, as I feared in my last
comment from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=732666 (it
turns out I forgot to make the test at that time).

Hence I CC this message to libvirt maintainers in order for them to be
informed and I let you guys decide who has to do what.

I for one may live without libvirt (since this seems to be the only
workaround wrt the present bug - 745169) but that may not be the case for
everyone.

Cheers,

Patrice

#746224#21
Date:
2014-04-27 11:57:16 UTC
From:
To:
Hello,

adding a conflict against libvirt-bin is not a fix for this problem. It
just created a new problem.

I use lxc and libvirt/kvm without any problems, the only problem i have
is that conflict. Now I had to put lxc 1.0.0-8 on hold.

Maybe the reason why it works on my system is, i use systemd which
mounts the cgroups while lxc and libvirt just use them. It could be
something else, but i don't think that lxc and libvirt are incompatible
enough to add a conflict.

Please reopen this bug, thanks.

Best regards,

Michael Loeffler

#746224#38
Date:
2015-03-16 00:54:16 UTC
From:
To:

#746224#43
Date:
2015-03-16 01:11:48 UTC
From:
To:
Q 1
#746224#48
Date:
2015-03-16 09:09:58 UTC
From:
To:
pkg-libvirt-maintainers@lists.alioth.debian.org>
#746224#53
Date:
2015-03-16 09:11:12 UTC
From:
To:

#746224#58
Date:
2015-03-16 20:32:41 UTC
From:
To:
pkg-libvirt-maintainers@lists.alioth.debian.org>
#746224#63
Date:
2015-03-18 06:40:00 UTC
From:
To:
pkg-libvirt-maintainers@lists.alioth.debian.org>
#746224#68
Date:
2017-04-01 00:42:43 UTC
From:
To:
Dear Customer,

Your parcel was successfully delivered March 28 to UPS Station, but our courier cound not contact you.

You can download the shipment label attached!

Respectfully,
James Murray,
UPS Office Manager.