Re: [libvirt] [PATCH] maint: Make ctags work out of the box

2013-07-18 Thread Jiri Denemark
On Wed, Jul 17, 2013 at 05:33:00 -0600, Eric Blake wrote: On 07/17/2013 05:10 AM, Jiri Denemark wrote: The .ctags file specifies default options for ctags so that it does not ignore libvirt.h.in and ignores uninteresting files. As a result, you can just run ctags and navigating to a public

Re: [libvirt] [PATCH] tests: split long lines

2013-07-18 Thread Michal Privoznik
On 17.07.2013 19:51, Eric Blake wrote: Long lines are harder to read and harder to diff; in fact, if lines get too long ( 1000 bytes), it starts causing issues where git send-email refuses to send patches for the file. I've cleaned up the tests directory in the past (see commits bd6c46f,

Re: [libvirt] [sandbox][PATCH] Docs: remove duplicate -u item in create man page

2013-07-18 Thread Alex Jia
ACK. -- Regards, Alex - Original Message - From: Wayne Sun g...@redhat.com To: libvir-list@redhat.com Sent: Thursday, July 18, 2013 3:24:30 PM Subject: [libvirt] [sandbox][PATCH] Docs: remove duplicate -u item in create man page This related to bug:

[libvirt] [libvirt-sandbox][PATCH] Docs: update EXAMPLES section of virt-sandbox man page

2013-07-18 Thread Alex Jia
Signed-off-by: Alex Jia a...@redhat.com --- bin/virt-sandbox.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/bin/virt-sandbox.c b/bin/virt-sandbox.c index 883e6c0..b51465d 100644 --- a/bin/virt-sandbox.c +++ b/bin/virt-sandbox.c @@ -438,7 +438,9 @@ Run an interactive

Re: [libvirt] [PATCH 0/6] Enable fd passing / socket activation with LXC guest

2013-07-18 Thread Michal Privoznik
On 12.07.2013 17:38, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Systemd has a concept of socket activation whereby systemd will listen on a TCP socket in the host. When a client arrives on the socket, systemd will run a service, passing it the pre-opened TCP

Re: [libvirt] [PATCH 2/6] Introduce remote protocol support for virDomainCreate{XML}WithFiles

2013-07-18 Thread Michal Privoznik
On 12.07.2013 17:38, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Since they make use of file descriptor passing, the remote protocol methods for virDomainCreate{XML}WithFiles must be written by hand. Signed-off-by: Daniel P. Berrange berra...@redhat.com ---

Re: [libvirt] [PATCH 4/6] LXC: Wire up the virDomainCreate{XML}WithFiles methods

2013-07-18 Thread Michal Privoznik
On 12.07.2013 17:38, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Wire up the new virDomainCreate{XML}WithFiles methods in the LXC driver, so that FDs get passed down to the init process. The lxc_container code needs to do a little dance in order to renumber the

Re: [libvirt] [PATCH v3 2/3] libxl: advertise the support for VIR_TYPED_PARAM_STRING

2013-07-18 Thread Dario Faggioli
On mer, 2013-07-17 at 10:59 -0600, Jim Fehlig wrote: Daniel P. Berrange wrote: On Sat, Jul 13, 2013 at 02:27:10AM +0200, Dario Faggioli wrote: Signed-off-by: Dario Faggioli dario.faggi...@citrix.com Cc: Eric Blake ebl...@redhat.com --- Changes from v1: * commit message improved, as

[libvirt] Schedule for next release 1.1.1

2013-07-18 Thread Daniel Veillard
Time to plan the release at the end of the month, for a change I would prefer to release a bit earlier and shoot for Tue 30th July. So this would mean that we enter the freeze on Wednesday 24 next week, hopefully that is fine for everybody, if people have pending patche(s) that still need

[libvirt] [PATCH v2] Check for link_addr more thoroughly

