[lxc-devel] [PATCH 0/2] lxc_attach and user namespaces

2013-03-03 Thread Christian Seiler
As discussed earlier on this list with Serge, here is my first set of patches that fixes lxc_attach to user namespaces. The first patch is bascially Serge's patch v2 with the following changes: - use socketpair() instead of pipes because we need two-way communication; before we exec() we need

[lxc-devel] [PATCH 2/2] lxc_attach: Clean up cgroup attaching code

2013-03-03 Thread Christian Seiler
Since lxc_attach now works with two fork()s anyway due to user namespaces, the code for attaching to cgroups can be simplified again. This patch removes the prepare/finish/dispose functions for attaching to cgroups and just keeps the lxc_cgroup_attach function. --- src/lxc/cgroup.c | 154 ++-

[lxc-devel] [PATCH 1/2] lxc_attach: fix break with user namespaces (v3)

2013-03-03 Thread Christian Seiler
When you clone a new user_ns, the child cannot write to the fds opened by the parent. Hnadle this by doing an extra fork. The grandparent hangs around and waits for its child to tell it the pid of of the grandchild, which will be the one attached to the container. The grandparent then moves the

[lxc-devel] How to mount iscsi target in lxc container?

2013-03-03 Thread cmcc.dylan
Hi, everyone. Recently, I'm doing some works about linux container. I choose lxc as the hypervisor in the cloud platform - OpenNebula. The basic funtions are done. I plan to use iscsi storage as shared storage. Beause i choose ubuntu as the container os, i execute command "sudo apt-get i