[lxc-devel] [PATCH 0/9] Rewrite lxc-device.
Dongsheng Yang
yangds.fnst at cn.fujitsu.com
Wed Sep 17 01:03:17 UTC 2014
On 09/16/2014 07:15 PM, Dongsheng Yang wrote:
> Hi all:
> This patchset here is to rewrite lxc-device to drop
> the dependence to ip command.
> [6/9] is to add two interfaces named [at|de]tach_interface
> to struct lxc_container. It use netlink to set the netns of netdev
> to container. But currently, I do not catch up with a good idea to
> detach a physical net device from a container. So in this patchset
> I make the attaching physical net device to container as forbidden.
> Do you have some suggestion about it?
Thanx for the help from Stgraber, I solved this problem now. And sended
v1 of this
patchset out.
Thanx
Yang
> [7/9] added the two new interface of [at|de]tach_interface
> to class Container in python-binding.
> [9/9] rewrite the lxc-device using the new functions, droping
> the dependence to external command of ip.
>
> Any comments, thoughts, proposals are really welcome.
>
> Thanx
> Yang
>
> Dongsheng Yang (9):
> network: convert param ifname to const.
> network: check result of if_nametoindex().
> lxc_start: ERROR if container is already running.
> network: allow lxc_network_move_by_index() rename netdev in moving.
> network: introduce a interface named lxc_netdev_isup().
> container: introduce two functions named as {at/de}tach_interface().
> python-lxc: Add [at|de]tach_interface() to python binding.
> utils: move useful helper functions from lxccontainer to utils.
> lxc-device: rewrite lxc-device.
>
> src/lxc/Makefile.am | 4 +-
> src/lxc/conf.c | 4 +-
> src/lxc/lxc-device | 97 ------------------------------
> src/lxc/lxc_device.c | 158 +++++++++++++++++++++++++++++++++++++++++++++++++
> src/lxc/lxc_start.c | 4 ++
> src/lxc/lxc_unshare.c | 2 +-
> src/lxc/lxc_user_nic.c | 2 +-
> src/lxc/lxccontainer.c | 132 ++++++++++++++++++++++++++---------------
> src/lxc/lxccontainer.h | 19 ++++++
> src/lxc/network.c | 80 ++++++++++++++++++++++++-
> src/lxc/network.h | 6 +-
> src/lxc/utils.c | 55 +++++++++++++++++
> src/lxc/utils.h | 2 +
> src/python-lxc/lxc.c | 73 +++++++++++++++++++++++
> 14 files changed, 483 insertions(+), 155 deletions(-)
> delete mode 100644 src/lxc/lxc-device
> create mode 100644 src/lxc/lxc_device.c
>
More information about the lxc-devel
mailing list