2013-07-18 Thread Guido Günther
Some versions of kFreeBSD (like 9.0) declare link_addr in a header but lack an implementation. This makes ./configure pass but breaks compilation later with a undefined reference to `link_addr' Althought that's a bug in the OS header we can detect it easily by also trying to link.

Re: [libvirt] LXC: autostart feature does set all interfaces to state up.

2013-07-18 Thread Daniel P. Berrange
On Wed, Jul 17, 2013 at 11:33:22PM +0200, Richard Weinberger wrote: Am 12.07.2013 03:36, schrieb Gao feng: On 07/11/2013 07:58 PM, Richard Weinberger wrote: Am 11.07.2013 11:49, schrieb Daniel P. Berrange: On Thu, Jul 11, 2013 at 11:44:48AM +0200, Richard Weinberger wrote: Am 11.07.2013

Re: [libvirt] [PATCH] Split up platfrom specifics from bridge driver

2013-07-18 Thread Daniel P. Berrange
On Wed, Jul 17, 2013 at 05:41:56PM -0600, Eric Blake wrote: +++ b/src/network/bridge_driver_platform.c @@ -0,0 +1,32 @@ +#include bridge_driver_platform.h + +#if defined(__linux__) +# include bridge_driver_linux.c +#else +# include bridge_driver_noop.c One .c including another

Re: [libvirt] [libvirt-sandbox][PATCH] Docs: update EXAMPLES section of virt-sandbox man page

2013-07-18 Thread Daniel P. Berrange
On Thu, Jul 18, 2013 at 04:22:36PM +0800, Alex Jia wrote: Signed-off-by: Alex Jia a...@redhat.com --- bin/virt-sandbox.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/bin/virt-sandbox.c b/bin/virt-sandbox.c index 883e6c0..b51465d 100644 ---

Re: [libvirt] [PATCH] tests: split long lines

2013-07-18 Thread Daniel P. Berrange
On Wed, Jul 17, 2013 at 11:51:11AM -0600, Eric Blake wrote: Long lines are harder to read and harder to diff; in fact, if lines get too long ( 1000 bytes), it starts causing issues where git send-email refuses to send patches for the file. I've cleaned up the tests directory in the past (see

Re: [libvirt] [sandbox][PATCH] Docs: remove duplicate -u item in create man page

2013-07-18 Thread Alex Jia
Pushed this under the trivial rule. -- Regards, Alex - Original Message - From: Alex Jia a...@redhat.com To: Wayne Sun g...@redhat.com Cc: libvir-list@redhat.com Sent: Thursday, July 18, 2013 3:49:58 PM Subject: Re: [libvirt] [sandbox][PATCH] Docs: remove duplicate -u item in

Re: [libvirt] [libvirt-sandbox][PATCH] Docs: update EXAMPLES section of virt-sandbox man page

2013-07-18 Thread Alex Jia
Thanks and pushed now. -- Regards, Alex - Original Message - From: Daniel P. Berrange berra...@redhat.com To: Alex Jia a...@redhat.com Cc: libvir-list@redhat.com Sent: Thursday, July 18, 2013 5:24:14 PM Subject: Re: [libvirt] [libvirt-sandbox][PATCH] Docs: update EXAMPLES section

[libvirt] [PATCH v2 3/8] examples: Handle VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED event

2013-07-18 Thread Jiri Denemark
--- Notes: Already ACKed in version 1 Version 2: - no change examples/domain-events/events-c/event-test.c | 23 +- examples/domain-events/events-python/event-test.py | 4 2 files changed, 26 insertions(+), 1 deletion(-) diff --git

[libvirt] [PATCH v2 0/8] Remove devices only after DEVICE_DELETED event

2013-07-18 Thread Jiri Denemark
This is a second version of the series updated according to the comments. It still does not check if any device finished unplug while libvirtd was not running but I'm working on it and it can be applied separately. Jiri Denemark (8): qemu: Separate char device removal into a standalone function

[libvirt] [PATCH v2 1/8] qemu: Separate char device removal into a standalone function

2013-07-18 Thread Jiri Denemark
--- Notes: Version 2: - new patch src/qemu/qemu_hotplug.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 788ad47..f2dddc8 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@

[libvirt] [PATCH v2 6/8] qemu: Add support for DEVICE_DELETED event

2013-07-18 Thread Jiri Denemark
--- Notes: Already ACKed in version 1 Version 2: - no change src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + src/qemu/qemu_monitor.c | 13 + src/qemu/qemu_monitor.h | 5 + src/qemu/qemu_monitor_json.c | 15 +++ 5

[libvirt] [PATCH v2 5/8] Add virDomainDefFindDevice for looking up a device by its alias

2013-07-18 Thread Jiri Denemark
--- Notes: Already ACKed in version 1 Version 2: - no change src/conf/domain_conf.c | 41 + src/conf/domain_conf.h | 4 src/libvirt_private.syms | 1 + 3 files changed, 46 insertions(+) diff --git a/src/conf/domain_conf.c

[libvirt] [PATCH v2 8/8] qemu: Emit VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED events

2013-07-18 Thread Jiri Denemark
--- Notes: Version 2: - update qemuhotplugtest to initialize domainEventState src/qemu/qemu_hotplug.c | 30 -- tests/qemuhotplugtest.c | 3 +++ 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c

[libvirt] [PATCH v2 7/8] qemu: Remove devices only after DEVICE_DELETED event

2013-07-18 Thread Jiri Denemark
--- Notes: Version 2: - DEVICE_DELETED event handler always removes the device - wait for up to 5 seconds after device_del returns to make async removal synchronous in normal cases src/qemu/qemu_domain.c | 4 ++ src/qemu/qemu_domain.h | 3 + src/qemu/qemu_hotplug.c | 159

Re: [libvirt] [PATCH 1/9] qemu: Move close callbacks handling into util/virclosecallbacks.c

2013-07-18 Thread Daniel P. Berrange
On Wed, Jul 17, 2013 at 03:04:18PM +0200, Michal Privoznik wrote: --- po/POTFILES.in | 1 + src/Makefile.am | 4 +- src/libvirt_private.syms | 7 + src/qemu/qemu_conf.c | 295 +- src/qemu/qemu_conf.h |

[libvirt] [PATCH v2 2/8] Add VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED event

2013-07-18 Thread Jiri Denemark
--- Notes: Already ACKed in version 1 Version 2: - no change daemon/remote.c | 32 + include/libvirt/libvirt.h.in | 18 python/libvirt-override-virConnect.py | 9 python/libvirt-override.c | 52

[libvirt] [PATCH v2 4/8] Clarify virDomainDetachDeviceFlags documentation

2013-07-18 Thread Jiri Denemark
--- Notes: Version 2: - document limited waiting to make most async removal synchronous src/libvirt.c | 16 1 file changed, 16 insertions(+) diff --git a/src/libvirt.c b/src/libvirt.c index 0cdac0d..1f44a28 100644 --- a/src/libvirt.c +++ b/src/libvirt.c @@ -10889,6

Re: [libvirt] [PATCH 2/9] Introduce a virLXCDriverConfigPtr object

2013-07-18 Thread Daniel P. Berrange
On Wed, Jul 17, 2013 at 03:04:19PM +0200, Michal Privoznik wrote: Currently the virLXCDriverPtr struct contains an wide variety of data with varying access needs. Move all the static config data into a dedicated virLXCDriverConfigPtr object. The only locking requirement is to hold the driver

Re: [libvirt] [PATCH 3/9] lxc: Use atomic ops for driver-nactive

2013-07-18 Thread Daniel P. Berrange
On Wed, Jul 17, 2013 at 03:04:20PM +0200, Michal Privoznik wrote: --- src/lxc/lxc_conf.h| 2 +- src/lxc/lxc_process.c | 10 -- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/lxc/lxc_conf.h b/src/lxc/lxc_conf.h index 6ca6198..f9a3e53 100644 ---

Re: [libvirt] [PATCH 4/9] Introduce annotations for virLXCDriverPtr fields

2013-07-18 Thread Daniel P. Berrange
On Wed, Jul 17, 2013 at 03:04:21PM +0200, Michal Privoznik wrote: Annotate the fields in virLXCDriverPtr to indicate the locking rules for their use --- src/lxc/lxc_conf.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/src/lxc/lxc_conf.h b/src/lxc/lxc_conf.h index

Re: [libvirt] [PATCH 5/9] lxc: switch to virCloseCallbacks API

2013-07-18 Thread Daniel P. Berrange
On Wed, Jul 17, 2013 at 03:04:22PM +0200, Michal Privoznik wrote: --- src/libvirt_private.syms | 1 + src/lxc/lxc_conf.h | 5 +- src/lxc/lxc_driver.c | 6 +-- src/lxc/lxc_process.c| 113 --- src/lxc/lxc_process.h

Re: [libvirt] [PATCH 6/9] Stop accessing driver-caps directly in LXC driver

2013-07-18 Thread Daniel P. Berrange
On Wed, Jul 17, 2013 at 03:04:23PM +0200, Michal Privoznik wrote: The 'driver-caps' pointer can be changed on the fly. Accessing it currently requires the global driver lock. Isolate this access in a single helper, so a future patch can relax the locking constraints. --- src/lxc/lxc_conf.c

Re: [libvirt] [PATCH 7/9] lxc: Make activeUsbHostdevs use locks

2013-07-18 Thread Daniel P. Berrange
On Wed, Jul 17, 2013 at 03:04:24PM +0200, Michal Privoznik wrote: The activeUsbHostdevs item in LXCDriver are lockable, but the lock has to be called explicitly. Call the virObject(Un)Lock() in order to achieve mutual exclusion once lxcDriverLock is removed. --- src/lxc/lxc_driver.c | 2 ++

Re: [libvirt] [PATCH 0/9] Fine grained locking in LXC driver

2013-07-18 Thread Daniel P. Berrange
On Wed, Jul 17, 2013 at 03:04:17PM +0200, Michal Privoznik wrote: The first round of my patches that breaks LXC driver into smaller pieces. With my testing on 10 domains which are started up and destroyed in a loop with 10 iterations (each loop is run in a separate thread in client): Before:

Re: [libvirt] [PATCH 9/9] Introduce lxcDomObjFromDomain

2013-07-18 Thread Daniel P. Berrange
On Wed, Jul 17, 2013 at 03:04:26PM +0200, Michal Privoznik wrote: Similarly to qemu driver, we can use a helper function to lookup a domain instead of copying multiple lines around. --- src/lxc/lxc_driver.c | 344 +++ 1 file changed, 73

Re: [libvirt] [PATCH 8/9] Remove lxcDriverLock from almost everywhere

2013-07-18 Thread Daniel P. Berrange
On Wed, Jul 17, 2013 at 03:04:25PM +0200, Michal Privoznik wrote: With the majority of fields in the virLXCDriverPtr struct now immutable or self-locking, there is no need for practically any methods to be using the LXC driver lock. Only a handful of helper APIs now need it. ---

Re: [libvirt] [PATCH v2 1/8] qemu: Separate char device removal into a standalone function

2013-07-18 Thread Daniel P. Berrange
On Thu, Jul 18, 2013 at 12:03:43PM +0200, Jiri Denemark wrote: --- Notes: Version 2: - new patch src/qemu/qemu_hotplug.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index

Re: [libvirt] [PATCH v2 4/8] Clarify virDomainDetachDeviceFlags documentation

2013-07-18 Thread Daniel P. Berrange
On Thu, Jul 18, 2013 at 12:03:46PM +0200, Jiri Denemark wrote: --- Notes: Version 2: - document limited waiting to make most async removal synchronous src/libvirt.c | 16 1 file changed, 16 insertions(+) diff --git a/src/libvirt.c b/src/libvirt.c index

[libvirt] [PATCH] virAsprintf: correctly check return value

2013-07-18 Thread Ján Tomko
When virAsprintf was changed from a function to a macro reporting OOM error in dc6f2da, it was documented as returning 0 on success. This is incorrect, it returns the number of bytes written as asprintf does. Some of the functions were converted to use virAsprintf's return value directly,

Re: [libvirt] [PATCH v2 7/8] qemu: Remove devices only after DEVICE_DELETED event

2013-07-18 Thread Daniel P. Berrange
On Thu, Jul 18, 2013 at 12:03:49PM +0200, Jiri Denemark wrote: --- Notes: Version 2: - DEVICE_DELETED event handler always removes the device - wait for up to 5 seconds after device_del returns to make async removal synchronous in normal cases src/qemu/qemu_domain.c

[libvirt] [PATCH 2/2] qemuhotplugtest: Resolve some memleaks

2013-07-18 Thread Michal Privoznik
If testQemuHotplugAttach succeeds, the vm-def steals the dev pointer. However, not the envelope, which needs to be freed. In addition, driver.config is allocated, but never freed. --- tests/qemuhotplugtest.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git

[libvirt] [PATCH 1/2] qemuDomainDetachChrDevice: Don't leak @charAlias

2013-07-18 Thread Michal Privoznik
Moreover, since virAsprintf now does report OOM error, there's no need to call virReportOOMError in error path. --- src/qemu/qemu_hotplug.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 788ad47..a98de9d 100644 ---

Re: [libvirt] [PATCH v2 8/8] qemu: Emit VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED events

2013-07-18 Thread Daniel P. Berrange
On Thu, Jul 18, 2013 at 12:03:50PM +0200, Jiri Denemark wrote: --- Notes: Version 2: - update qemuhotplugtest to initialize domainEventState src/qemu/qemu_hotplug.c | 30 -- tests/qemuhotplugtest.c | 3 +++ 2 files changed, 31 insertions(+), 2

[libvirt] [PATCH 1/3] caps: Add helpers to convert NUMA nodes to corresponding CPUs

2013-07-18 Thread Peter Krempa
These helpers use the remembered host capabilities to retrieve the cpu map rather than query the host again. The intended usage for this helpers is to fix automatic NUMA placement with strict memory alloc. The code doing the prepare needs to pin the emulator process only to cpus belonging to a

[libvirt] [PATCH (v4, kind of) 0/3] Use correct cpu set when doing automatic NUMA placement

2013-07-18 Thread Peter Krempa
With automatic cpu placement mode, the actual numa node set was ignored when setting CPUs. This patchset introduces helpers and actual code to set the cpu binding policy according to the NUMA node set that is requested. Osier Yang (1): qemu: Set cpuset.cpus for domain process Peter Krempa

[libvirt] [PATCHv4 2/3] qemu: Set cpuset.cpus for domain process

2013-07-18 Thread Peter Krempa
From: Osier Yang jy...@redhat.com When either cpuset of vcpu is specified, or the placement of vcpu is auto, only setting the cpuset.mems might cause the guest starting to fail. E.g. (placement of both vcpu and numatune is auto): 1) Related XMLs vcpu placement='auto'4/vcpu numatune

[libvirt] [PATCH] qemu: add qemu.conf option to disable PCI passthrough

2013-07-18 Thread Ján Tomko
--- Note: virPCIProbeStubDriver is currently broken because of 2f8babc, I've sent a fix: https://www.redhat.com/archives/libvir-list/2013-July/msg01154.html src/qemu/libvirtd_qemu.aug | 1 + src/qemu/qemu.conf | 5 + src/qemu/qemu_conf.c | 2 ++

[libvirt] [PATCH 3/3] qemu: Cleanup coding style nits in qemu_cgroup.c

2013-07-18 Thread Peter Krempa
--- src/qemu/qemu_cgroup.c | 69 +++--- 1 file changed, 38 insertions(+), 31 deletions(-) diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c index 0ccbff9..1a24fb3 100644 --- a/src/qemu/qemu_cgroup.c +++ b/src/qemu/qemu_cgroup.c @@ -76,8

Re: [libvirt] [PATCH v2 8/8] qemu: Emit VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED events

2013-07-18 Thread Jiri Denemark
On Thu, Jul 18, 2013 at 11:44:20 +0100, Daniel Berrange wrote: On Thu, Jul 18, 2013 at 12:03:50PM +0200, Jiri Denemark wrote: --- Notes: Version 2: - update qemuhotplugtest to initialize domainEventState src/qemu/qemu_hotplug.c | 30 --

Re: [libvirt] [PATCH] virAsprintf: correctly check return value

2013-07-18 Thread Peter Krempa
On 07/18/13 12:37, Ján Tomko wrote: When virAsprintf was changed from a function to a macro reporting OOM error in dc6f2da, it was documented as returning 0 on success. This is incorrect, it returns the number of bytes written as asprintf does. Some of the functions were converted to use

Re: [libvirt] [PATCH v2 8/8] qemu: Emit VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED events

2013-07-18 Thread Daniel P. Berrange
On Thu, Jul 18, 2013 at 12:58:46PM +0200, Jiri Denemark wrote: On Thu, Jul 18, 2013 at 11:44:20 +0100, Daniel Berrange wrote: On Thu, Jul 18, 2013 at 12:03:50PM +0200, Jiri Denemark wrote: --- Notes: Version 2: - update qemuhotplugtest to initialize domainEventState

Re: [libvirt] [PATCH] qemu: add qemu.conf option to disable PCI passthrough

2013-07-18 Thread Daniel P. Berrange
On Thu, Jul 18, 2013 at 12:52:56PM +0200, Ján Tomko wrote: --- Note: virPCIProbeStubDriver is currently broken because of 2f8babc, I've sent a fix: https://www.redhat.com/archives/libvir-list/2013-July/msg01154.html src/qemu/libvirtd_qemu.aug | 1 + src/qemu/qemu.conf

Re: [libvirt] [PATCH 4/6] LXC: Wire up the virDomainCreate{XML}WithFiles methods

2013-07-18 Thread Daniel P. Berrange
On Thu, Jul 18, 2013 at 10:43:59AM +0200, Michal Privoznik wrote: On 12.07.2013 17:38, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Wire up the new virDomainCreate{XML}WithFiles methods in the LXC driver, so that FDs get passed down to the init process. The

[libvirt] [PATCH 1/4] qemu: refactor qemuDomainCheckDiskPresence for only disk presence check

2013-07-18 Thread Guannan Ren
Refactor this function to make it focus on disk presence checking, including diskchain checking, and not only for CDROM and Floppy. This change is good for the following patches. --- src/qemu/qemu_domain.c | 99 ++ 1 file changed, 59 insertions(+),

[libvirt] [PATCH 3/4] qemu: check presence of each disk in chain

2013-07-18 Thread Guannan Ren
For disk with startupPolicy support, such as cdrom and floppy when its chain is broken, the startup policy will apply, otherwise, report error on chain issue. Force to collect diskchain metadata when qemu process start everytime. --- src/qemu/qemu_domain.c | 19 ++-

[libvirt] [PATCH 0/4] fix two issues about diskchain

2013-07-18 Thread Guannan Ren
1, Report an backing missing error on guest boot if its disks have broken backing file chain 2, List volume even if its diskchain is broken Guannan Ren(4) [PATCH 1/4] qemu: refactor qemuDomainCheckDiskPresence for only disk [PATCH 2/4] qemu: report error if disk backing files doesn't exist

[libvirt] [PATCH 2/4] qemu: report error if disk backing files doesn't exist

2013-07-18 Thread Guannan Ren
Adding virFileAccessibleAs() to check if the backing file described in disk meta exist in real path. If not, report error. The uid and gid arguments don't take effect on F_OK mode for access, so use gid and gid of current process. --- src/util/virstoragefile.c | 23 +++

[libvirt] [PATCH 4/4] storage: list volumes even if its diskchain is broken

2013-07-18 Thread Guannan Ren
--- src/storage/storage_backend_fs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/storage/storage_backend_fs.c b/src/storage/storage_backend_fs.c index d305b06..c6c019d 100644 --- a/src/storage/storage_backend_fs.c +++ b/src/storage/storage_backend_fs.c @@ -94,7

Re: [libvirt] [PATCH 2/2] qemuhotplugtest: Resolve some memleaks

2013-07-18 Thread Peter Krempa
On 07/18/13 12:44, Michal Privoznik wrote: If testQemuHotplugAttach succeeds, the vm-def steals the dev pointer. However, not the envelope, which needs to be freed. In addition, driver.config is allocated, but never freed. --- tests/qemuhotplugtest.c | 10 +- 1 file changed, 5

Re: [libvirt] [PATCH 1/2] qemuDomainDetachChrDevice: Don't leak @charAlias

2013-07-18 Thread Peter Krempa
s/@charAlias/@devstr/ On 07/18/13 12:44, Michal Privoznik wrote: Moreover, since virAsprintf now does report OOM error, there's no need to call virReportOOMError in error path. --- src/qemu/qemu_hotplug.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git

[libvirt] [PATCH V2] add console support in libxl

2013-07-18 Thread Bamvor Jian Zhang
this patch introduce the console api in libxl driver for both pv and hvm guest. and import and update the libxlMakeChrdevStr function which was deleted in commit dfa1e1dd. Signed-off-by: Bamvor Jian Zhang bjzh...@suse.com --- changes since V1: 1), add virDomainOpenConsoleEnsureACL 3), remove

Re: [libvirt] [PATCH] Add virtio-scsi to fallback models of scsi controller

2013-07-18 Thread Daniel P. Berrange
On Mon, Jul 15, 2013 at 02:54:58PM +0200, Martin Kletzander wrote: On 07/15/2013 02:24 PM, Daniel P. Berrange wrote: On Mon, Jul 15, 2013 at 09:50:45AM +0200, Martin Kletzander wrote: When user does not specify any model for scsi controller, or worse, no controller at all, but libvirt

Re: [libvirt] [PATCH 3/3] qemu: Cleanup coding style nits in qemu_cgroup.c

2013-07-18 Thread Martin Kletzander
On 07/18/2013 12:49 PM, Peter Krempa wrote: --- src/qemu/qemu_cgroup.c | 69 +++--- 1 file changed, 38 insertions(+), 31 deletions(-) ACK, Martin -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] [PATCHv4 2/3] qemu: Set cpuset.cpus for domain process

2013-07-18 Thread Martin Kletzander
On 07/18/2013 12:49 PM, Peter Krempa wrote: From: Osier Yang jy...@redhat.com When either cpuset of vcpu is specified, or the placement of vcpu is auto, only setting the cpuset.mems might cause the guest starting to fail. E.g. (placement of both vcpu and numatune is auto): [...] diff

Re: [libvirt] [PATCH 1/3] caps: Add helpers to convert NUMA nodes to corresponding CPUs

2013-07-18 Thread Martin Kletzander
On 07/18/2013 12:49 PM, Peter Krempa wrote: These helpers use the remembered host capabilities to retrieve the cpu map rather than query the host again. The intended usage for this helpers is to fix automatic NUMA placement with strict memory alloc. The code doing the prepare needs to pin the

Re: [libvirt] [PATCHv2 2/2] security_dac: compute supplemental groups before fork

2013-07-18 Thread Michal Privoznik
On 18.07.2013 01:08, Eric Blake wrote: Commit 75c1256 states that virGetGroupList must not be called between fork and exec, then commit ee777e99 promptly violated that for lxc's use of virSecurityManagerSetProcessLabel. Hoist the supplemental group detection to the time that the security

Re: [libvirt] [PATCHv4 2/3] qemu: Set cpuset.cpus for domain process

2013-07-18 Thread Peter Krempa
On 07/18/13 14:39, Martin Kletzander wrote: On 07/18/2013 12:49 PM, Peter Krempa wrote: From: Osier Yang jy...@redhat.com When either cpuset of vcpu is specified, or the placement of vcpu is auto, only setting the cpuset.mems might cause the guest starting to fail. E.g. (placement of both vcpu

Re: [libvirt] [PATCH] qemu: add qemu.conf option to disable PCI passthrough

2013-07-18 Thread Ján Tomko
On 07/18/2013 01:03 PM, Daniel P. Berrange wrote: Why do we need this non-feature ? If you don't want pci passthrough then just don't use it. We don't need global config params to disble arbitrary guest device types like this. Oh, I didn't write a commit message. VDSM asked for this for

Re: [libvirt] [PATCH v2] Check for link_addr more thoroughly

2013-07-18 Thread Eric Blake
On 07/18/2013 03:11 AM, Guido Günther wrote: Some versions of kFreeBSD (like 9.0) declare link_addr in a header but lack an implementation. This makes ./configure pass but breaks compilation later with a undefined reference to `link_addr' Althought that's a bug in the OS header we

