[lxc-users] cgmanager: cgm_list_children for controller=systemd, cgroup_path=user failed: invalid request
Serge Hallyn
serge.hallyn at ubuntu.com
Thu Jan 15 13:33:03 UTC 2015
Quoting Smart Goldman (ytlec2014 at gmail.com):
> 2015-01-15 5:12 GMT+09:00 Serge Hallyn <serge.hallyn at ubuntu.com>:
> > Quoting Smart Goldman (ytlec2014 at gmail.com):
> > > 2015-01-15 0:11 GMT+09:00 Serge Hallyn <serge.hallyn at ubuntu.com>:
> > >
> > > > cgmanager is an lxc project, so no worries.
> > >
> > > Okay. and thank you for swift response.
> > >
> > > > A few things - first, running cgroup-bin alongside cgmanager is
> > > probably a bad idea.
> > >
> > > Oh really? It is better to remove either one?
> > > Another following 2 errors were output before installing these 2 things.
> > > sshd[4603]: pam_systemd(sshd:session): Failed to create session: No such
> > > file or directory
> > > systemd-logind[2957]: Failed to create cgroup
> name=systemd:/user/0.user: No
> > > such file or directory
> >
> > 0.user? This is logging in as root?
>
> Yes. This log was recorded by logging in with root.
> If I am right, it was output as 1000.user when I logged in with normal user.
>
> > > After executing 'apt-get -y install cgroup-bin cgmanager-utils', above 2
> > > errors were removed.
> > >
> > > > Second, on 14.04 after install cgmanager
> > > > you unfortunately need to 'sudo restart systemd-logind', then
> > > > log out and log back in (or just ssh localhost) to get a new
> > > > cgroup. After that you should be able to create unprivileged
> containers.
> > >
> > > Now I tried 'sudo restart systemd-logind' and systemd-logind restarted.
> > > After that I logged out, log back and execute 'reboot'.
> > > However error log of cgmanager is still written on /var/log/auth.log.
> >
> > Create the file /etc/default/cgmanager containing the text:
> >
> > cgmanager_opts="--debug"
> >
> > Restart cgmanager (sudo stop cgmanager; sudo start cgmanager) and then
> > login, and look at /var/log/upstart/cgmanager.log
>
> Here's /var/log/upstart/cgmanager.log after restarting and logging in the
> ubuntu with root. I found there is something like error
> "cgmanager:get_pid_cgroup_main: Could not determine the requestor cgroup".
>
> root at myhost:~# tail -f /var/log/upstart/cgmanager.log
> UPSTART_JOB=cgmanager
> TERM=linux
> PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin
> cgmanager_opts=--debug
> PWD=/
> cgm_extra_mounts=-m
> name=systemd,name=container,name=fairsched,name=beancounter
> Mounted systemd onto /run/cgmanager/fs/none,name=systemd
> found 1 controllers
> buf is /run/cgmanager/agents/cgm-release-agent.systemd
> Mounted systemd onto /run/cgmanager/fs/none,name=systemd
> Connection from private client
> GetPidCgroup: Client fd is: 6 (pid=442, uid=0, gid=0)
> cgmanager:get_pid_cgroup_main: Could not determine the requestor cgroup
> Disconnected from private client
> Connection from private client
> Create: Client fd is: 6 (pid=442, uid=0, gid=0)
> Created /run/cgmanager/fs/none,name=systemd/user/0.user/c2.session for 442
> (0:0)
> cgmanager_create: returning 0; existed is -1
> Connection from private client
> Disconnected from private client
> MovePid: Client fd is: 7 (pid=442, uid=0, gid=0)
> 963 moved to systemd:user/0.user/c2.session by 442's request
> Connection from private client
> Disconnected from private client
> Chown: Client fd is: 6 (pid=442, uid=0, gid=0)
> Chown: Client fd is: 6 (pid=442, uid=0, gid=0)
> Connection from private client
> Disconnected from private client
> Chown: Client fd is: 7 (pid=442, uid=0, gid=0)
> Chown: Client fd is: 7 (pid=442, uid=0, gid=0)
> Disconnected from private client
>
> > > This error message is written even if I log out before reboot is
> executed
> > > or I execute reboot via control panel which is outside of ubuntu system.
> > >
> > > > The message may be ignorable - the real question is, when you
> > > > login, do you get a custom cgroup? What does /proc/self/cgroup
> > > > show?
> > >
> > > I am sorry. How can I know whether I got a custom cgroup?
> > > Here is the contents of my /proc/self/cgroup.
> > >
> > > root at myhost:~# cat /proc/self/cgroup
> > > 4:name=systemd:/user/1000.user/c1.session
> > > 3:freezer,devices,name=container:/12042
> > > 2:cpuacct,cpu,cpuset,name=fairsched:/12042
> > > 1:blkio,name=beancounter:/12042
> > > root at myhost:~#
> > >
> > > I appreciate your help and I apologize for troubling you.
> >
> > The /12042 is weird. It looks like something libcgroup may have
> > done for you.
> >
> > You may be able to work around this by adding the line:
> >
> > env cgm_extra_mounts="-m
> name=systemd,name=container,name=fairsched,name=beancounter"
> >
> > to /etc/default/cgmanager
>
> I added that line to /etc/default/cgmanager.
> But the log "failed: invalid request" is still written.
>
> Here's my current /etc/default/cgmanager:
> root at myhost:~# cat /etc/default/cgmanager
> cgmanager_opts="--debug"
> env cgm_extra_mounts="-m
> name=systemd,name=container,name=fairsched,name=beancounter"
Sorry, I did a bad cut-paste. Drop the "env" in front of cgm_extra_mounts.
Make sure that
cgm_extra_mounts="-m name=systemd,name=container,name=fairsched,name=beancounter"
is all one line.
More information about the lxc-users
mailing list