[Lxc-users] adding a default gateway inside a container as a non root user

Serge Hallyn serge.hallyn at canonical.com
Fri Mar 2 14:40:03 UTC 2012


Quoting Daniel Lezcano (daniel.lezcano at free.fr):
> On 03/02/2012 11:18 AM, Arun M wrote:
> >
> >
> >>With the 0.8.0 version, you will be able to setup the gateway directly
> >>from the configuration file.
> >
> >Cool. I wanted to try this so tested with the latest code from repository.
> >
> >However hit another issue now.
> >
> >$ lxc-execute -n alpha -f n1.conf -l DEBUG -o log -- /bin/busybox ash
> >lxc-execute: No such file or directory - failed to rename cgroup /cgroup//lxc/3784->/cgroup//lxc/alpha
> >...
> >
> >lxc-execute 1331137335.969 INFO     lxc_cgroup - [1] found cgroup mounted at '/cgroup',opts='rw,relatime,blkio,net_cls,freezer,devices,memory,cpuacct,cpu,ns,cpuset'
> >lxc-execute 1331137335.969 DEBUG    lxc_cgroup - get_init_cgroup: found init cgroup for subsys (null) at /
> >lxc-execute 1331137335.969 DEBUG    lxc_cgroup - cgroup /cgroup has flags 0x1
> >lxc-execute 1331137335.969 WARN     lxc_cgroup - using deprecated ns_cgroup
> >lxc-execute 1331137335.969 ERROR    lxc_cgroup - No such file or directory - failed to rename cgroup /cgroup//lxc/3840->/cgroup//lxc/alpha
> >
> >$ file /cgroup/3840
> >/cgroup/3840: directory
> >
> >$ file /cgroup/lxc/3840
> >/cgroup/lxc/3840: cannot open `/cgroup/lxc/3840' (No such file or directory)
> >
> >It appears that lxc-execute is trying to look for a dir under "/cgroup/lxc" while its actually present under "/cgroup".
> 
> I guess we should add the 'lxc' path to the cgroup in case of the
> ns_cgroup because the creation is handled by the kernel.
> 
> Serge ?

Drat, yes.

-serge




More information about the lxc-users mailing list