Re: [libvirt] [PATCH] Split up platfrom specifics from bridge driver

2013-07-18 Thread Eric Blake
On 07/18/2013 03:23 AM, Daniel P. Berrange wrote: On Wed, Jul 17, 2013 at 05:41:56PM -0600, Eric Blake wrote: So, although I like the split, I can't help but wonder if your rebase should take the road of adjusting things to use a callback struct, rather than requiring matching implementations

Re: [libvirt] [PATCH] qemu: add qemu.conf option to disable PCI passthrough

2013-07-18 Thread Daniel P. Berrange
On Thu, Jul 18, 2013 at 03:05:04PM +0200, Ján Tomko wrote: On 07/18/2013 01:03 PM, Daniel P. Berrange wrote: Why do we need this non-feature ? If you don't want pci passthrough then just don't use it. We don't need global config params to disble arbitrary guest device types like this.

Re: [libvirt] [PATCH 3/3] qemu: Cleanup coding style nits in qemu_cgroup.c

2013-07-18 Thread Peter Krempa
On 07/18/13 14:39, Martin Kletzander wrote: On 07/18/2013 12:49 PM, Peter Krempa wrote: --- src/qemu/qemu_cgroup.c | 69 +++--- 1 file changed, 38 insertions(+), 31 deletions(-) ACK, Martin Thanks for the review. Series is now pushed with

