<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Hi,<br>
<br>
Sorry for this late reply, I never received any mail to warn me
that I got an answer.<br>
I was looking on the web for similar issues, when I saw that you
answered to me.<br>
<br>
Well, I removed :<br>
<ul>
<li>cgroup-bin</li>
<li>cgroup-tools </li>
</ul>
<br>
Then I reboot the machine, and I get this (lxc-start -n test
--logpriority DEBUG --logfile /tmp/lxc.log) :<br>
<br>
lxc-start 1425995573.760 INFO lxc_start_ui -
lxc_start.c:main:265 - using rcfile
/home/huraira/.local/share/lxc/test/config<br>
lxc-start 1425995573.762 INFO lxc_confile -
confile.c:config_idmap:1325 - read uid map: type u nsid 0 hostid
1214112 range 65536<br>
lxc-start 1425995573.762 INFO lxc_confile -
confile.c:config_idmap:1325 - read uid map: type g nsid 0 hostid
1214112 range 65536<br>
lxc-start 1425995573.762 WARN lxc_log -
log.c:lxc_log_init:316 - lxc_log_init called with log already
initialized<br>
lxc-start 1425995573.763 WARN lxc_cgfs -
cgfs.c:lxc_cgroup_get_container_<a class="moz-txt-link-freetext" href="info:1100">info:1100</a> - Not attaching to
cgroup perf_event unknown to /home/huraira/.local/share/lxc test<br>
lxc-start 1425995573.763 WARN lxc_cgfs -
cgfs.c:lxc_cgroup_get_container_<a class="moz-txt-link-freetext" href="info:1100">info:1100</a> - Not attaching to
cgroup devices unknown to /home/huraira/.local/share/lxc test<br>
lxc-start 1425995573.763 WARN lxc_cgfs -
cgfs.c:lxc_cgroup_get_container_<a class="moz-txt-link-freetext" href="info:1100">info:1100</a> - Not attaching to
cgroup cpu unknown to /home/huraira/.local/share/lxc test<br>
lxc-start 1425995573.763 WARN lxc_cgfs -
cgfs.c:lxc_cgroup_get_container_<a class="moz-txt-link-freetext" href="info:1100">info:1100</a> - Not attaching to
cgroup memory unknown to /home/huraira/.local/share/lxc test<br>
lxc-start 1425995573.763 WARN lxc_cgfs -
cgfs.c:lxc_cgroup_get_container_<a class="moz-txt-link-freetext" href="info:1100">info:1100</a> - Not attaching to
cgroup freezer unknown to /home/huraira/.local/share/lxc test<br>
lxc-start 1425995573.763 WARN lxc_cgfs -
cgfs.c:lxc_cgroup_get_container_<a class="moz-txt-link-freetext" href="info:1100">info:1100</a> - Not attaching to
cgroup net_cls unknown to /home/huraira/.local/share/lxc test<br>
lxc-start 1425995573.763 WARN lxc_cgfs -
cgfs.c:lxc_cgroup_get_container_<a class="moz-txt-link-freetext" href="info:1100">info:1100</a> - Not attaching to
cgroup blkio unknown to /home/huraira/.local/share/lxc test<br>
lxc-start 1425995573.763 WARN lxc_cgfs -
cgfs.c:lxc_cgroup_get_container_<a class="moz-txt-link-freetext" href="info:1100">info:1100</a> - Not attaching to
cgroup cpuset unknown to /home/huraira/.local/share/lxc test<br>
lxc-start 1425995573.763 INFO lxc_lsm -
lsm/lsm.c:lsm_init:48 - LSM security driver nop<br>
lxc-start 1425995573.763 DEBUG lxc_conf -
conf.c:lxc_create_tty:3665 - allocated pty '/dev/pts/1' (5/6)<br>
lxc-start 1425995573.763 DEBUG lxc_conf -
conf.c:lxc_create_tty:3665 - allocated pty '/dev/pts/2' (7/8)<br>
lxc-start 1425995573.763 DEBUG lxc_conf -
conf.c:lxc_create_tty:3665 - allocated pty '/dev/pts/3' (9/10)<br>
lxc-start 1425995573.763 DEBUG lxc_conf -
conf.c:lxc_create_tty:3665 - allocated pty '/dev/pts/4' (11/12)<br>
lxc-start 1425995573.763 INFO lxc_conf -
conf.c:lxc_create_tty:3676 - tty's configured<br>
lxc-start 1425995573.763 DEBUG lxc_start -
start.c:setup_signal_fd:247 - sigchild handler set<br>
lxc-start 1425995573.763 DEBUG lxc_console -
console.c:lxc_console_peer_default:500 - opening /dev/tty for
console peer<br>
lxc-start 1425995573.763 INFO lxc_caps -
caps.c:lxc_caps_up:101 - Last supported cap was 36<br>
lxc-start 1425995573.764 DEBUG lxc_console -
console.c:lxc_console_peer_default:506 - using '/dev/tty' as
console<br>
lxc-start 1425995573.764 DEBUG lxc_console -
console.c:lxc_console_sigwinch_init:179 - 2325 got SIGWINCH fd 17<br>
lxc-start 1425995573.764 DEBUG lxc_console -
console.c:lxc_console_winsz:88 - set winsz dstfd:14 cols:80
rows:24<br>
lxc-start 1425995574.362 INFO lxc_start -
start.c:lxc_init:443 - 'test' is initialized<br>
lxc-start 1425995574.394 DEBUG lxc_start -
start.c:__lxc_start:1058 - Not dropping cap_sys_boot or watching
utmp<br>
lxc-start 1425995574.394 INFO lxc_start -
start.c:lxc_spawn:802 - Cloning a new user namespace<br>
lxc-start 1425995574.394 INFO lxc_cgroup -
cgroup.c:cgroup_init:62 - cgroup driver cgroupfs initing for test<br>
lxc-start 1425995574.394 ERROR lxc_cgfs -
cgfs.c:lxc_cgroupfs_create:956 - Permission denied - Could not
create cgroup '/test' in '/sys/fs/cgroup/cpuset'.<br>
lxc-start 1425995574.394 ERROR lxc_cgfs -
cgfs.c:cgroup_rmdir:207 - Permission denied - cgroup_rmdir: failed
to delete /sys/fs/cgroup/cpuset/<br>
lxc-start 1425995574.394 ERROR lxc_cgfs -
cgfs.c:cgroup_rmdir:207 - Permission denied - cgroup_rmdir: failed
to delete /sys/fs/cgroup/blkio/<br>
lxc-start 1425995574.394 ERROR lxc_cgfs -
cgfs.c:cgroup_rmdir:207 - Permission denied - cgroup_rmdir: failed
to delete /sys/fs/cgroup/net_cls,net_prio/<br>
lxc-start 1425995574.395 ERROR lxc_cgfs -
cgfs.c:cgroup_rmdir:207 - Permission denied - cgroup_rmdir: failed
to delete /sys/fs/cgroup/freezer/<br>
lxc-start 1425995574.395 ERROR lxc_cgfs -
cgfs.c:cgroup_rmdir:207 - Permission denied - cgroup_rmdir: failed
to delete /sys/fs/cgroup/memory/<br>
lxc-start 1425995574.395 ERROR lxc_cgfs -
cgfs.c:cgroup_rmdir:207 - Permission denied - cgroup_rmdir: failed
to delete /sys/fs/cgroup/cpu,cpuacct/<br>
lxc-start 1425995574.395 ERROR lxc_cgfs -
cgfs.c:cgroup_rmdir:207 - Permission denied - cgroup_rmdir: failed
to delete /sys/fs/cgroup/devices/user.slice<br>
lxc-start 1425995574.395 ERROR lxc_cgfs -
cgfs.c:cgroup_rmdir:207 - Permission denied - cgroup_rmdir: failed
to delete /sys/fs/cgroup/perf_event/<br>
lxc-start 1425995574.395 ERROR lxc_start -
start.c:lxc_spawn:861 - failed creating cgroups<br>
lxc-start 1425995574.395 ERROR lxc_start -
start.c:__lxc_start:1080 - failed to spawn 'test'<br>
lxc-start 1425995574.395 WARN lxc_conf -
conf.c:lxc_delete_autodev:1575 - Failed to locate autodev
/dev/.lxc and /dev/.lxc/user.<br>
lxc-start 1425995574.395 ERROR lxc_start_ui -
lxc_start.c:main:342 - The container failed to start.<br>
lxc-start 1425995574.395 ERROR lxc_start_ui -
lxc_start.c:main:346 - Additional information can be obtained by
setting the --logfile and --logpriority options.<br>
<br>
<br>
<b>Packages related to cgmanager installed on the system :</b><br>
<br>
huraira@debian:~$ dpkg -l|grep -i cg<br>
ii cgmanager
0.36-2 amd64 Central cgroup
manager daemon<br>
ii cgmanager-tests
0.36-2 all Central cgroup
manager daemon (tests)<br>
rc cgroupfs-mount
1.1 all Light-weight
package to set up cgroupfs mounts<br>
ri coinor-libcgl1
0.58.9-1 amd64 COIN-OR Cut
Generation Library<br>
ii libcgmanager0:amd64
0.36-2 amd64 Central cgroup
manager daemon (client library)<br>
ii libcgroup1:amd64
0.41-6 amd64 control and
monitor control groups (library)<br>
ii libpam-cgroup:amd64
0.41-6 amd64 control and
monitor control groups (PAM)<br>
<br>
<b>Packages related to systemd installed on the system :</b><br>
<br>
huraira@debian:~$ dpkg -l|grep -i systemd<br>
ii libpam-systemd:amd64
219-4 amd64 system and
service manager - PAM module<br>
ii libsystemd-login0:amd64
215-12 amd64 systemd login
utility library (deprecated)<br>
ii libsystemd0:amd64
219-4 amd64 systemd utility
library<br>
ii systemd
219-4 amd64 system and
service manager<br>
ii systemd-sysv
219-4 amd64 system and
service manager - SysV links<br>
<br>
I do not have systemd-logind nor systemd-shim installed, because
systemd run as pid 1 and libsystemd0 replace libsystemd-login0
(deprecated) that replace systemd-logind.<br>
<br>
<b>Packages related to lxc installed on the system :</b><br>
<br>
huraira@debian:~$ dpkg -l|grep -i lxc<br>
ii lxc
1:1.0.7-1 amd64 Linux Containers
userspace tools<br>
<br>
<br>
<b>What you asked</b> :<br>
<br>
huraira@debian:~$ <b>ps -ef | grep cgmanager</b><br>
root 1355 1 0 mars08 ? 00:00:00 /sbin/cgmanager -m
name=systemd<br>
huraira 21683 21681 0 14:46 pts/7 00:00:00 grep cgmanager<br>
<br>
<br>
huraira@debian:~$ <b>ls /sys/fs/cgroup /sys/fs/cgroup/cgmanager</b><br>
/sys/fs/cgroup:<br>
blkio cgmanager cpu cpuacct cpu,cpuacct cpuset devices
freezer memory net_cls net_cls,net_prio net_prio
perf_event systemd<br>
<br>
/sys/fs/cgroup/cgmanager:<br>
sock<br>
<br>
<b> huraira@debian:~$ cat /proc/self/cgroup</b><br>
9:devices:/user.slice<br>
8:memory:/<br>
7:cpuset:/<br>
6:freezer:/<br>
5:net_cls,net_prio:/<br>
4:cpu,cpuacct:/<br>
3:perf_event:/<br>
2:blkio:/<br>
1:name=systemd:/user.slice/user-1000.slice/session-1.scope<br>
<br>
<br>
<b>huraira@debian:~$ systemctl status cgconfig</b><br>
● cgconfig.service<br>
Loaded: not-found (Reason: No such file or directory)<br>
Active: inactive (dead)<br>
<br>
<b>huraira@debian:~$ systemctl status cgmanager</b><br>
● cgmanager.service - Cgroup management daemon<br>
Loaded: loaded (/lib/systemd/system/cgmanager.service; enabled;
vendor preset: enabled)<br>
Active: active (running) since mar. 2015-03-10 14:52:37 CET;
3min 51s ago<br>
Main PID: 1391 (cgmanager)<br>
CGroup: /system.slice/cgmanager.service<br>
‣ 1391 /sbin/cgmanager -m name=systemd<br>
<br>
Warning: Journal has been rotated since unit was started. Log
output is incomplete or unavailable.<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
Thanks<br>
<br>
On 10/03/2015 14:32, zer0 divide wrote:<br>
</div>
<blockquote cite="mid:54FEF271.8030408@yahoo.fr" type="cite">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<pre style="white-space: pre-wrap; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px;">
Quoting zer0 divide (<a moz-do-not-send="true" href="http://lists.linuxcontainers.org/listinfo/lxc-users">zer0.divide at yahoo.fr</a>):
><i> Hi,
</i>><i> I try to start an unprivileged Lxc container under Debian Sid for a
</i>><i> while, I tried a lot of things, but it does not work.
</i>><i>
</i>><i> Futhermore, I asked here if it was a bug, but it seems not :
</i>><i> <a moz-do-not-send="true" href="https://github.com/lxc/lxc/issues/414#issuecomment-71414827">https://github.com/lxc/lxc/issues/414#issuecomment-71414827</a>
</i>><i>
</i>><i> Now, I'am wondering if it is not a Debian specific problem related
</i>><i> to some right access on /sys/fs/cgroup.
</i>><i>
</i>><i> Here the ouput of systemctl status cgconfig
</i>><i>
</i>><i> /hur//aira//@debian:~$ systemctl status cgconfig //
</i>><i> //● cgconfig.service//
</i>><i> // Loaded: not-found (Reason: No such file or directory)//
</i>><i> // Active: inactive (dead)/
</i>
><i> Here some packages installed on my system :
</i>><i> /lxc 1:1.0.7-1 amd64//
</i>><i> //cgmanager 0.35-1 amd64//
</i>
A few things i notice here,
1. you have cgmanager and cgroup-bin both installed. That can
sometime be a problem
2. your container is using cgfs, not cgmanager. Is cgmanager
actually running?
3. do you have systemd-logind and (if not running systemd as pid 1)
systemd-shim installed? those are supposed to, upon login, give
you cgroups which you can administer so that lxc can create
cgroups under your uid.
So what do
ps -ef | grep cgmanager
ls /sys/fs/cgroup /sys/fs/cgroup/cgmanager
cat /proc/self/cgroup
show?
><i> //cgroup-bin 0.41-6 all//
</i>><i> //cgroup-tools 0.41-6 amd64//
</i>><i> //libcgmanager0: 0.35-1 amd64//
</i>><i> //libcgroup1:amd 0.41-6 amd64//
</i>><i> //libpam-cgroup: 0.41-6// amd64/
</i>><i>
</i>><i> Here the log *lxc-start -n test -l DEBUG -o /tmp/lxc_test.log -f
</i>><i> ~/.config/lxc/default.conf*:
</i>><i> /
</i>><i> // lxc-start 1422302714.376 INFO lxc_confile -
</i>><i> confile.c:config_idmap:1325 - read uid map: type u nsid 0 hostid
</i>><i> 1214112 range 65536//
</i>><i> // lxc-start 1422302714.376 INFO lxc_confile -
</i>><i> confile.c:config_idmap:1325 - read uid map: type g nsid 0 hostid
</i>><i> 1214112 range 65536//
</i>><i> // lxc-start 1422302714.377 WARN lxc_log -
</i>><i> log.c:lxc_log_init:316 - lxc_log_init called with log already
</i>><i> initialized//
</i>><i> // lxc-start 1422302714.378 INFO lxc_confile -
</i>><i> confile.c:config_idmap:1325 - read uid map: type u nsid 0 hostid
</i>><i> 1214112 range 65536//
</i>><i> // lxc-start 1422302714.378 INFO lxc_confile -
</i>><i> confile.c:config_idmap:1325 - read uid map: type g nsid 0 hostid
</i>><i> 1214112 range 65536//
</i>><i> // lxc-start 1422302714.378 WARN lxc_cgfs -
</i>><i> cgfs.c:lxc_cgroup_get_container_<a moz-do-not-send="true" class="moz-txt-link-freetext" href="info:1100">info:1100</a> - Not attaching to cgroup
</i>><i> cpuset unknown to /home/huraira/.local/share/lxc test//
</i>><i> // lxc-start 1422302714.378 WARN lxc_cgfs -
</i>><i> cgfs.c:lxc_cgroup_get_container_<a moz-do-not-send="true" class="moz-txt-link-freetext" href="info:1100">info:1100</a> - Not attaching to cgroup
</i>><i> perf_event unknown to /home/huraira/.local/share/lxc test//
</i>><i> // lxc-start 1422302714.378 WARN lxc_cgfs -
</i>><i> cgfs.c:lxc_cgroup_get_container_<a moz-do-not-send="true" class="moz-txt-link-freetext" href="info:1100">info:1100</a> - Not attaching to cgroup
</i>><i> cpu unknown to /home/huraira/.local/share/lxc test//
</i>><i> // lxc-start 1422302714.378 WARN lxc_cgfs -
</i>><i> cgfs.c:lxc_cgroup_get_container_<a moz-do-not-send="true" class="moz-txt-link-freetext" href="info:1100">info:1100</a> - Not attaching to cgroup
</i>><i> net_cls unknown to /home/huraira/.local/share/lxc test//
</i>><i> // lxc-start 1422302714.378 WARN lxc_cgfs -
</i>><i> cgfs.c:lxc_cgroup_get_container_<a moz-do-not-send="true" class="moz-txt-link-freetext" href="info:1100">info:1100</a> - Not attaching to cgroup
</i>><i> blkio unknown to /home/huraira/.local/share/lxc test//
</i>><i> // lxc-start 1422302714.378 WARN lxc_cgfs -
</i>><i> cgfs.c:lxc_cgroup_get_container_<a moz-do-not-send="true" class="moz-txt-link-freetext" href="info:1100">info:1100</a> - Not attaching to cgroup
</i>><i> memory unknown to /home/huraira/.local/share/lxc test//
</i>><i> // lxc-start 1422302714.378 WARN lxc_cgfs -
</i>><i> cgfs.c:lxc_cgroup_get_container_<a moz-do-not-send="true" class="moz-txt-link-freetext" href="info:1100">info:1100</a> - Not attaching to cgroup
</i>><i> freezer unknown to /home/huraira/.local/share/lxc test//
</i>><i> // lxc-start 1422302714.378 WARN lxc_cgfs -
</i>><i> cgfs.c:lxc_cgroup_get_container_<a moz-do-not-send="true" class="moz-txt-link-freetext" href="info:1100">info:1100</a> - Not attaching to cgroup
</i>><i> devices unknown to /home/huraira/.local/share/lxc test//
</i>><i> // lxc-start 1422302714.378 INFO lxc_lsm -
</i>><i> lsm/lsm.c:lsm_init:48 - LSM security driver nop//
</i>><i> // lxc-start 1422302714.378 DEBUG lxc_start -
</i>><i> start.c:setup_signal_fd:247 - sigchild handler set//
</i>><i> // lxc-start 1422302714.378 INFO lxc_start -
</i>><i> start.c:lxc_init:443 - 'test' is initialized//
</i>><i> // lxc-start 1422302714.379 DEBUG lxc_start -
</i>><i> start.c:__lxc_start:1058 - Not dropping cap_sys_boot or watching
</i>><i> utmp//
</i>><i> // lxc-start 1422302714.379 INFO lxc_start -
</i>><i> start.c:lxc_spawn:802 - Cloning a new user namespace//
</i>><i> // lxc-start 1422302714.379 INFO lxc_cgroup -
</i>><i> cgroup.c:cgroup_init:62 - cgroup driver cgroupfs initing for test//
</i>><i> // lxc-start 1422302714.379 ERROR lxc_cgfs -
</i>><i> cgfs.c:lxc_cgroupfs_create:956 - Permission denied - Could not
</i>><i> create cgroup '/test' in '/sys/fs/cgroup/devices'.//
</i>><i> // lxc-start 1422302714.379 ERROR lxc_cgfs -
</i>><i> cgfs.c:cgroup_rmdir:207 - Permission denied - cgroup_rmdir: failed
</i>><i> to delete /sys/fs/cgroup/devices///
</i>><i> // lxc-start 1422302714.379 ERROR lxc_cgfs -
</i>><i> cgfs.c:cgroup_rmdir:207 - Permission denied - cgroup_rmdir: failed
</i>><i> to delete /sys/fs/cgroup/freezer///
</i>><i> // lxc-start 1422302714.379 ERROR lxc_cgfs -
</i>><i> cgfs.c:cgroup_rmdir:207 - Permission denied - cgroup_rmdir: failed
</i>><i> to delete /sys/fs/cgroup/memory///
</i>><i> // lxc-start 1422302714.379 ERROR lxc_cgfs -
</i>><i> cgfs.c:cgroup_rmdir:207 - Permission denied - cgroup_rmdir: failed
</i>><i> to delete /sys/fs/cgroup/blkio///
</i>><i> // lxc-start 1422302714.380 ERROR lxc_cgfs -
</i>><i> cgfs.c:cgroup_rmdir:207 - Permission denied - cgroup_rmdir: failed
</i>><i> to delete /sys/fs/cgroup/net_cls,net_prio///
</i>><i> // lxc-start 1422302714.380 ERROR lxc_cgfs -
</i>><i> cgfs.c:cgroup_rmdir:207 - Permission denied - cgroup_rmdir: failed
</i>><i> to delete /sys/fs/cgroup/cpu,cpuacct///
</i>><i> // lxc-start 1422302714.380 ERROR lxc_cgfs -
</i>><i> cgfs.c:cgroup_rmdir:207 - Permission denied - cgroup_rmdir: failed
</i>><i> to delete /sys/fs/cgroup/perf_event///
</i>><i> // lxc-start 1422302714.380 ERROR lxc_cgfs -
</i>><i> cgfs.c:cgroup_rmdir:207 - Permission denied - cgroup_rmdir: failed
</i>><i> to delete /sys/fs/cgroup/cpuset///
</i>><i> // lxc-start 1422302714.380 ERROR lxc_start -
</i>><i> start.c:lxc_spawn:861 - failed creating cgroups//
</i>><i> // lxc-start 1422302714.380 ERROR lxc_start -
</i>><i> start.c:__lxc_start:1080 - failed to spawn 'test'//
</i>><i> // lxc-start 1422302714.380 WARN lxc_conf -
</i>><i> conf.c:lxc_delete_autodev:1575 - Failed to locate autodev /dev/.lxc
</i>><i> and /dev/.lxc/user.//
</i>><i> // lxc-start 1422302714.380 ERROR lxc_start_ui -
</i>><i> lxc_start.c:main:342 - The container failed to start./
</i>
><i> _______________________________________________
</i>><i> lxc-users mailing list
</i>><i> <a moz-do-not-send="true" href="http://lists.linuxcontainers.org/listinfo/lxc-users">lxc-users at lists.linuxcontainers.org</a>
</i>><i> <a moz-do-not-send="true" href="http://lists.linuxcontainers.org/listinfo/lxc-users">http://lists.linuxcontainers.org/listinfo/lxc-users</a></i></pre>
</blockquote>
<br>
</body>
</html>