[libvirt] [PATCH RESEND 1/4] qemu: Expose file opening functions

2013-09-13 Thread Michal Privoznik
The qemuOpenFileAs and qemuOpenFile functions are gonna be needed in later patches. However, they are static now. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- src/qemu/qemu_domain.c | 146 ++ src/qemu/qemu_domain.h | 10

[libvirt] [PATCH RESEND 0/4] Pre-create storage on live migration

2013-09-13 Thread Michal Privoznik
[Resending due to some list difficulties] Currently users are required to pre-create storage on their own upon migration. This patch set implements the feature for RAW, QCOW and QCOW2 images. While for the RAW fallocate() is used (so we are guaranteed subsequent write() won't fail with ENOSPC,

Re: [libvirt] [PATCH] docs: mention hostname subtlety

2013-09-13 Thread Peter Krempa
On 09/12/13 21:20, Eric Blake wrote: An off-list bug report mentioned some confusion where the public documentation of libvirt.c:virConnectGetHostname did not match the private documentation of util/virutil.c:virGetHostname. * src/libvirt.c (virConnectGetHostname): Tweak docs.

Re: [libvirt] [PATCH 2/2] tests: Don't test user config file if ran as root

2013-09-13 Thread Martin Kletzander
On 09/12/2013 05:02 PM, Eric Blake wrote: On 09/12/2013 06:47 AM, Daniel P. Berrange wrote: ACK if you can answer the question either way. Thanks, should I wait for ACK on 1/2 before pushing or have you seen that in the archives? Odd, I've not see any cover letter or 1/2 patch arrive.

Re: [libvirt] [PATCHv2 1/4] net-dhcp-leases: Implement the public APIs

2013-09-13 Thread Osier Yang
On 13/09/13 05:53, Nehal J Wani wrote: Introduce 3 new APIs, virNetworkGetDHCPLeases, virNetworkGetDHCPLeasesForMAC and virNetworkDHCPLeaseFree. * virNetworkGetDHCPLeases: returns the dhcp leases information for a given virtual network. The information includes lease expirytime, MAC

Re: [libvirt] [PATCHv2 3/4] net-dhcp-leases: Private implementation inside network driver

2013-09-13 Thread Nehal J Wani
Just realized that obj should be non-null. Small diff to fix this: diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index 2cdea56..3e93893 100644 --- a/src/network/bridge_driver.c +++ b/src/network/bridge_driver.c @@ -3020,7 +3020,8 @@ networkGetDHCPLeases(virNetworkPtr

Re: [libvirt] Can I request a new release of libvirt-java?

2013-09-13 Thread Wido den Hollander
On 09/13/2013 10:29 AM, Daniel Veillard wrote: On Mon, Sep 02, 2013 at 08:14:33AM +0800, Daniel Veillard wrote: On Fri, Aug 30, 2013 at 12:31:55PM +0200, Wido den Hollander wrote: On 08/15/2013 11:00 AM, Wido den Hollander wrote: Hello, In the recent months various new methods were added

Re: [libvirt] [PATCHv2 2/4] net-dhcp-leases: Implement the remote protocol

2013-09-13 Thread Osier Yang
On 13/09/13 05:53, Nehal J Wani wrote: Implement RPC calls for virNetworkGetDHCPLeases, virNetworkGetDHCPLeasesForMAC daemon/remote.c * Define remoteSerializeNetworkDHCPLeases, remoteDispatchNetworkGetDHCPLeases * Define remoteDispatchNetworkGetDHCPLeasesForMAC

Re: [libvirt] [PATCHv2 3/4] net-dhcp-leases: Private implementation inside network driver

2013-09-13 Thread Osier Yang
On 13/09/13 05:53, Nehal J Wani wrote: By querying the driver for the path of the leases file for the given virtual network and parsing it to retrieve info. src/network/bridge_driver.c: * Implement networkGetDHCPLeases * Implement networkGetDHCPLeasesForMAC * Implement

Re: [libvirt] [PATCH 2/2] tests: Don't test user config file if ran as root

2013-09-13 Thread Laine Stump
On 09/12/2013 11:02 AM, Eric Blake wrote: On 09/12/2013 06:47 AM, Daniel P. Berrange wrote: ACK if you can answer the question either way. Thanks, should I wait for ACK on 1/2 before pushing or have you seen that in the archives? Odd, I've not see any cover letter or 1/2 patch arrive. My

[libvirt] [v0.9.12-maint v3 00/12] Debian's 0.9.12 patches

2013-09-13 Thread Guido Günther
These are the patches Debian is currently carrying on 0.9.12. Most are straight cherry-picks. Since we're maintaining 0.9.12 for our current stable release I'm happy to push these to v0.9.12-maint. The only change over v2 is the adjuste commit message. Daniel P. Berrange (2): Don't ignore

[libvirt] [v0.9.12-maint v3 06/12] rpc: Fix crash on error paths of message dispatching

2013-09-13 Thread Guido Günther
From: Peter Krempa pkre...@redhat.com This patch resolves CVE-2013-0170: https://bugzilla.redhat.com/show_bug.cgi?id=893450 When reading and dispatching of a message failed the message was freed but wasn't removed from the message queue. After that when the connection was about to be closed the

[libvirt] [v0.9.12-maint v3 09/12] conf: Remove callback from stream when freeing entries in console hash

2013-09-13 Thread Guido Günther
From: Peter Krempa pkre...@redhat.com When a domain has a active console connection and is destroyed the callback is called on private data that no longer exist causing a segfault. (cherry picked from commit ba226d334acbc49f6751b430e0c4e00f69eef6bf) --- src/conf/virconsole.c | 3 +++ 1 file

[libvirt] [v0.9.12-maint v3 01/12] daemon: Fix crash in virTypedParameterArrayClear

2013-09-13 Thread Guido Günther
From: Jiri Denemark jdene...@redhat.com Daemon uses the following pattern when dispatching APIs with typed parameters: VIR_ALLOC_N(params, nparams); virDomain*(dom, params, nparams, flags); virTypedParameterArrayClear(params, nparams); In case nparams was originally set to 0,

[libvirt] [v0.9.12-maint v3 04/12] Revert rpc: Discard non-blocking calls only when necessary

2013-09-13 Thread Guido Günther
From: Jiri Denemark jdene...@redhat.com This reverts commit b1e374a7ac56927cfe62435179bf0bba1e08b372, which was rather bad since I failed to consider all sides of the issue. The main things I didn't consider properly are: - a thread which sends a non-blocking call waits for the thread with the

[libvirt] [v0.9.12-maint v3 12/12] Fix race condition when destroying guests

2013-09-13 Thread Guido Günther
From: Daniel P. Berrange berra...@redhat.com When running virDomainDestroy, we need to make sure that no other background thread cleans up the domain while we're doing our work. This can happen if we release the domain object while in the middle of work, because the monitor might detect EOF in

[libvirt] [v0.9.12-maint v3 07/12] qemu: Add support for -no-user-config

2013-09-13 Thread Guido Günther
From: Jiri Denemark jdene...@redhat.com Thanks to this new option we are now able to use modern CPU models (such as Westmere) defined in external configuration file. The qemu-1.1{,-device} data files for qemuhelptest are filled in with qemu-1.1-rc2 output for now. I will update those files with

[libvirt] [v0.9.12-maint v3 08/12] storage: Need to also VIR_FREE(reg)

2013-09-13 Thread Guido Günther
From: Luca Tettamanti ltettama...@acunu.com Commit-id 'afc4631b' added the regfree(reg) to free resources alloc'd during regcomp; however, reg still needed to be VIR_FREE()'d. The call to regfree() also didn't account for possible NULL value. Reformatted the call to be closer to usage. (cherry

[libvirt] [v0.9.12-maint v3 03/12] build: fix virnetlink on glibc 2.11

2013-09-13 Thread Guido Günther
From: Eric Blake ebl...@redhat.com We were being lazy - virnetlink.c was getting uint32_t as a side-effect from glibc 2.14's unistd.h, but older glibc 2.11 does not provide uint32_t from unistd.h. In fact, POSIX states that unistd.h need only provide intptr_t, not all of stdint.h, so the bug

[libvirt] [v0.9.12-maint v3 11/12] Don't ignore return value of qemuProcessKill

2013-09-13 Thread Guido Günther
From: Daniel P. Berrange berra...@redhat.com When calling qemuProcessKill from the virDomainDestroy impl in QEMU, do not ignore the return value. This ensures that if QEMU fails to respond to SIGKILL, the caller will know about the failure. Signed-off-by: Daniel P. Berrange berra...@redhat.com

[libvirt] [v0.9.12-maint v3 10/12] conf: Remove console stream callback only when freeing console helper

2013-09-13 Thread Guido Günther
From: Peter Krempa pkre...@redhat.com Commit ba226d334acbc49f6751b430e0c4e00f69eef6bf tried to fix crash of the daemon when a domain with an open console was destroyed. The fix was wrong as it tried to remove the callback also when the stream was aborted, where at that point the fd stream driver

Re: [libvirt] [v0.9.12-maint v3 00/12] Debian's 0.9.12 patches

2013-09-13 Thread Eric Blake
On 09/13/2013 07:21 AM, Guido Günther wrote: These are the patches Debian is currently carrying on 0.9.12. Most are straight cherry-picks. Since we're maintaining 0.9.12 for our current stable release I'm happy to push these to v0.9.12-maint. The only change over v2 is the adjuste commit

Re: [libvirt] [PATCH] docs: mention hostname subtlety

2013-09-13 Thread Eric Blake
On 09/13/2013 01:41 AM, Peter Krempa wrote: On 09/12/13 21:20, Eric Blake wrote: An off-list bug report mentioned some confusion where the public documentation of libvirt.c:virConnectGetHostname did not match the private documentation of util/virutil.c:virGetHostname. * src/libvirt.c

[libvirt] [PATCH 3/3] cleanup: Kill usage of access(PATH, F_OK) in favor of virFileExists()

2013-09-13 Thread Peter Krempa
Semantics of the libvirt helper are more clear. This change also allows to clean up some pieces of code. --- src/openvz/openvz_conf.c | 2 +- src/parallels/parallels_storage.c | 2 +- src/qemu/qemu_capabilities.c | 4 ++-- src/qemu/qemu_cgroup.c| 6 +++---

Re: [libvirt] [PATCH v2] Add some notes about security considerations when using LXC

2013-09-13 Thread Chen Hanxiao
-Original Message- From: Daniel P. Berrange [mailto:berra...@redhat.com] Sent: Wednesday, September 11, 2013 6:57 PM To: libvir-list@redhat.com Cc: Gao feng; Chen Hanxiao; Daniel P. Berrange Subject: [PATCH v2] Add some notes about security considerations when using LXC From:

[libvirt] [RESEND][PATCHv5 2/4] add pci passthrough to libxl driver

2013-09-13 Thread Chunyan Liu
Add pci passthrough to libxl driver, support attach-device, detach-device and start a vm with pci hostdev specified. Signed-off-by: Chunyan Liu cy...@suse.com --- po/POTFILES.in |2 +- src/libxl/libxl_conf.c | 63 +++ src/libxl/libxl_conf.h |4 +

[libvirt] [PATCH] tools: fix a judgment of equalling zero about an array's length

2013-09-13 Thread lawrancejing
There is no need to go on executing code when the array's length is zero. --- tools/virsh-snapshot.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/virsh-snapshot.c b/tools/virsh-snapshot.c index e37a5b3..d7a4c7b 100644 --- a/tools/virsh-snapshot.c +++

[libvirt] [PATCH] add migration APIs to libxl driver

2013-09-13 Thread Chunyan Liu
--- src/libxl/libxl_conf.h |4 + src/libxl/libxl_driver.c | 641 ++ src/libxl/libxl_driver.h |5 + 3 files changed, 650 insertions(+), 0 deletions(-) diff --git a/src/libxl/libxl_conf.h b/src/libxl/libxl_conf.h index 8ba0ee4..2041cc2 100644

[libvirt] [v0.9.12-maint v2 06/12] rpc: Fix crash on error paths of message dispatching

2013-09-13 Thread Guido Günther
From: Peter Krempa pkre...@redhat.com This patch resolves CVE-2013-0170: https://bugzilla.redhat.com/show_bug.cgi?id=893450 When reading and dispatching of a message failed the message was freed but wasn't removed from the message queue. After that when the connection was about to be closed the

[libvirt] [v0.9.12-maint v2 01/12] daemon: Fix crash in virTypedParameterArrayClear

2013-09-13 Thread Guido Günther
From: Jiri Denemark jdene...@redhat.com Daemon uses the following pattern when dispatching APIs with typed parameters: VIR_ALLOC_N(params, nparams); virDomain*(dom, params, nparams, flags); virTypedParameterArrayClear(params, nparams); In case nparams was originally set to 0,

[libvirt] [v0.9.12-maint v2 03/12] build: fix virnetlink on glibc 2.11

2013-09-13 Thread Guido Günther
From: Eric Blake ebl...@redhat.com We were being lazy - virnetlink.c was getting uint32_t as a side-effect from glibc 2.14's unistd.h, but older glibc 2.11 does not provide uint32_t from unistd.h. In fact, POSIX states that unistd.h need only provide intptr_t, not all of stdint.h, so the bug

[libvirt] [PATCH] Fixed search on libvirt.org

2013-09-13 Thread Daniel Veillard
Ajia pointed out this was broken, I pushed the following patch to fix it, pushed as site breaker Daniel -- Daniel Veillard | Open Source and Standards, Red Hat veill...@redhat.com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | virtualization library

[libvirt] [PATCH 0/4] Pre-create storage on live migration

2013-09-13 Thread Michal Privoznik
Currently users are required to pre-create storage on their own upon migration. This patch set implements the feature for RAW, QCOW and QCOW2 images. While for the RAW fallocate() is used (so we are guaranteed subsequent write() won't fail with ENOSPC, for the latter two we have no other option

Re: [libvirt] [PATCH] Allow root users to have their own configuration file

2013-09-13 Thread Daniel P. Berrange
On Thu, Sep 12, 2013 at 12:07:54PM +0200, Martin Kletzander wrote: On 09/12/2013 12:00 PM, Daniel P. Berrange wrote: On Thu, Sep 12, 2013 at 11:53:32AM +0200, Martin Kletzander wrote: Currently, we have two configuration file paths, one global (where global means root-only and we're

Re: [libvirt] [v0.9.12-maint 08/11] Make sure regree is called close to it's usage

2013-09-13 Thread Luca Tettamanti
Hi Eric, I wasn't aware that my patch had been posted upstream. On Wed, Sep 11, 2013 at 02:46:08PM -0600, Eric Blake wrote: On 09/11/2013 08:00 AM, Luca Tettamanti wrote: This is a backport of 71da3b66a8455faf8019effe3cf504a31f91f54a. --- src/storage/storage_backend_logical.c | 5 -

[libvirt] [PATCH 3/4] qemu_migration: Check size prerequisites

2013-09-13 Thread Michal Privoznik
With new NBD storage migration approach there are several requirements that need to be meet for successful use of the feature. One of them is - the file representing a disk, needs to have at least same size as on the source. Hence, we must transfer a list of pairs [disk target, size] and check on

[libvirt] [PATCH 4/4] qemu_migration: Unlink pre-created storage on error

2013-09-13 Thread Michal Privoznik
If migratioin fails because of whatever reason and we've pre-created any disks, we should remove them instead of letting them lying around. Moreover, we need to save the disks sources into domain status file in case libvirtd gets restarted. Signed-off-by: Michal Privoznik mpriv...@redhat.com ---

Re: [libvirt] [PATCH v2] Add some notes about security considerations when using LXC

2013-09-13 Thread Daniel P. Berrange
On Thu, Sep 12, 2013 at 11:22:18AM +0800, Chen Hanxiao wrote: -Original Message- From: Daniel P. Berrange [mailto:berra...@redhat.com] Sent: Wednesday, September 11, 2013 6:57 PM To: libvir-list@redhat.com Cc: Gao feng; Chen Hanxiao; Daniel P. Berrange Subject: [PATCH v2] Add

[libvirt] [PATCH 0/2] tests: Fix virsh-uriprecedence when ran as root

2013-09-13 Thread Martin Kletzander
Basically v2 of http://www.redhat.com/archives/libvir-list/2013-September/msg00689.html Martin Kletzander (2): test-lib: Make case skipping possible tests: Don't test user config file if ran as root tests/test-lib.sh | 18 ++ tests/virsh-uriprecedence | 6 +- 2

[libvirt] [PATCH 2/4] qemu_domain: Introduce qemuDomainGetDiskBlockInfo

2013-09-13 Thread Michal Privoznik
This is just digging out important implementation from qemu driver's qemuDomainGetDiskBlockInfo() API as this functionality is going to be required in the next patch. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- src/qemu/qemu_domain.c | 124

[libvirt] [PATCH 1/2] test-lib: Make case skipping possible

2013-09-13 Thread Martin Kletzander
Signed-off-by: Martin Kletzander mklet...@redhat.com --- tests/test-lib.sh | 18 ++ 1 file changed, 18 insertions(+) diff --git a/tests/test-lib.sh b/tests/test-lib.sh index 2f79706..e612f8f 100644 --- a/tests/test-lib.sh +++ b/tests/test-lib.sh @@ -41,6 +41,24 @@ test_intro()

Re: [libvirt] [PATCH 2/2] tests: Don't test user config file if ran as root

2013-09-13 Thread Martin Kletzander
On 09/12/2013 01:35 PM, Daniel P. Berrange wrote: On Thu, Sep 12, 2013 at 01:28:45PM +0200, Martin Kletzander wrote: Signed-off-by: Martin Kletzander mklet...@redhat.com --- tests/virsh-uriprecedence | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git

Re: [libvirt] Xen 4.1 misc issues

2013-09-13 Thread Roberto Sassu
On 09/11/2013 08:29 PM, Jim Fehlig wrote: Roberto Sassu wrote: Hi everyone I'm using Ubuntu 12.04.3 LTS with the Xen hypervisor installed (package version: 4.1.2-2ubuntu2.10), and Libvirt v0.10.2.2 (that interacts with Xen through the libxl driver). I performed some adjustments to have the

Re: [libvirt] [PATCH] qemu: Fix checking of guest ABI compatibility when reverting snapshots

2013-09-13 Thread Jiri Denemark
On Thu, Sep 12, 2013 at 11:50:28 +0200, Peter Krempa wrote: When reverting a live internal snapshot with a live guest the ABI compatiblity check was comparing a migratable definition with a normal one. This resulted in the check failing with: revert requires force: Target device address type

[libvirt] USB: about the auto identify funciton for guest OS

2013-09-13 Thread Gonglei (Arei)
Hi, all Qemu upstream had achieved USB Auto Connect function for the guest. the patch was: https://lists.gnu.org/archive/html/qemu-devel/2011-05/msg02341.html However, Libvirt has not provide such an interface that identifies a USB device for pass through with physical port, rather than the

Re: [libvirt] [PATCH] LXC: don't try to mount selinux filesystem when user namespace enabled

2013-09-13 Thread Daniel P. Berrange
On Thu, Sep 12, 2013 at 11:51:31AM +0800, Gao feng wrote: Right now we mount selinuxfs even user namespace is enabled and ignore the error. But we shouldn't ignore these errors when user namespace is not enabled. This patch skips mounting selinuxfs when user namespace enabled.

Re: [libvirt] [PATCH] rbd: Use rbd_create3 to create RBD format 2 images by default

2013-09-13 Thread Daniel P. Berrange
On Thu, Sep 12, 2013 at 11:27:10AM +0200, Wido den Hollander wrote: This new RBD format supports snapshotting and cloning. By having libvirt create images in format 2 end-users of the created images can benefit of the new RBD format. What's the compatibility like here. If one node creates a v2

Re: [libvirt] Can I request a new release of libvirt-java?

2013-09-13 Thread Wido den Hollander
On 09/13/2013 11:26 AM, Daniel Veillard wrote: On Fri, Sep 13, 2013 at 11:13:53AM +0200, Wido den Hollander wrote: On 09/13/2013 10:29 AM, Daniel Veillard wrote: [...] I'm puzzled, how can the build be successful if the main jar is not generated ??? Odd, I tried building the Deb and

[libvirt] Release of libvirt-java-0.5.0

2013-09-13 Thread Daniel Veillard
With a bit of delay, the release needed by Wido is finally available, it is tagged in git and I have pushed tarball, jar and rpms to the FTP: ftp://libvirt.org/libvirt/java/ Wido maybe you can push to Maven, I'm unsure how to do this and last time I tried I made a mess :-) I bumped the

Re: [libvirt] [PATCHv2 3/4] net-dhcp-leases: Private implementation inside network driver

2013-09-13 Thread Osier Yang
On 13/09/13 17:10, Nehal J Wani wrote: Just realized that obj should be non-null. Small diff to fix this: diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index 2cdea56..3e93893 100644 --- a/src/network/bridge_driver.c +++ b/src/network/bridge_driver.c @@ -3020,7 +3020,8

[libvirt] [v0.9.12-maint v3 02/12] security: Fix libvirtd crash possibility

2013-09-13 Thread Guido Günther
From: Martin Kletzander mklet...@redhat.com Fix for CVE-2012-4423. When generating RPC protocol messages, it's strictly needed to have a continuous line of numbers or RPC messages. However in case anyone tries backporting some functionality and will skip a number, there is a possibility to make

Re: [libvirt] [PATCH] tools: add missing 'interface' type and update man page

2013-09-13 Thread Jiri Denemark
On Wed, Sep 11, 2013 at 11:47:14 +0800, Alex Jia wrote: Signed-off-by: Alex Jia a...@redhat.com --- tools/virt-xml-validate.in | 19 +++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/tools/virt-xml-validate.in b/tools/virt-xml-validate.in index

[libvirt] Non-deterministic mail delivery problems

2013-09-13 Thread Daniel P. Berrange
FYI, we are aware that there are mail delivery problems with this list, that started sometime yesterday. The symptom is mails appearing in the list archive fine, but never making it into your INBOX. We have a ticket open for someone to investigate resolve this problem. Regards, Daniel -- |:

[libvirt] [PATCH 1/3] util: Declare that virFileExists shall honor errno

2013-09-13 Thread Peter Krempa
Explicitly state that some parts of the code may require virFileExists to set or preserve a correct errno so that future modifications don't break. --- src/util/virfile.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/util/virfile.c b/src/util/virfile.c index feac3c9..67adc55

Re: [libvirt] [PATCHv2 4/4] net-dhcp-leases: Add virsh support

2013-09-13 Thread Osier Yang
On 13/09/13 05:53, Nehal J Wani wrote: Use virNetworkGetDHCPLeases and virNetworkGetDHCPLeasesForMAC in virsh. The new feature supports the follwing methods: 1. Retrieve leases info for a given virtual network 2. Retrieve leases info for given network interface tools/virsh-domain-monitor.c

Re: [libvirt] [PATCH] tools: fix a judgment of equalling zero about an array's length

2013-09-13 Thread Eric Blake
On 09/12/2013 12:12 AM, lawrancejing wrote: There is no need to go on executing code when the array's length is zero. --- tools/virsh-snapshot.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Looks like the mail queue is being flushed, and that this was sent twice; just in case

[libvirt] [PATCH 2/3] cgroup: Move [qemu|lxc]GetCpuBWStatus to vicgroup.c and refactor it

2013-09-13 Thread Peter Krempa
The function existed in two identical instances in lxc and qemu. Move it to vircgroup.c and simplify it. Refactor the callers too. --- src/libvirt_private.syms | 1 + src/lxc/lxc_driver.c | 52 +--- src/qemu/qemu_driver.c | 51

Re: [libvirt] [PATCH 1/3] util: Declare that virFileExists shall honor errno

2013-09-13 Thread Eric Blake
On 09/13/2013 08:19 AM, Peter Krempa wrote: Explicitly state that some parts of the code may require virFileExists to set or preserve a correct errno so that future modifications don't break. --- src/util/virfile.c | 6 ++ 1 file changed, 6 insertions(+) diff --git

Re: [libvirt] [v0.9.12-maint v3 00/12] Debian's 0.9.12 patches

2013-09-13 Thread Guido Günther
On Fri, Sep 13, 2013 at 07:59:04AM -0600, Eric Blake wrote: On 09/13/2013 07:21 AM, Guido Günther wrote: These are the patches Debian is currently carrying on 0.9.12. Most are straight cherry-picks. Since we're maintaining 0.9.12 for our current stable release I'm happy to push these to

[libvirt] [PATCH 0/3] Clean up usage of access(PATH, F_OK)

2013-09-13 Thread Peter Krempa
Peter Krempa (3): util: Declare that virFileExists shall honor errno cgroup: Move [qemu|lxc]GetCpuBWStatus to vicgroup.c and refactor it cleanup: Kill usage of access(PATH, F_OK) in favor of virFileExists() src/libvirt_private.syms | 1 + src/lxc/lxc_driver.c

Re: [libvirt] [PATCH 3/3] cleanup: Kill usage of access(PATH, F_OK) in favor of virFileExists()

2013-09-13 Thread Martin Kletzander
On 09/13/2013 04:19 PM, Peter Krempa wrote: Semantics of the libvirt helper are more clear. This change also allows to clean up some pieces of code. --- src/openvz/openvz_conf.c | 2 +- src/parallels/parallels_storage.c | 2 +- src/qemu/qemu_capabilities.c | 4 ++--

[libvirt] [v0.9.12-maint v3 05/12] qemu: Fix off-by-one error while unescaping monitor strings

2013-09-13 Thread Guido Günther
From: Peter Krempa pkre...@redhat.com While unescaping the commands the commands passed through to the monitor function qemuMonitorUnescapeArg() initialized lenght of the input string to strlen()+1 which is fine for alloc but not for iteration of the string. This patch fixes the off-by-one error

Re: [libvirt] Non-deterministic mail delivery problems

2013-09-13 Thread Daniel P. Berrange
On Fri, Sep 13, 2013 at 03:09:02PM +0100, Daniel P. Berrange wrote: FYI, we are aware that there are mail delivery problems with this list, that started sometime yesterday. The symptom is mails appearing in the list archive fine, but never making it into your INBOX. We have a ticket open for

Re: [libvirt] [v0.9.12-maint v2 00/12] Debian's 0.9.12 patches

2013-09-13 Thread Eric Blake
On 09/12/2013 02:18 AM, Guido Günther wrote: These are the patches Debian is currently carrying on 0.9.12. Most are straight cherry-picks. Since we're maintaining 0.9.12 for our current stable release I'm happy to push these to v0.9.12-maint. 8/12 is still awkward:

Re: [libvirt] rpmbuild libvirt 1.1.2 problem

2013-09-13 Thread Martin Kletzander
[please don't top-post on technical lists] On 09/12/2013 05:51 PM, Nehal J Wani wrote: The issue is being fixed by the patch: https://www.redhat.com/archives/libvir-list/2013-September/msg00703.html And it is pushed now, commits 38716772 [1] and a1db95d0 [2] should fix the issue. Martin

Re: [libvirt] [PATCHv2] netcf driver: use a single netcf handle for all connections

2013-09-13 Thread Laine Stump
On 09/11/2013 11:58 AM, Daniel P. Berrange wrote: On Wed, Sep 11, 2013 at 11:06:26AM -0400, Laine Stump wrote: +static void +interfaceDriverLock(virNetcfDriverStatePtr driver) +{ +virObjectLock(driver); +} + +static void +interfaceDriverUnlock(virNetcfDriverStatePtr driver) +{ +

Re: [libvirt] rpmbuild libvirt 1.1.2 problem

2013-09-13 Thread Alex Jia
Hi Martin, BTW, I met the same question, and I ran 'make check' under root. -- Regards, Alex - Original Message - From: Martin Kletzander mklet...@redhat.com To: Nehal J Wani nehaljw.k...@gmail.com Cc: libvir-list libvir-list@redhat.com, jsjshaowen...@21cn.com Sent: Thursday,

Re: [libvirt] USB: USB Passthrough Device Autoconnect Feature

2013-09-13 Thread Daniel P. Berrange
On Fri, Sep 13, 2013 at 01:37:33AM +, Gonglei (Arei) wrote: Hi, all Qemu upstream had achieved USB Passthrough Device Autoconnect Feature for the guest. Such as a USB device is unplugged from the host then plugged back in to the same USB physical port. the patch was:

[libvirt] [PATCH RESEND 2/4] qemu_domain: Introduce qemuDomainGetDiskBlockInfo

2013-09-13 Thread Michal Privoznik
This is just digging out important implementation from qemu driver's qemuDomainGetDiskBlockInfo() API as this functionality is going to be required in the next patch. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- src/qemu/qemu_domain.c | 124

Re: [libvirt] [PATCH 2/3] cgroup: Move [qemu|lxc]GetCpuBWStatus to vicgroup.c and refactor it

2013-09-13 Thread Eric Blake
On 09/13/2013 08:19 AM, Peter Krempa wrote: s/vicgroup/vircgroup/ in the subject The function existed in two identical instances in lxc and qemu. Move it to vircgroup.c and simplify it. Refactor the callers too. --- +++ b/src/util/vircgroup.c @@ -3647,3 +3647,32 @@

[libvirt] [PATCHv2 3/4] net-dhcp-leases: Private implementation inside network driver

2013-09-13 Thread Nehal J Wani
By querying the driver for the path of the leases file for the given virtual network and parsing it to retrieve info. src/network/bridge_driver.c: * Implement networkGetDHCPLeases * Implement networkGetDHCPLeasesForMAC * Implement networkGetDHCPLeasesHelper --- src/network/bridge_driver.c

Re: [libvirt] Doc: How to use NPIV in libvirt

2013-09-13 Thread Dennis Jenkins
On Thu, Sep 12, 2013 at 7:57 AM, Osier Yang jy...@redhat.com wrote: Before posting it to WIKI or somewhere, I want to see if there is any suggestions on it, or if I missed something. I suggest putting a small paragraph at the top of the article explaining what NPIV is, and why someone would

[libvirt] [PATCH] build: fix build with latest rawhide kernel headers

2013-09-13 Thread Eric Blake
Bother those kernel developers. In the latest rawhide, kernel and glibc have now been unified so that netinet/in.h and linux/in6.h no longer clash; but linux/if_bridge.h is still not self-contained. Because of the latest header change, the build is failing with: checking for linux/param.h... no

[libvirt] [PATCHv3] Add forwarder attribute to dns / element.

2013-09-13 Thread Diego Woitasen
Useful to set custom forwarders instead of using the contents of /etc/resolv.conf. It helps me to setup dnsmasq as local nameserver to resolv VM domain names from domain 0, when domain option is used. Signed-off-by: Diego Woitasen diego.woita...@vhgroup.net --- docs/formatnetwork.html.in

Re: [libvirt] [PATCH] Explicitly link libvirt_net_rpc against SELINUX_LIBS

2013-09-13 Thread Eric Blake
On 09/13/2013 11:02 AM, Guido Günther wrote: Since virnetsocket conditionally uses selinux we need to link against it otherwise the build fails with: CCLD libvirtd /usr/bin/ld: ../src/.libs/libvirt-lxc.so: undefined reference to symbol 'freecon' /lib/i386-linux-gnu/libselinux.so.1:

Re: [libvirt] [PATCH v3 1/7] libvirt: add new public API virConnectGetCPUModelNames

2013-09-13 Thread Eric Blake
On 09/13/2013 01:25 PM, Eric Blake wrote: On 09/11/2013 08:12 AM, Giuseppe Scrivano wrote: The new function virConnectGetCPUModelNames allows to retrieve the list of CPU models known by the hypervisor for a specific architecture. @@ -18545,6 +18545,9 @@

Re: [libvirt] [PATCH v3 3/7] virConnectGetCPUModelNames: implement the remote protocol

2013-09-13 Thread Eric Blake
On 09/11/2013 08:12 AM, Giuseppe Scrivano wrote: Signed-off-by: Giuseppe Scrivano gscri...@redhat.com --- daemon/remote.c | 43 + src/remote/remote_driver.c | 57 src/remote/remote_protocol.x | 20

Re: [libvirt] [PATCH v3 4/7] virConnectGetCPUModelNames: add the support for qemu

2013-09-13 Thread Eric Blake
On 09/11/2013 08:13 AM, Giuseppe Scrivano wrote: Signed-off-by: Giuseppe Scrivano gscri...@redhat.com --- src/qemu/qemu_driver.c | 14 ++ 1 file changed, 14 insertions(+) ACK. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library

Re: [libvirt] [PATCH v3 5/7] virConnectGetCPUModelNames: add the support for the test protocol

2013-09-13 Thread Eric Blake
On 09/11/2013 08:13 AM, Giuseppe Scrivano wrote: Signed-off-by: Giuseppe Scrivano gscri...@redhat.com --- src/test/test_driver.c | 11 +++ 1 file changed, 11 insertions(+) ACK. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org

Re: [libvirt] [PATCH v3 6/7] virsh: add function to get the CPU models for an arch

2013-09-13 Thread Eric Blake
On 09/11/2013 08:13 AM, Giuseppe Scrivano wrote: Signed-off-by: Giuseppe Scrivano gscri...@redhat.com --- tools/virsh-host.c | 54 ++ tools/virsh.pod| 5 + 2 files changed, 59 insertions(+) + +static bool

Re: [libvirt] [PATCH v3 6/7] virsh: add function to get the CPU models for an arch

2013-09-13 Thread Eric Blake
On 09/13/2013 02:58 PM, Eric Blake wrote: On 09/11/2013 08:13 AM, Giuseppe Scrivano wrote: I tweaked this some during my testing of NULL models; but don't think we need to make virsh expose NULL models to the command line, so I'm not changing this. ACK with this squashed in (oh, I just

Re: [libvirt] [PATCH v3 6/7] virsh: add function to get the CPU models for an arch

2013-09-13 Thread Eric Blake
On 09/11/2013 08:13 AM, Giuseppe Scrivano wrote: Signed-off-by: Giuseppe Scrivano gscri...@redhat.com --- tools/virsh-host.c | 54 ++ tools/virsh.pod| 5 + 2 files changed, 59 insertions(+) + +static const vshCmdOptDef

Re: [libvirt] [PATCH v3 1/7] libvirt: add new public API virConnectGetCPUModelNames

2013-09-13 Thread Eric Blake
On 09/11/2013 08:12 AM, Giuseppe Scrivano wrote: The new function virConnectGetCPUModelNames allows to retrieve the list of CPU models known by the hypervisor for a specific architecture. Signed-off-by: Giuseppe Scrivano gscri...@redhat.com --- /** + * virConnectGetCPUModelNames: + * +

Re: [libvirt] [PATCH v3 2/7] cpu: add function to get the models for an arch

2013-09-13 Thread Eric Blake
On 09/11/2013 08:12 AM, Giuseppe Scrivano wrote: Signed-off-by: Giuseppe Scrivano gscri...@redhat.com --- src/cpu/cpu.c| 56 src/cpu/cpu.h| 3 +++ src/libvirt_private.syms | 1 + 3 files changed, 60 insertions(+)

Re: [libvirt] [PATCH v3 1/7] libvirt: add new public API virConnectGetCPUModelNames

2013-09-13 Thread Eric Blake
On 09/11/2013 08:12 AM, Giuseppe Scrivano wrote: The new function virConnectGetCPUModelNames allows to retrieve the list of CPU models known by the hypervisor for a specific architecture. Signed-off-by: Giuseppe Scrivano gscri...@redhat.com --- +int

Re: [libvirt] Can I request a new release of libvirt-java?

2013-09-13 Thread Daniel Veillard
On Fri, Sep 13, 2013 at 11:13:53AM +0200, Wido den Hollander wrote: On 09/13/2013 10:29 AM, Daniel Veillard wrote: [...] I'm puzzled, how can the build be successful if the main jar is not generated ??? Odd, I tried building the Deb and that works fine:

Re: [libvirt] Non-deterministic mail delivery problems

2013-09-13 Thread Daniel P. Berrange
On Fri, Sep 13, 2013 at 03:09:01PM +0100, Daniel P. Berrange wrote: FYI, we are aware that there are mail delivery problems with this list, that started sometime yesterday. The symptom is mails appearing in the list archive fine, but never making it into your INBOX. We have a ticket open for

[libvirt] [PATCH] Explicitly link libvirt_net_rpc against SELINUX_LIBS

2013-09-13 Thread Guido Günther
Since virnetsocket conditionally uses selinux we need to link against it otherwise the build fails with: CCLD libvirtd /usr/bin/ld: ../src/.libs/libvirt-lxc.so: undefined reference to symbol 'freecon' /lib/i386-linux-gnu/libselinux.so.1: error adding symbols: DSO missing from command line

[libvirt] [PATCH RESEND 3/4] qemu_migration: Check size prerequisites

2013-09-13 Thread Michal Privoznik
With new NBD storage migration approach there are several requirements that need to be meet for successful use of the feature. One of them is - the file representing a disk, needs to have at least same size as on the source. Hence, we must transfer a list of pairs [disk target, size] and check on

[libvirt] [PATCH RESEND 4/4] qemu_migration: Unlink pre-created storage on error

2013-09-13 Thread Michal Privoznik
If migratioin fails because of whatever reason and we've pre-created any disks, we should remove them instead of letting them lying around. Moreover, we need to save the disks sources into domain status file in case libvirtd gets restarted. Signed-off-by: Michal Privoznik mpriv...@redhat.com ---

Re: [libvirt] [PATCH] tools: fix a judgment of equalling zero about an array's length

2013-09-13 Thread Chen Hanxiao
-Original Message- From: libvir-list-boun...@redhat.com [mailto:libvir-list-boun...@redhat.com] On Behalf Of lawrancejing Sent: Friday, September 13, 2013 10:00 AM To: libvir-list@redhat.com Cc: lawrancejing Subject: [libvirt] [PATCH] tools: fix a judgment of equalling zero about

[libvirt] USB: USB Passthrough Device Autoconnect Feature

2013-09-13 Thread Wangyufei (A)
Hello, Qemu upstream had achieved USB Passthrough Device Autoconnect Feature for the guest. Such as a USB device is unplugged from the host then plugged back in to the same USB physical port. the patch was: https://lists.gnu.org/archive/html/qemu-devel/2011-05/msg02341.html However, Libvirt

Re: [libvirt] Can I request a new release of libvirt-java?

2013-09-13 Thread Daniel Veillard
On Mon, Sep 02, 2013 at 08:14:33AM +0800, Daniel Veillard wrote: On Fri, Aug 30, 2013 at 12:31:55PM +0200, Wido den Hollander wrote: On 08/15/2013 11:00 AM, Wido den Hollander wrote: Hello, In the recent months various new methods were added to libvirt-java which we (Apache CloudStack)

Re: [libvirt] [PATCH v3 6/7] virsh: add function to get the CPU models for an arch

2013-09-13 Thread Eric Blake
On 09/13/2013 03:06 PM, Eric Blake wrote: On 09/13/2013 02:58 PM, Eric Blake wrote: On 09/11/2013 08:13 AM, Giuseppe Scrivano wrote: I tweaked this some during my testing of NULL models; but don't think we need to make virsh expose NULL models to the command line, so I'm not changing this.

Re: [libvirt] [PATCH v3 2/7] cpu: add function to get the models for an arch

2013-09-13 Thread Eric Blake
On 09/13/2013 01:29 PM, Eric Blake wrote: On 09/11/2013 08:12 AM, Giuseppe Scrivano wrote: Signed-off-by: Giuseppe Scrivano gscri...@redhat.com --- src/cpu/cpu.c| 56 src/cpu/cpu.h| 3 +++ src/libvirt_private.syms |

Re: [libvirt] [PATCH v3 7/7] python: add bindings for virConnectGetCPUModelNames

2013-09-13 Thread Eric Blake
On 09/11/2013 08:13 AM, Giuseppe Scrivano wrote: Signed-off-by: Giuseppe Scrivano gscri...@redhat.com --- python/generator.py | 2 +- python/libvirt-override-api.xml | 7 ++ python/libvirt-override.c | 52 +

Re: [libvirt] [PATCH v3 7/7] python: add bindings for virConnectGetCPUModelNames

2013-09-13 Thread Eric Blake
On 09/11/2013 08:13 AM, Giuseppe Scrivano wrote: Signed-off-by: Giuseppe Scrivano gscri...@redhat.com --- python/generator.py | 2 +- python/libvirt-override-api.xml | 7 ++ python/libvirt-override.c | 52 +

Re: [libvirt] [PATCH v3 7/7] python: add bindings for virConnectGetCPUModelNames

2013-09-13 Thread Giuseppe Scrivano
Eric Blake ebl...@redhat.com writes: On 09/11/2013 08:13 AM, Giuseppe Scrivano wrote: Signed-off-by: Giuseppe Scrivano gscri...@redhat.com --- python/generator.py | 2 +- python/libvirt-override-api.xml | 7 ++ python/libvirt-override.c | 52