Re: [libvirt] [PATCHv2 2/2] security_dac: compute supplemental groups before fork

2013-07-18 Thread Eric Blake
On 07/18/2013 06:46 AM, Michal Privoznik wrote: On 18.07.2013 01:08, Eric Blake wrote: Commit 75c1256 states that virGetGroupList must not be called between fork and exec, then commit ee777e99 promptly violated that for lxc's use of virSecurityManagerSetProcessLabel. Hoist the supplemental

Re: [libvirt] [PATCHv4 2/3] qemu: Set cpuset.cpus for domain process

2013-07-18 Thread Martin Kletzander
On 07/18/2013 02:57 PM, Peter Krempa wrote: On 07/18/13 14:39, Martin Kletzander wrote: [...] ACK with these two nits fixed. I noticed that the last hunk of the patch would actually leak the caps in case of cgroups fail. I will be pushing this with the following patch squashed in: diff

Re: [libvirt] [PATCHv2 2/2] security_dac: compute supplemental groups before fork

2013-07-18 Thread Michal Privoznik
On 18.07.2013 15:16, Eric Blake wrote: On 07/18/2013 06:46 AM, Michal Privoznik wrote: On 18.07.2013 01:08, Eric Blake wrote: Commit 75c1256 states that virGetGroupList must not be called between fork and exec, then commit ee777e99 promptly violated that for lxc's use of

