Re: [libvirt] [RFC PATCH 2/6] LXC: introduce virLXCControllerSetupUserns and lxcContainerSetUserns

2013-03-10 Thread Gao feng
On 2013/03/11 14:26, Gao feng wrote: > This patch introduces new helper function > virLXCControllerSetupUserns, in this function, > we set the files uid_map and gid_map of process > libvirt_lxc. > Oops,not libvirt_lxc, it's the init task of container. > lxcContainerSetUserns is used for creating

[libvirt] [RFC PATCH 6/6] LXC: fuse: Change files owner to the root user of container

2013-03-10 Thread Gao feng
Otherwise we will fail to mount the meminfo file. This patch also allows any users to access the fuse mount point. Signed-off-by: Gao feng --- src/lxc/lxc_fuse.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/lxc/lxc_fuse.c b/src/lxc/lxc_fuse.c index b6808da..2517340 100644 --- a/

[libvirt] [RFC PATCH 5/6] LXC: create tty device with proper permission for container

2013-03-10 Thread Gao feng
Since the root user of container may be a normal user on host, we should make sure the container has rights to use the tty device. Signed-off-by: Gao feng --- src/lxc/lxc_controller.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/lxc/lxc_controller.c b/src/lxc/l

[libvirt] [RFC PATCH 4/6] LXC: Creating devices for container on host side

2013-03-10 Thread Gao feng
user namespace doesn't allow to create devices in uninit userns. We should create devices on host side. Signed-off-by: Gao feng --- src/lxc/lxc_container.c | 47 +++ src/lxc/lxc_controller.c | 83 2 files changed, 94 inser

[libvirt] [RFC PATCH 2/6] LXC: introduce virLXCControllerSetupUserns and lxcContainerSetUserns

2013-03-10 Thread Gao feng
This patch introduces new helper function virLXCControllerSetupUserns, in this function, we set the files uid_map and gid_map of process libvirt_lxc. lxcContainerSetUserns is used for creating cred for tasks running in container. Since after setuid/setgid, we may be a new user. This patch calls lx

[libvirt] [RFC PATCH 3/6] LXC: only mount cgroupfs when userns is disabled

2013-03-10 Thread Gao feng
Since we can't mount cgroupfs in uninit user namespace now. only mount cgroupfs when userns is disabled. Signed-off-by: Gao feng --- src/lxc/lxc_container.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c index 5c66ae3..

[libvirt] [RFC PATCH 0/6] Add user namespace support for libvirt lxc

2013-03-10 Thread Gao feng
This patchset try to add userns support for libvirt lxc. Since userns is nearly completed in linux-3.9, the old kernel doesn't support userns, I add some New XML elements to let people decide if enable userns.The userns is disabled by default. And because the uninit userns has no right to create d

[libvirt] [RFC PATCH 1/6] LXC: New XML element for user namespace

2013-03-10 Thread Gao feng
This patch introduces three new elements in for user namespace. for example this new element userns is used for controlling if enable userns for the domain. the other two elements uidmap and gidmap are used for setting proc files /proc//{uid_map,gid_map}. Since user namespace i

Re: [libvirt] [PATCH] util: escapes special characters in VIR_LOG_REGEX

2013-03-10 Thread Guannan Ren
On 03/11/2013 10:10 AM, Osier Yang wrote: On 2013年03月09日 22:49, Guannan Ren wrote: In debug mode, the bug failed to start vm error: Failed to start domain rhel5u9 error: internal error Out of space while reading console log output: It's hard to known why the old regex cause error like this, as

Re: [libvirt] [PATCH] bandwidth: Require network QoS if interface uses 'floor'

