Re: [lxc-users] Remounting cgroups and changing namespace.
On Tue, Jul 22, 2014 at 12:46 PM, Medhamsh V wrote: > Hello, > > While working with unprivileged containers in Ubuntu-14.04 I am facing the > following issue. > > After installing all the requirements and creating a container, I am unable > to start it untill > I reboot the host. Once I reboot the host I am able to start the containers. > Following is the > error I get. > > lxc_container: call to cgmanager_create_sync failed: invalid request > lxc_container: Failed to create hugetlb:lamp-template > lxc_container: Error creating cgroup hugetlb:lamp-template > lxc_container: failed creating cgroups > lxc_container: failed to spawn 'lamp-template' > lxc_container: The container failed to start. > lxc_container: Additional information can be obtained by setting the > --logfile and --log-priority options. > > > Now I am trying to make this work without rebooting the host because I am > provisioning this host > via Chef and can't reboot the host for automation purposes. Though I am able > to figure out that > cgroups need to be remounted, is there something to change for namespace and > if so, how to do that? > This is on top of EC2. Latest ubuntu does not mount cgfs (except systemd). It starts cgmanager which listens to a socket. You should probably try "start cgmanager". -- Fajar ___ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users
Re: [lxc-users] Remounting cgroups and changing namespace.
Hi, Thanks for the reply. cgmanager is already started. I tried restarting it as well but no luck. On 22 July 2014 11:23, Fajar A. Nugraha wrote: > On Tue, Jul 22, 2014 at 12:46 PM, Medhamsh V wrote: > > Hello, > > > > While working with unprivileged containers in Ubuntu-14.04 I am facing > the > > following issue. > > > > After installing all the requirements and creating a container, I am > unable > > to start it untill > > I reboot the host. Once I reboot the host I am able to start the > containers. > > Following is the > > error I get. > > > > lxc_container: call to cgmanager_create_sync failed: invalid request > > lxc_container: Failed to create hugetlb:lamp-template > > lxc_container: Error creating cgroup hugetlb:lamp-template > > lxc_container: failed creating cgroups > > lxc_container: failed to spawn 'lamp-template' > > lxc_container: The container failed to start. > > lxc_container: Additional information can be obtained by setting the > > --logfile and --log-priority options. > > > > > > Now I am trying to make this work without rebooting the host because I am > > provisioning this host > > via Chef and can't reboot the host for automation purposes. Though I am > able > > to figure out that > > cgroups need to be remounted, is there something to change for namespace > and > > if so, how to do that? > > This is on top of EC2. > > > Latest ubuntu does not mount cgfs (except systemd). It starts > cgmanager which listens to a socket. You should probably try "start > cgmanager". > > -- > Fajar > ___ > lxc-users mailing list > lxc-users@lists.linuxcontainers.org > http://lists.linuxcontainers.org/listinfo/lxc-users -- Medhamsh, GPG Finger Print: BD16 E32E CA4D 83A3 1270 725D D766 7997 0ABC 20E9 http://pascal.iiit.ac.in/~medhamsh/medhamsh.gpg ___ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users
Re: [lxc-users] Remounting cgroups and changing namespace.
On Tue, Jul 22, 2014 at 12:59 PM, Medhamsh V wrote: > Hi, > > Thanks for the reply. cgmanager is already started. I tried restarting it as > well but no luck. Try increasing the log verbosity for both lxc-start and cgmanager, as in https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/1335418 , last comment. It might give some ideas what's wrong. -- Fajar > > > On 22 July 2014 11:23, Fajar A. Nugraha wrote: >> >> On Tue, Jul 22, 2014 at 12:46 PM, Medhamsh V wrote: >> > Hello, >> > >> > While working with unprivileged containers in Ubuntu-14.04 I am facing >> > the >> > following issue. >> > >> > After installing all the requirements and creating a container, I am >> > unable >> > to start it untill >> > I reboot the host. Once I reboot the host I am able to start the >> > containers. >> > Following is the >> > error I get. >> > >> > lxc_container: call to cgmanager_create_sync failed: invalid request >> > lxc_container: Failed to create hugetlb:lamp-template >> > lxc_container: Error creating cgroup hugetlb:lamp-template >> > lxc_container: failed creating cgroups >> > lxc_container: failed to spawn 'lamp-template' >> > lxc_container: The container failed to start. >> > lxc_container: Additional information can be obtained by setting the >> > --logfile and --log-priority options. >> > >> > >> > Now I am trying to make this work without rebooting the host because I >> > am >> > provisioning this host >> > via Chef and can't reboot the host for automation purposes. Though I am >> > able >> > to figure out that >> > cgroups need to be remounted, is there something to change for namespace >> > and >> > if so, how to do that? >> > This is on top of EC2. >> >> >> Latest ubuntu does not mount cgfs (except systemd). It starts >> cgmanager which listens to a socket. You should probably try "start >> cgmanager". >> >> -- >> Fajar >> ___ >> lxc-users mailing list >> lxc-users@lists.linuxcontainers.org >> http://lists.linuxcontainers.org/listinfo/lxc-users > > > > > -- > Medhamsh, > > GPG Finger Print: BD16 E32E CA4D 83A3 1270 725D D766 7997 0ABC 20E9 > http://pascal.iiit.ac.in/~medhamsh/medhamsh.gpg > > ___ > lxc-users mailing list > lxc-users@lists.linuxcontainers.org > http://lists.linuxcontainers.org/listinfo/lxc-users ___ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users
Re: [lxc-users] Remounting cgroups and changing namespace.
Hello, On 22 July 2014 11:56, Fajar A. Nugraha wrote: > Try increasing the log verbosity for both lxc-start and cgmanager, as > in https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/1335418 , last > comment. It might give some ideas what's wrong. Seems like something with could not determine the requested cgroup. The appended log file is here. https://dpaste.de/pATR#L Thanks! ___ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users
Re: [lxc-users] Remounting cgroups and changing namespace.
On Tue, Jul 22, 2014 at 1:41 PM, Medhamsh V wrote: > Hello, > > On 22 July 2014 11:56, Fajar A. Nugraha wrote: >> Try increasing the log verbosity for both lxc-start and cgmanager, as >> in https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/1335418 , last >> comment. It might give some ideas what's wrong. > > Seems like something with could not determine the requested cgroup. > The appended log file is here. https://dpaste.de/pATR#L Hmmm ... are you running it as root or normal user? Create: Client fd is: 6 (pid=22324, uid=1001, gid=1001) cgmanager:create_main: pid 22324 (uid 1001 gid 1001) may not create under /run/cgmanager/fs/hugetlb Those lines looked suspicious. -- Fajar ___ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users
Re: [lxc-users] Remounting cgroups and changing namespace.
Normal user. I am trying to setup unprivileged containers. I want to run them as non root user. Things work fine when I reboot the machine. So just wondering what changes happen during this reboot and want to apply them without rebooting. On 22 July 2014 12:19, Fajar A. Nugraha wrote: > On Tue, Jul 22, 2014 at 1:41 PM, Medhamsh V wrote: >> Hello, >> >> On 22 July 2014 11:56, Fajar A. Nugraha wrote: >>> Try increasing the log verbosity for both lxc-start and cgmanager, as >>> in https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/1335418 , last >>> comment. It might give some ideas what's wrong. >> >> Seems like something with could not determine the requested cgroup. >> The appended log file is here. https://dpaste.de/pATR#L > > > Hmmm ... are you running it as root or normal user? > > Create: Client fd is: 6 (pid=22324, uid=1001, gid=1001) > cgmanager:create_main: pid 22324 (uid 1001 gid 1001) may not create > under /run/cgmanager/fs/hugetlb > > Those lines looked suspicious. > > -- > Fajar > ___ > lxc-users mailing list > lxc-users@lists.linuxcontainers.org > http://lists.linuxcontainers.org/listinfo/lxc-users -- Medhamsh, GPG Finger Print: BD16 E32E CA4D 83A3 1270 725D D766 7997 0ABC 20E9 http://pascal.iiit.ac.in/~medhamsh/medhamsh.gpg ___ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users
Re: [lxc-users] Remounting cgroups and changing namespace.
On Tue, Jul 22, 2014 at 1:51 PM, Medhamsh V wrote: > Normal user. I am trying to setup unprivileged containers. I want to run > them as non root user. Things work fine when I reboot the machine. So > just wondering what changes happen during this reboot and want to apply > them without rebooting. Ah. You could've mentioned it from the start :) This is from the list archive: http://permalink.gmane.org/gmane.linux.kernel.containers.lxc.general/7343 My guess is you simply need to logout and login to get PAM to do its thing. -- Fajar > > On 22 July 2014 12:19, Fajar A. Nugraha wrote: >> On Tue, Jul 22, 2014 at 1:41 PM, Medhamsh V wrote: >>> Hello, >>> >>> On 22 July 2014 11:56, Fajar A. Nugraha wrote: Try increasing the log verbosity for both lxc-start and cgmanager, as in https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/1335418 , last comment. It might give some ideas what's wrong. >>> >>> Seems like something with could not determine the requested cgroup. >>> The appended log file is here. https://dpaste.de/pATR#L >> >> >> Hmmm ... are you running it as root or normal user? >> >> Create: Client fd is: 6 (pid=22324, uid=1001, gid=1001) >> cgmanager:create_main: pid 22324 (uid 1001 gid 1001) may not create >> under /run/cgmanager/fs/hugetlb >> >> Those lines looked suspicious. >> >> -- >> Fajar >> ___ >> lxc-users mailing list >> lxc-users@lists.linuxcontainers.org >> http://lists.linuxcontainers.org/listinfo/lxc-users > > > > -- > Medhamsh, > > GPG Finger Print: BD16 E32E CA4D 83A3 1270 725D D766 7997 0ABC 20E9 > http://pascal.iiit.ac.in/~medhamsh/medhamsh.gpg > ___ > lxc-users mailing list > lxc-users@lists.linuxcontainers.org > http://lists.linuxcontainers.org/listinfo/lxc-users ___ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users
Re: [lxc-users] Remounting cgroups and changing namespace.
On 22 July 2014 12:26, Fajar A. Nugraha wrote: > Ah. You could've mentioned it from the start :) I mentioned in the first mail. :-) > This is from the list archive: > http://permalink.gmane.org/gmane.linux.kernel.containers.lxc.general/7343 > > My guess is you simply need to logout and login to get PAM to do its thing. I have done this several times already with no luck. From the link you gave tried doing that cgm operations and they also seem to have no effect. ___ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users
Re: [lxc-users] Remounting cgroups and changing namespace.
Hello, The above works for me but I need to do it for every shell and each time I login. And things set fine when I reboot the machine. Isn't there a way to persist this? Thanks! On 22 July 2014 12:48, Medhamsh V wrote: > On 22 July 2014 12:26, Fajar A. Nugraha wrote: >> Ah. You could've mentioned it from the start :) > > I mentioned in the first mail. :-) > >> This is from the list archive: >> http://permalink.gmane.org/gmane.linux.kernel.containers.lxc.general/7343 >> >> My guess is you simply need to logout and login to get PAM to do its thing. > > I have done this several times already with no luck. From the link you > gave tried > doing that cgm operations and they also seem to have no effect. -- Medhamsh, GPG Finger Print: BD16 E32E CA4D 83A3 1270 725D D766 7997 0ABC 20E9 http://pascal.iiit.ac.in/~medhamsh/medhamsh.gpg ___ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users
Re: [lxc-users] Remounting cgroups and changing namespace.
Are you running with upstart as init? You may need systemd-services installed. Quoting Medhamsh V (medha...@gmail.com): > Hello, > > The above works for me but I need to do it for every shell and each > time I login. > And things set fine when I reboot the machine. Isn't there a way to > persist this? > > > Thanks! > > On 22 July 2014 12:48, Medhamsh V wrote: > > On 22 July 2014 12:26, Fajar A. Nugraha wrote: > >> Ah. You could've mentioned it from the start :) > > > > I mentioned in the first mail. :-) > > > >> This is from the list archive: > >> http://permalink.gmane.org/gmane.linux.kernel.containers.lxc.general/7343 > >> > >> My guess is you simply need to logout and login to get PAM to do its thing. > > > > I have done this several times already with no luck. From the link you > > gave tried > > doing that cgm operations and they also seem to have no effect. > > > > -- > Medhamsh, > > GPG Finger Print: BD16 E32E CA4D 83A3 1270 725D D766 7997 0ABC 20E9 > http://pascal.iiit.ac.in/~medhamsh/medhamsh.gpg > ___ > lxc-users mailing list > lxc-users@lists.linuxcontainers.org > http://lists.linuxcontainers.org/listinfo/lxc-users ___ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users