[libvirt] [PATCH 2/2] Add API for calling systemd-machined's DBus API

2013-07-18 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com To register virtual machines and containers with systemd-machined, and thus have cgroups auto-created, we need to talk over DBus. This is somewhat tedious code, so introduce a dedicated function to isolate the DBus call in one place. Signed-off-by:

[libvirt] [PATCH 1/2] Introduce virDBusCallMethod virDBusMessageRead methods

2013-07-18 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Doing DBus method calls using libdbus.so is tedious in the extreme. systemd developers came up with a nice high level API for DBus method calls (sd_bus_call_method). While systemd doesn't use libdbus.so, their API design can easily be ported to

Re: [libvirt] [PATCH V2] Expose all CPU features in host definition

2013-07-18 Thread Daniel P. Berrange
On Mon, Jul 15, 2013 at 01:45:56PM -0600, Don Dugger wrote: [snip] We've been going back forth a while now, and I don't think we're ever going to agree on this matter. To move this forward, I'm prepared to accept an API addition that lets apps get the full list of CPU feature flags, provided

Re: [libvirt] [PATCH] tests: split long lines

2013-07-18 Thread Eric Blake
On 07/18/2013 03:26 AM, Daniel P. Berrange wrote: On Wed, Jul 17, 2013 at 11:51:11AM -0600, Eric Blake wrote: Long lines are harder to read and harder to diff; in fact, if lines get too long ( 1000 bytes), it starts causing issues where git send-email refuses to send patches for the file.