2013-03-10 Thread Laine Stump
On 03/07/2013 05:02 AM, Michal Privoznik wrote: > By current implementation, network inbound is required in order > to use 'floor' for guaranteeing minimal throughput. This is so, > because we want user to tell us the maximal throughput of the > network instead of finding out ourselves (and detect

Re: [libvirt] [PATCH 04/13] qemu: support named nbd exports

2013-03-10 Thread Osier Yang
On 2013年02月26日 01:44, Paolo Bonzini wrote: These are supported by nbd-server and by the NBD server that QEMU embeds for live image access. Signed-off-by: Paolo Bonzini --- docs/formatdomain.html.in | 6 ++-- src/qemu/qemu_command.c| 17 +++

Re: [libvirt] [PATCH 03/13] qemu: rewrite NBD command-line builder and parser

2013-03-10 Thread Osier Yang
On 2013年02月26日 01:44, Paolo Bonzini wrote: Move the code to an external function, and structure it to prepare the addition of new features in the next few patches. Signed-off-by: Paolo Bonzini --- src/qemu/qemu_command.c | 128 tests/qemuxml2xm

Re: [libvirt] [PATCH 02/13] qemu: do not support non-network disks without -drive

2013-03-10 Thread Osier Yang
On 2013年02月26日 01:44, Paolo Bonzini wrote: QEMU added -drive in 2007, and NBD in 2008. Both appeared first in release 0.10.0. Thus the code to support network disks without -drive is dead, and in fact it incorrectly escapes commas. Drop it. The network disks support appeared in 0.8.7: Jan 4

Re: [libvirt] [PATCH 0/4] Add cpuset cgroup support for LXC

2013-03-10 Thread Gao feng
On 2013/03/01 14:52, Gao feng wrote: > This patchset intend to add cpuset cgroup support for LXC. > in order to don't create too many redundant codes, > this patchset also rename some functions and structure. > Ping > Gao feng (4): > rename qemuGetNumadAdvice to virGetNumadAdvice > LXC: allo

Re: [libvirt] [PATCH] util: escapes special characters in VIR_LOG_REGEX

2013-03-10 Thread Osier Yang
On 2013年03月09日 22:49, Guannan Ren wrote: In debug mode, the bug failed to start vm error: Failed to start domain rhel5u9 error: internal error Out of space while reading console log output: It's hard to known why the old regex cause error like this, as they looks quite unrelated. Can you explai

Re: [libvirt] [PATCH] lxc: Init activeUsbHostdevs

2013-03-10 Thread Osier Yang
On 2013年03月09日 23:08, Guido Günther wrote: otherwise we crash with #0 virUSBDeviceListFind (list=0x0, dev=dev@entry=0x8193d70) at util/virusb.c:526 #1 0xb1a4995b in virLXCPrepareHostdevUSBDevices (driver=driver@entry=0x815d9a0, name=0x815dbf8 "debian-700267", list=list@entry=0x81d8f08) a

Re: [libvirt] [PATCH] Convert HAVE_SELINUX to WITH_SELINUX

2013-03-10 Thread Osier Yang
On 2013年03月09日 23:08, Guido Günther wrote: these were missed by 63f18f378693cac6b6e33f4a8c15c20cb191c7c8 --- src/lxc/lxc_container.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c index 7ec67f4..4d09791 100644 --- a/

Re: [libvirt] [PATCH] Daemonize fuse thread in libvirt_lxc

2013-03-10 Thread Gao feng
On 2013/03/08 03:02, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > In some startup failure modes, the fuse thread may get itself > wedged. This will cause the entire libvirt_lxc process to > hang trying to the join the thread. There is no compelling > reason to wait for the thread to

Re: [libvirt] [PATCH 00/13] Network disk improvements (NBD & libiscsi)

2013-03-10 Thread Paolo Bonzini
Il 28/02/2013 06:10, Eric Blake ha scritto: > On 02/25/2013 10:44 AM, Paolo Bonzini wrote: >> This series improves support for NBD disks (patches 1-6), and adds >> support for the libiscsi userspace initiator (patches 7-13). > > 1 is a definite bug fix, and deserves to be in 1.0.3. It's too late

Re: [libvirt] [Qemu-devel] [PATCH v4] qdev: DEVICE_DELETED event

2013-03-10 Thread Michael S. Tsirkin
On Fri, Mar 08, 2013 at 08:58:43AM +0100, Markus Armbruster wrote: > "Michael S. Tsirkin" writes: > > > On Thu, Mar 07, 2013 at 08:57:52PM +0100, Markus Armbruster wrote: > >> "Michael S. Tsirkin" writes: > >> > >> > libvirt has a long-standing bug: when removing the device, > >> > it can reque

Re: [libvirt] [PATCH 0/2] Proper fix for xmlSaveToBuffer missing on RHEL4

2013-03-10 Thread Peter Krempa
On 03/08/13 18:33, Eric Blake wrote: On 03/08/2013 02:15 AM, Peter Krempa wrote: The original fix for one of the issues was done by defining a missing symbol from libxml2. The fix is not needed as the code using the function is never used. Revert the fix and remove the unused offending function