[Lxc-users] Problem with lxc-attach on Linux v3.1.0
Nikhil Handigol
nikhil.handigol at gmail.com
Thu Sep 8 21:39:12 UTC 2011
If I understand the lxc code right, it's failing in the function
get_cgroup_mount in src/lxc/cgroup.c, which tries to read the cgroup mount
point from /proc/mounts.
/proc/mount seems to be fine on my machine:
$ cat /proc/mounts
...
...
cgroup /cgroup cgroup
rw,relatime,blkio,net_cls,freezer,devices,memory,cpuacct,cpu,debug,cpuset,clone_children
0 0
The cgroup entry is present, but it seems it's unable to open /proc/mounts.
-/\/
On Thu, Sep 8, 2011 at 1:16 PM, Nikhil Handigol
<nikhil.handigol at gmail.com>wrote:
> Ah! That was something I had missed. I recompiled lxc with
> the --with-linuxdir option and the old error went away.
>
> Now I'm getting the following error:
> $ lxc-attach -n foo -- /bin/bash
> lxc-attach: No such file or directory - failed to open /proc/mounts
> lxc-attach: cgroup is not mounted
> lxc-attach: No such file or directory - failed to get cgroup path for
> cgroup foo
>
> On my machine, cgroup is mounted on /cgroup via the following command:
> mount -t cgroup cgroup /cgroup
>
> It looks like I also need to specify where cgroup is mounted? How do I do
> that?
> (I think we're close to getting this to work)
>
> Thanks,
> -/\/
>
>
>
> On Thu, Sep 8, 2011 at 1:07 PM, Daniel Lezcano <daniel.lezcano at free.fr>wrote:
>
>> On 09/08/2011 07:12 PM, Nikhil Handigol wrote:
>> > It is indeed the case:
>> >
>> > $ type lxc-attach
>> > lxc-attach is /usr/local/bin/lxc-attach
>>
>> Ok.
>>
>> Did you specified the kernel source tree when invoking configure ?
>>
>> It is the --with-linuxdir=<path_to_the_patched_kernel>
>>
>> Make sure to remove src/lxc/setns.h file which is automatically generated.
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20110908/4db0d2f5/attachment.html>
More information about the lxc-users
mailing list