Re: [libvirt] [PATCH v2 8/8] qemu: Emit VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED events

2013-07-18 Thread Jiri Denemark
On Thu, Jul 18, 2013 at 12:01:21 +0100, Daniel Berrange wrote: Ok, I've re-read the earlier patches understand this now. ACK Thanks for the reviews. I pushed this series. Jirka -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH V2] Expose all CPU features in host definition

2013-07-18 Thread Don Dugger
On Thu, Jul 18, 2013 at 02:37:33PM +0100, Daniel P. Berrange wrote: On Mon, Jul 15, 2013 at 01:45:56PM -0600, Don Dugger wrote: [snip] We've been going back forth a while now, and I don't think we're ever going to agree on this matter. To move this forward, I'm prepared to accept an API

[libvirt] [PATCH] Allow test cases to be run selectively

2013-07-18 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com When debugging a failing test with many test cases, it is useful to be able to skip most tests. Introducing a new environment variable VIR_TEST_RANGE=N-M enables execution of only the test cases numbered N-M inclusive, starting from 1. For example, to

Re: [libvirt] LXC: autostart feature does set all interfaces to state up.

2013-07-18 Thread Jim Fehlig
Richard, I think you should have cc'd the bug assignee when discussing this issue upstream. Adding him now... Regards, Jim Daniel P. Berrange wrote: On Wed, Jul 17, 2013 at 11:33:22PM +0200, Richard Weinberger wrote: Am 12.07.2013 03:36, schrieb Gao feng: On 07/11/2013 07:58 PM,

[libvirt] [PATCH 0/3] Convert cgroups code to report errors

2013-07-18 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Since the viralloc.h methods were changed to report errors, the cgroups code's approach of returning errno values is even less sensible than it was before. This series changes the cgroups code to report errors throughout. As a general point, I think

[libvirt] [PATCH 3/3] Convert remainder of cgroups code to report errors

2013-07-18 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Convert the remainiing methods in vircgroup.c to report errors instead of returning errno values. Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/util/vircgroup.c | 559 +-- 1 file

[libvirt] [PATCH v2 2/7] conf: Introduce new XML tag mode for disk source

2013-07-18 Thread John Ferlan
From: Osier Yang jy...@redhat.com There are two ways to use a iSCSI LUN as disk source for qemu. * The LUN's path as it shows up on host, e.g. /dev/disk/by-path/ip-$ip:3260-iscsi-$iqn-fc18:iscsi.iscsi0-lun-1 * The libiscsi URI, e.g. iscsi://demo.org:6000/iqn.1992-01.com.example/1 For a

[libvirt] [PATCH v2 3/7] conf: Introduce virDomainDiskSourceIsBlockType

2013-07-18 Thread John Ferlan
Introduce a new helper to check if the disk source is of block type --- src/conf/domain_conf.c | 41 + src/conf/domain_conf.h | 3 +++ src/libvirt_private.syms | 1 + src/qemu/qemu_command.c | 5 ++--- src/qemu/qemu_conf.c | 23

[libvirt] [PATCH v2 6/7] conf: Ignore the volume type disk if its mode is uri

2013-07-18 Thread John Ferlan
From: Osier Yang jy...@redhat.com virDomainDiskDefForeachPath is not only used by the security setting helpers, also used by cgroup setting helpers, so this is to ignore the volume type disk with mode=uri for cgroup setting. --- src/conf/domain_conf.c | 5 - 1 file changed, 4 insertions(+),

[libvirt] [PATCH v2 4/7] qemu: Translate the iscsi pool/volume disk source

2013-07-18 Thread John Ferlan
The difference with already supported pool types (dir, fs, block) is: there are two modes for iscsi pool (or network pools in future), one can specify it either to use the volume target path (the path showed up on host) with mode='host', or to use the remote URI qemu supports (e.g.

[libvirt] [PATCH v2 5/7] tests: Add various network and volume definitions

2013-07-18 Thread John Ferlan
Although they produce no seclabel data, add some tests for coverage of various network and volume disk definitions --- tests/securityselinuxlabeldata/netdisks.txt | 5 +++ tests/securityselinuxlabeldata/netdisks.xml | 58 + tests/securityselinuxlabeldata/voldisks.txt

[libvirt] [PATCH v2 0/7] Support to use iscsi storage in domain conf

2013-07-18 Thread John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=957295 This is an update of Osier's original patch: https://www.redhat.com/archives/libvir-list/2013-June/msg00673.html I initialially reviewed the patches, but now own the case since Osier is still temporarily out. Changes in v2: * Patch 1 - no

[libvirt] [PATCH 2/3] Convert the virCgroupKill* APIs to report errors

2013-07-18 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Instead of returning errno values, change the virCgroupKill* APIs to fully report errors. Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/lxc/lxc_process.c | 15 +-- src/util/vircgroup.c | 108

[libvirt] [PATCH v2 7/7] qemu: Translate the volume type disk source before cgroup setting

2013-07-18 Thread John Ferlan
From: Osier Yang jy...@redhat.com The translation must be done before both of cgroup and security setting, otherwise since the disk source is not translated yet, it might be skipped on cgroup and security setting. --- src/qemu/qemu_process.c | 13 - 1 file changed, 8 insertions(+), 5

Re: [libvirt] LXC: autostart feature does set all interfaces to state up.

2013-07-18 Thread Richard Weinberger
Am 18.07.2013 16:50, schrieb Jim Fehlig: Richard, I think you should have cc'd the bug assignee when discussing this issue upstream. Adding him now... Oh, sorry for that! I thought I did so after pointing Marius to the thread in the mailing list archive, but obviously I forgot. Thanks,

Re: [libvirt] [PATCH v2] Check for link_addr more thoroughly

2013-07-18 Thread Guido Günther
On Thu, Jul 18, 2013 at 07:04:13AM -0600, Eric Blake wrote: On 07/18/2013 03:11 AM, Guido Günther wrote: Some versions of kFreeBSD (like 9.0) declare link_addr in a header but lack an implementation. This makes ./configure pass but breaks compilation later with a undefined

[libvirt] [PATCH] maint: split long lines in Makefiles

2013-07-18 Thread Eric Blake
Makefiles are another easy file to enforce line limits. Mostly straightforward; interesting tricks worth noting: src/Makefile.am: $(confdir) was already defined, use it in more places tests/Makefile.am: path_add and VG required some interesting compression * cfg.mk (sc_prohibit_long_lines): Add

Re: [libvirt] [PATCH V2] add console support in libxl

2013-07-18 Thread Daniel P. Berrange
On Thu, Jul 18, 2013 at 08:14:17PM +0800, Bamvor Jian Zhang wrote: this patch introduce the console api in libxl driver for both pv and hvm guest. and import and update the libxlMakeChrdevStr function which was deleted in commit dfa1e1dd. Signed-off-by: Bamvor Jian Zhang bjzh...@suse.com

Re: [libvirt] [PATCH v2 1/7] storage_iscsi: Reflect the default target port

2013-07-18 Thread Daniel P. Berrange
On Thu, Jul 18, 2013 at 11:02:36AM -0400, John Ferlan wrote: From: Osier Yang jy...@redhat.com The default port for iSCSI target is 3260, which should be reflected to the pool's def. --- src/storage/storage_backend_iscsi.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff

Re: [libvirt] [PATCH v2 2/7] conf: Introduce new XML tag mode for disk source

2013-07-18 Thread Daniel P. Berrange
On Thu, Jul 18, 2013 at 11:02:37AM -0400, John Ferlan wrote: From: Osier Yang jy...@redhat.com There are two ways to use a iSCSI LUN as disk source for qemu. * The LUN's path as it shows up on host, e.g. /dev/disk/by-path/ip-$ip:3260-iscsi-$iqn-fc18:iscsi.iscsi0-lun-1 * The libiscsi

[libvirt] [PATCH] virt-login-shell joins users into lxc container.

2013-07-18 Thread dwalsh
From: Dan Walsh dwa...@redhat.com Openshift wants to have their gears stuck into a container when they login to the system. virt-login-shell will join a running gear with the username of the person running it, or attempt to start the container if it is not running. (Currently containers do not

[libvirt] New program to allow users to join a lxc Container

2013-07-18 Thread dwalsh
[PATCH] virt-login-shell joins users into lxc container. -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

  1   2   >