Re: [libvirt] [PATCH] qemu: never send SIGKILL to qemu process unless specifically requested

2012-01-31 Thread Michal Privoznik
On 30.01.2012 21:30, Laine Stump wrote: On 01/30/2012 06:02 AM, Daniel P. Berrange wrote: On Fri, Jan 27, 2012 at 01:35:35PM -0500, Laine Stump wrote: When libvirt is shutting down the qemu process, it first sends SIGTERM, then waits for 1.6 seconds and, if it sees the process still there,

Re: [libvirt] [PATCH] resize: slightly alter signature

2012-01-31 Thread Michal Privoznik
On 30.01.2012 20:04, Eric Blake wrote: Our existing virDomainBlockResize takes an unsigned long long argument; if that command is later taught a DELTA and SHRINK flag, we cannot change its type without breaking API (but at least such a change would be ABI compatible). Meanwhile, the only time

[libvirt] [test-API][PATCH 2/2] Add and update functions in streamAPI

2012-01-31 Thread Wayne Sun
* only accpet stream object as parameter in __init__ * remove newStream() from each function stream object should be pass in as parameter, not create new at each function. function also need flags parameter. * Add 5 new functions screenshot(self, domain, screen, flags = 0)

[libvirt] [test-API][PATCH 1/2] Add 2 new functions in storageAPI

2012-01-31 Thread Wayne Sun
* download(self, poolname, volname, stream, offset, length, flags = 0) * upload(self, poolname, volname, stream, offset, length, flags = 0) --- lib/storageAPI.py | 17 + 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/lib/storageAPI.py b/lib/storageAPI.py

Re: [libvirt] RFC: setting mac address on network devices being assigned to a guest via PCI passthrough (hostdev)

2012-01-31 Thread Laine Stump
On 01/30/2012 08:16 PM, Roopa Prabhu wrote: Laine, I haven't gone through your whole email yet. Was just curious about one quick thing, For sriov VF's, are we expecting that a net device (eth interface) be present on the host if its being used as a hostdev ?. Either should be possible. If

Re: [libvirt] [PATCH] qemu: never send SIGKILL to qemu process unless specifically requested

2012-01-31 Thread Laine Stump
On 01/31/2012 03:30 AM, Michal Privoznik wrote: On 30.01.2012 21:30, Laine Stump wrote: On 01/30/2012 06:02 AM, Daniel P. Berrange wrote: On Fri, Jan 27, 2012 at 01:35:35PM -0500, Laine Stump wrote: When libvirt is shutting down the qemu process, it first sends SIGTERM, then waits for 1.6

Re: [libvirt] [PATCH] qemu: never send SIGKILL to qemu process unless specifically requested

2012-01-31 Thread Daniel P. Berrange
On Mon, Jan 30, 2012 at 03:30:18PM -0500, Laine Stump wrote: On 01/30/2012 06:02 AM, Daniel P. Berrange wrote: On Fri, Jan 27, 2012 at 01:35:35PM -0500, Laine Stump wrote: When libvirt is shutting down the qemu process, it first sends SIGTERM, then waits for 1.6 seconds and, if it sees the

Re: [libvirt] [test-API][PATCH 2/2] Add and update functions in streamAPI

2012-01-31 Thread Alex Jia
On 01/31/2012 04:46 PM, Wayne Sun wrote: * only accpet stream object as parameter in __init__ * remove newStream() from each function stream object should be pass in as parameter, not create new at each function. function also need flags parameter. * Add 5 new functions

Re: [libvirt] [PATCH V4 3/5] add nodeGetCPUmap.

2012-01-31 Thread Hu Tao
On Sat, Jan 28, 2012 at 03:24:04PM +0900, KAMEZAWA Hiroyuki wrote: add nodeGetCPUmap() for getting available CPU IDs in a bitmap. add virBitmapParseCommaSeparetedFormat() for parsing bitmap in comma separeted ascii format. This format of bitmap is used in Linux sysfs and cpuset. * cpuacct's

Re: [libvirt] [test-API][PATCH 2/2] Add and update functions in streamAPI

2012-01-31 Thread Alex Jia
On 01/31/2012 06:07 PM, Alex Jia wrote: On 01/31/2012 04:46 PM, Wayne Sun wrote: * only accpet stream object as parameter in __init__ * remove newStream() from each function stream object should be pass in as parameter, not create new at each function. function also need

[libvirt] [[libvirt-glib PATCHv2]] API to get/set custom metadata from/to domain config

2012-01-31 Thread Christophe Fergeau
Based on a patch from Zeeshan Ali (Khattak) zeesha...@gnome.org --- libvirt-gconfig/libvirt-gconfig-domain.c | 60 + libvirt-gconfig/libvirt-gconfig-domain.h |7 +++ libvirt-gconfig/libvirt-gconfig-helpers-private.h |1 +

[libvirt] [[libvirt-glib PATCHv2] 2/4] Don't use g_error in xxx_get_name

2012-01-31 Thread Christophe Fergeau
g_error will trigger an abort of the running process so it's not desirable to call it in a library. This commit adds a GError ** parameter to all _get_name methods which were calling g_error. --- libvirt-gobject/libvirt-gobject-connection.c | 10 --

[libvirt] [[libvirt-glib PATCHv2] 3/4] Output runtime warning when *_get_name fails

2012-01-31 Thread Christophe Fergeau
*_get_name failures used to trigger a crash of the application because of the use of g_error. Now that it's removed, such failures may go unnoticed and unchecked. Add a runtime warning when a failure occurs. --- libvirt-gobject/libvirt-gobject-domain-snapshot.c |1 +

[libvirt] [[libvirt-glib PATCHv2] 1/4] Add proper error reporting to GVirStorageVol getters

2012-01-31 Thread Christophe Fergeau
gvir_storage_vol_get_name and gvir_storage_vol_get_path currently call g_error when an error occurs. Since g_error trigger a coredump, calling it in a library is harmful. Replace this with proper GError error reporting. --- libvirt-gobject/libvirt-gobject-storage-pool.c | 10 +++---

[libvirt] [[libvirt-glib PATCHv2] 4/4] Replace g_error with g_warning in constructors

2012-01-31 Thread Christophe Fergeau
g_error generates a fatal error message, meaning it will abort the currently running process. It's nicer to use g_warning here. --- libvirt-gobject/libvirt-gobject-domain.c |4 +++- libvirt-gobject/libvirt-gobject-network-filter.c |4 +++- libvirt-gobject/libvirt-gobject-network.c

[libvirt] Qemu text monitor

2012-01-31 Thread Shradha Shah
Hello All, I am currently working with libvirt on RHEL6.2. There are a few points I have noticed regarding the QEMU monitor. When I hotplug a device into the guest, the Qemu text monitor receives a device_add command and adds the device to its current devices list (I found this list via the

Re: [libvirt] g_error considered harmful

2012-01-31 Thread Christophe Fergeau
On Mon, Jan 30, 2012 at 07:22:54PM +0100, Marc-André Lureau wrote: Hi In general I agree with the patch series dropping g_error() in favour of normal GError reporting, so programs can cope with errors. However, it removes the forced logging and it's too easy for the caller to ignore them,

Re: [libvirt] Build issue with libvirt 0.9.8

2012-01-31 Thread Christophe Fergeau
On Fri, Dec 09, 2011 at 02:18:02PM +0100, Christophe Fergeau wrote: Hi, On Fri, Dec 09, 2011 at 11:18:48AM +, Daniel P. Berrange wrote: There is something odd about the way it is being built: The combination of these 3 sets of messages, makes me think you have confused libtool

Re: [libvirt] Qemu text monitor

2012-01-31 Thread Michal Privoznik
On 31.01.2012 12:12, Shradha Shah wrote: Hello All, I am currently working with libvirt on RHEL6.2. There are a few points I have noticed regarding the QEMU monitor. When I hotplug a device into the guest, the Qemu text monitor receives a device_add command and adds the device to its

Re: [libvirt] [RFC Incomplete Patch] Libvirt + Openvswitch

2012-01-31 Thread Daniel P. Berrange
On Fri, Jan 27, 2012 at 02:58:58AM -0800, Dan Wendlandt wrote: Hello all, I know of many people who want to spin up VMs using libvirt + kvm/qemu and attach those VMs to an openvswitch bridge (see: http://www.openvswitch.org). However, the only way I know of to get this working is a kludge

Re: [libvirt] [RFC Incomplete Patch] Libvirt + Openvswitch

2012-01-31 Thread Daniel P. Berrange
On Mon, Jan 30, 2012 at 02:49:03PM -0600, kmestery wrote: On Jan 30, 2012, at 2:41 PM, Dan Wendlandt wrote: Hi Kyle! Funny how we keep bumping into each other... I hope you're keeping warm in Minnesota :) On Fri, Jan 27, 2012 at 11:22 AM, kmestery kmest...@cisco.com wrote: Hi Dan:

Re: [libvirt] [PATCH v2 3/4] util: extend virExecWithHook()

2012-01-31 Thread Daniel P. Berrange
On Tue, Jan 31, 2012 at 01:51:22PM +0900, Taku Izumi wrote: This patch extends virExecWithHook() to receive capability information. Signed-off-by: Taku Izumi izumi.t...@jp.fujitsu.com Signed-off-by: Shota Hirae m11g1...@hibikino.ne.jp --- src/util/command.c | 16 ++-- 1

Re: [libvirt] [PATCH v2 1/4] conf: add rawio attribute to disk element of domain XML

2012-01-31 Thread Daniel P. Berrange
On Tue, Jan 31, 2012 at 01:49:11PM +0900, Taku Izumi wrote: @@ -3156,6 +3159,26 @@ virDomainDiskDefParseXML(virCapsPtr caps def-snapshot = VIR_DOMAIN_DISK_SNAPSHOT_NO; } +def-rawio = -1; /* unspecified */ +if (rawio) { +if (def-device ==

Re: [libvirt] [PATCH v2 2/4] util: add functions to keep capabilities

2012-01-31 Thread Daniel P. Berrange
On Tue, Jan 31, 2012 at 01:50:42PM +0900, Taku Izumi wrote: This patch introduces virSetCapabilities() function and implements virCommandAllowCap() function. Existing virClearCapabilities() is function to clear all capabilities. Instead virSetCapabilities() is function to set arbitrary

Re: [libvirt] [PATCH v2 4/4] qemu: make qemu processes to retain rawio capability

2012-01-31 Thread Daniel P. Berrange
On Tue, Jan 31, 2012 at 01:52:27PM +0900, Taku Izumi wrote: This patch revises qemuProcessStart() function for qemu processes to retain CAP_SYS_RAWIO if needed. And in case of that, add taint flag to domain. Signed-off-by: Taku Izumi izumi.t...@jp.fujitsu.com Signed-off-by: Shota Hirae

Re: [libvirt] [[libvirt-glib PATCHv2] 1/4] Add proper error reporting to GVirStorageVol getters

2012-01-31 Thread Daniel P. Berrange
On Tue, Jan 31, 2012 at 12:00:20PM +0100, Christophe Fergeau wrote: gvir_storage_vol_get_name and gvir_storage_vol_get_path currently call g_error when an error occurs. Since g_error trigger a coredump, calling it in a library is harmful. Replace this with proper GError error reporting. ---

Re: [libvirt] [[libvirt-glib PATCHv2] 2/4] Don't use g_error in xxx_get_name

2012-01-31 Thread Daniel P. Berrange
On Tue, Jan 31, 2012 at 12:00:21PM +0100, Christophe Fergeau wrote: g_error will trigger an abort of the running process so it's not desirable to call it in a library. This commit adds a GError ** parameter to all _get_name methods which were calling g_error. ---

Re: [libvirt] [[libvirt-glib PATCHv2] 4/4] Replace g_error with g_warning in constructors

2012-01-31 Thread Daniel P. Berrange
On Tue, Jan 31, 2012 at 12:00:23PM +0100, Christophe Fergeau wrote: g_error generates a fatal error message, meaning it will abort the currently running process. It's nicer to use g_warning here. --- libvirt-gobject/libvirt-gobject-domain.c |4 +++-

Re: [libvirt] [[libvirt-glib PATCHv2]] API to get/set custom metadata from/to domain config

2012-01-31 Thread Daniel P. Berrange
On Tue, Jan 31, 2012 at 12:02:05PM +0100, Christophe Fergeau wrote: Based on a patch from Zeeshan Ali (Khattak) zeesha...@gnome.org --- libvirt-gconfig/libvirt-gconfig-domain.c | 60 + libvirt-gconfig/libvirt-gconfig-domain.h |7 +++

Re: [libvirt] [PATCH] tests: virnettlscontexttest needs gnutls-2.6.0

2012-01-31 Thread Daniel P. Berrange
On Mon, Jan 30, 2012 at 12:10:57PM -0700, Eric Blake wrote: On 01/30/2012 10:44 AM, Philipp Hahn wrote: virnettlscontexttest uses gnutls_x509_crt_set_subject_alt_name() and GNUTLS_FSAN_APPEND, which - according to http://www.gnu.org/software/gnutls/manual/gnutls.html - are only available

Re: [libvirt] Implement virStorageVolResize() for FS backend

2012-01-31 Thread Daniel P. Berrange
On Mon, Jan 30, 2012 at 09:40:11AM +0200, Zeeshan Ali (Khattak) wrote: From: Zeeshan Ali (Khattak) zeesha...@gnome.org Currently only VIR_STORAGE_VOL_RESIZE_DELTA flag is supported. --- src/storage/storage_backend.h|6 +++ src/storage/storage_backend_fs.c | 53

Re: [libvirt] [[libvirt-glib PATCHv2]] API to get/set custom metadata from/to domain config

2012-01-31 Thread Christophe Fergeau
On Tue, Jan 31, 2012 at 12:11:31PM +, Daniel P. Berrange wrote: On Tue, Jan 31, 2012 at 12:02:05PM +0100, Christophe Fergeau wrote: Based on a patch from Zeeshan Ali (Khattak) zeesha...@gnome.org --- libvirt-gconfig/libvirt-gconfig-domain.c | 60 +

[libvirt] [PATCH] qemu: Clenup qemuDomainSetInterfaceParameters

2012-01-31 Thread Michal Privoznik
which contained some useless lines, copied code, NULL dereference. --- src/libvirt.c |4 ++-- src/qemu/qemu_driver.c | 44 2 files changed, 18 insertions(+), 30 deletions(-) diff --git a/src/libvirt.c b/src/libvirt.c index

Re: [libvirt] [PATCH] tests: virnettlscontexttest needs gnutls-2.6.0

2012-01-31 Thread Philipp Hahn
Hello Eric, Am Montag 30 Januar 2012 20:10:57 schrieb Eric Blake: +#if !defined WIN32 HAVE_LIBTASN1_H !defined GNUTLS_1_0_COMPAT LIBGNUTLS_VERSION_NUMBER 0x020600 Isn't that what GNUTLS_1_0_COMPAT is already doing?  That is, GNUTLS_1_0_COMPAT should only be defined if we are already

[libvirt] [[libvirt-glib PATCHv3] 1/3] Add proper error reporting to gvir_storage_vol_get_path

2012-01-31 Thread Christophe Fergeau
gvir_storage_vol_get_name currently call g_error when an error occurs. Since g_error trigger a coredump, calling it in a library is harmful. Replace this with proper GError error reporting. --- libvirt-gobject/libvirt-gobject-storage-vol.c |7 +--

[libvirt] [[libvirt-glib PATCHv3] 3/3] Replace g_error with g_warning in constructors

2012-01-31 Thread Christophe Fergeau
g_error generates a fatal error message, meaning it will abort the currently running process. It's nicer to use g_warning here. --- libvirt-gobject/libvirt-gobject-domain.c |9 - libvirt-gobject/libvirt-gobject-network-filter.c |9 -

[libvirt] [[libvirt-glib PATCHv3] 2/3] Don't use g_error in xxx_get_name

2012-01-31 Thread Christophe Fergeau
g_error will trigger an abort of the running process so it's not desirable to call it in a library. This commit uses g_warning when this occurs and returns NULL. libvirt will only return NULL for these strings if some kind of memory corruption is going on, or if we are using an invalid pointer.

Re: [libvirt] RFC: setting mac address on network devices being assigned to a guest via PCI passthrough (hostdev)

2012-01-31 Thread Roopa Prabhu
On 1/31/12 1:16 AM, Laine Stump la...@laine.org wrote: On 01/30/2012 08:16 PM, Roopa Prabhu wrote: Laine, I haven't gone through your whole email yet. Was just curious about one quick thing, For sriov VF's, are we expecting that a net device (eth interface) be present on the host if its

Re: [libvirt] [[libvirt-glib PATCHv3] 1/3] Add proper error reporting to gvir_storage_vol_get_path

2012-01-31 Thread Daniel P. Berrange
On Tue, Jan 31, 2012 at 03:34:09PM +0100, Christophe Fergeau wrote: gvir_storage_vol_get_name currently call g_error when an error occurs. Since g_error trigger a coredump, calling it in a library is harmful. Replace this with proper GError error reporting. ---

Re: [libvirt] [[libvirt-glib PATCHv3] 2/3] Don't use g_error in xxx_get_name

2012-01-31 Thread Daniel P. Berrange
On Tue, Jan 31, 2012 at 03:34:10PM +0100, Christophe Fergeau wrote: g_error will trigger an abort of the running process so it's not desirable to call it in a library. This commit uses g_warning when this occurs and returns NULL. libvirt will only return NULL for these strings if some kind of

Re: [libvirt] [PATCH] tests: dynamically replace dnsmasq path

2012-01-31 Thread Philipp Hahn
Hello Eric, Am Montag 30 Januar 2012 20:18:15 schrieb Eric Blake: +if (diff 0) { +tmp = realloc((void *)*buf, new_len); We should not be using realloc in this file, but should be using VIR_RESIZE_N or similar. Okay, makes the code even more readable. +

Re: [libvirt] [PATCH] tests: virnettlscontexttest needs gnutls-2.6.0

2012-01-31 Thread Philipp Hahn
Hello, On Monday 30 January 2012 18:44:13 Philipp Hahn wrote: +#if !defined WIN32 HAVE_LIBTASN1_H !defined GNUTLS_1_0_COMPAT LIBGNUTLS_VERSION_NUMBER 0x020600 That should probably be = instead of , but I haven't checked the gnutls source code history. Sincerely Philipp -- Philipp Hahn

Re: [libvirt] virDomainNetGetActualBridgeName doesn't return the actual bridge

2012-01-31 Thread Cole Robinson
On 01/30/2012 08:15 AM, Hendrik Schwartke wrote: Hi, calling virDomainNetGetActualBridgeName on a bridge with type VIR_DOMAIN_NET_TYPE_NETWORK seems to return NULL in any case, because iface-data.network.actual is NULL. Is that intented? What is the best way to determine the bridge the

[libvirt] [PATCH] qemu: Don't jump to endjob if no job was even started

2012-01-31 Thread Michal Privoznik
In qemuDomainShutdownFlags if we try to use guest agent, which has error or is not configured, we jump go endjob label even if we haven't started any job yet. This may lead to the daemon crash: 1) virsh shutdown --mode agent on a domain without agent configured 2) wait until domain quits 3) virsh

[libvirt] RFC API proposal: virDomainBlockRebase

2012-01-31 Thread Eric Blake
Right now, the existing virDomainBlockPull API has a tough limitation - it is an all-or-none approach. In all my examples below, I'm starting from the following relationship, where '-' means 'is a backing file of': template - intermediate - current virDomainBlockPull can only convert things in

[libvirt] [PATCH v2] tests: virnettlscontexttest needs gnutls-2.6.0

2012-01-31 Thread Philipp Hahn
virnettlscontexttest uses gnutls_x509_crt_set_subject_alt_name() and GNUTLS_FSAN_APPEND, which - according to http://www.gnu.org/software/gnutls/manual/gnutls.html - are only available since 2.6.0. Since libvirt still works fine with gnutls-1.0.25 from RHEL5, only enable the test when the version

[libvirt] [PATCH v2] tests: dynamically replace dnsmasq path

2012-01-31 Thread Philipp Hahn
The path to the dnsmasq binary can be configured while in the test data the path is hard-coded to /usr/bin/. This break the test suite if a the binary is located in a different location, like /usr/local/sbin/. Replace the hard coded path in the test data by a token, which is dynamically replaced

Re: [libvirt] virDomainNetGetActualBridgeName doesn't return the actual bridge

2012-01-31 Thread Laine Stump
On 01/30/2012 08:15 AM, Hendrik Schwartke wrote: Hi, calling virDomainNetGetActualBridgeName on a bridge with type VIR_DOMAIN_NET_TYPE_NETWORK seems to return NULL in any case, because iface-data.network.actual is NULL. Is that intented? Yes, that's how it was intended to work. It has a

Re: [libvirt] virDomainNetGetActualBridgeName doesn't return the actual bridge

2012-01-31 Thread Laine Stump
On 01/31/2012 11:55 AM, Laine Stump wrote: On 01/30/2012 08:15 AM, Hendrik Schwartke wrote: Hi, calling virDomainNetGetActualBridgeName on a bridge with type VIR_DOMAIN_NET_TYPE_NETWORK seems to return NULL in any case, because iface-data.network.actual is NULL. Is that intented? Yes,

Re: [libvirt] [PATCH] qemu: Don't jump to endjob if no job was even started

2012-01-31 Thread Laine Stump
On 01/31/2012 11:16 AM, Michal Privoznik wrote: In qemuDomainShutdownFlags if we try to use guest agent, which has error or is not configured, we jump go endjob label even if we haven't started any job yet. This may lead to the daemon crash: 1) virsh shutdown --mode agent on a domain without

Re: [libvirt] [PATCH v2 4/4] qemu: make qemu processes to retain rawio capability

2012-01-31 Thread Laine Stump
On 01/31/2012 07:04 AM, Daniel P. Berrange wrote: On Tue, Jan 31, 2012 at 01:52:27PM +0900, Taku Izumi wrote: This patch revises qemuProcessStart() function for qemu processes to retain CAP_SYS_RAWIO if needed. And in case of that, add taint flag to domain. ACK Pushed. -- libvir-list

Re: [libvirt] [PATCH v2 2/4] util: add functions to keep capabilities

2012-01-31 Thread Laine Stump
On 01/31/2012 07:03 AM, Daniel P. Berrange wrote: ACK Pushed. -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH v2 3/4] util: extend virExecWithHook()

2012-01-31 Thread Laine Stump
On 01/31/2012 07:04 AM, Daniel P. Berrange wrote: On Tue, Jan 31, 2012 at 01:51:22PM +0900, Taku Izumi wrote: This patch extends virExecWithHook() to receive capability information. ACK Pushed. -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] [PATCH v2 1/4] conf: add rawio attribute to disk element of domain XML

2012-01-31 Thread Laine Stump
On 01/31/2012 07:03 AM, Daniel P. Berrange wrote: On Tue, Jan 31, 2012 at 01:49:11PM +0900, Taku Izumi wrote: @@ -3156,6 +3159,26 @@ virDomainDiskDefParseXML(virCapsPtr caps def-snapshot = VIR_DOMAIN_DISK_SNAPSHOT_NO; } +def-rawio = -1; /* unspecified */ +if (rawio) { +

Re: [libvirt] [PATCH] Xen: Fix clock handling

2012-01-31 Thread Philipp Hahn
Hello Daniel, On Tuesday 17 January 2012 22:24:11 Daniel P. Berrange wrote: On Tue, Jan 17, 2012 at 05:02:14PM +0100, Philipp Hahn wrote: For PV, Xen implements the clock offset='utc' and clock offset='localtime' behaviour, while for HV it implements clock offset='variable'. This

[libvirt] [PATCH] xen_xs: name xendConfigVersion magic numbers

2012-01-31 Thread Philipp Hahn
libvirt supports 4 different versions of the user-land XenD daemon. When queried the daemon just returns its generation number, which is hard to match to the version of the Xen tools. Replace the magic generation numbers by named macro definitions to improve code readability. Signed-off-by:

Re: [libvirt] [RFC Incomplete Patch] Libvirt + Openvswitch

2012-01-31 Thread Kyle Mestery
On Jan 31, 2012, at 6:01 AM, Daniel P. Berrange wrote: On Mon, Jan 30, 2012 at 02:49:03PM -0600, kmestery wrote: On Jan 30, 2012, at 2:41 PM, Dan Wendlandt wrote: Hi Kyle! Funny how we keep bumping into each other... I hope you're keeping warm in Minnesota :) On Fri, Jan 27, 2012 at 11:22

[libvirt] [PATCH v3 1/5] virDomainGetDiskErrors public API

2012-01-31 Thread Jiri Denemark
We already provide ways to detect when a domain has been paused as a result of I/O error, but there was no way of getting the exact error or even the device that experienced it. This new API may be used for both. --- include/libvirt/libvirt.h.in | 32 python/generator.py

Re: [libvirt] [RFC Incomplete Patch] Libvirt + Openvswitch

2012-01-31 Thread Laine Stump
On 01/31/2012 06:57 AM, Daniel P. Berrange wrote: On Fri, Jan 27, 2012 at 02:58:58AM -0800, Dan Wendlandt wrote: Hello all, I know of many people who want to spin up VMs using libvirt + kvm/qemu and attach those VMs to an openvswitch bridge (see: http://www.openvswitch.org). However, the

[libvirt] [PATCH v3 2/5] Remote protocol for virDomainGetDiskErrors

2012-01-31 Thread Jiri Denemark
--- daemon/remote.c | 103 ++ src/remote/remote_driver.c | 77 +++ src/remote/remote_protocol.x | 23 +- src/remote_protocol-structs | 17 +++ 4 files changed, 219 insertions(+), 1 deletions(-)

[libvirt] [PATCH v3 5/5] python: Add binding for virDomainGetDiskErrors

2012-01-31 Thread Jiri Denemark
--- python/libvirt-override-api.xml |6 python/libvirt-override.c | 50 +++ 2 files changed, 56 insertions(+), 0 deletions(-) diff --git a/python/libvirt-override-api.xml b/python/libvirt-override-api.xml index 704fee9..b2b8152 100644 ---

[libvirt] [PATCH v3 4/5] virsh: Implement domblkerror command

2012-01-31 Thread Jiri Denemark
This command lists all disk devices with errors --- tools/virsh.c | 78 +++ tools/virsh.pod |7 + 2 files changed, 85 insertions(+), 0 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index 3a59746..23962bf 100644 ---

[libvirt] [PATCH v3 3/5] qemu: Implement virDomainGetDiskErrors

2012-01-31 Thread Jiri Denemark
--- src/qemu/qemu_conf.h |1 + src/qemu/qemu_driver.c | 86 ++ src/qemu/qemu_monitor.c | 40 +++ src/qemu/qemu_monitor.h |1 + src/qemu/qemu_monitor_json.c |8 src/qemu/qemu_monitor_text.c | 15

Re: [libvirt] [PATCH v2 1/3] virDomainGetDiskErrors public API and remote protocol

2012-01-31 Thread Jiri Denemark
On Mon, Jan 30, 2012 at 15:56:11 -0700, Eric Blake wrote: On 01/30/2012 09:00 AM, Jiri Denemark wrote: We already provide ways to detect when a domain has been paused as a result of I/O error, but there was no way of getting the exact error or even the device that experienced it. This new

[libvirt] [PATCH v3 0/5] Add virDomainGetDiskErrors API

2012-01-31 Thread Jiri Denemark
We already provide ways to detect when a domain has been paused as a result of I/O error, but there was no way of getting the exact error or even the device that experienced it. This new API may be used for both. Changes in version 3: - special case errors == NULL, maxerrors == 0 returns size of

Re: [libvirt] [PATCH v2 2/3] qemu: Implement virDomainGetDiskErrors

2012-01-31 Thread Jiri Denemark
On Mon, Jan 30, 2012 at 16:13:37 -0700, Eric Blake wrote: On 01/30/2012 09:01 AM, Jiri Denemark wrote: --- src/qemu/qemu_conf.h |1 + src/qemu/qemu_driver.c | 83 ++ src/qemu/qemu_monitor.c | 40

Re: [libvirt] [PATCH v2 3/3] virsh: Implement domblkerror command

2012-01-31 Thread Jiri Denemark
On Mon, Jan 30, 2012 at 16:20:07 -0700, Eric Blake wrote: On 01/30/2012 09:01 AM, Jiri Denemark wrote: This command lists all disk devices with errors --- tools/virsh.c | 89 +++ tools/virsh.pod |7 2 files changed, 96

[libvirt] [PATCH] docs: fill out rawio description

2012-01-31 Thread Laine Stump
The original doc entry for rawio didn't mention the values it could have, the default, or the fact that setting it to yes for one disk effectively set it to yes for all disks in the domain. --- Pushed under the trivial rule. docs/formatdomain.html.in | 11 --- 1 files changed, 8

[libvirt] [PATCHv3] simplify block of codes

2012-01-31 Thread Alex . Jia
From: Alex Jia a...@redhat.com Using new function 'virTypedParameterArrayClear' to simplify block of codes. * daemon/remote.c, src/remote/remote_driver.c: simplify codes. Signed-off-by: Alex Jia a...@redhat.com --- daemon/remote.c|6 +- src/remote/remote_driver.c | 19

Re: [libvirt] RFC API proposal: virDomainBlockRebase

2012-01-31 Thread Adam Litke
On Tue, Jan 31, 2012 at 09:28:51AM -0700, Eric Blake wrote: Right now, the existing virDomainBlockPull API has a tough limitation - it is an all-or-none approach. In all my examples below, I'm starting from the following relationship, where '-' means 'is a backing file of': template -

Re: [libvirt] [PATCH] qemu: never send SIGKILL to qemu process unless specifically requested

2012-01-31 Thread Eric Blake
On 01/31/2012 02:53 AM, Daniel P. Berrange wrote: In the meantime, shouldn't we at least wait longer before resorting to SIGKILL? (especially since it appears the current timeout is quite often too short). (If we don't at least do that, what we're saying is the behavior of virDomainShutdown /

Re: [libvirt] RFC API proposal: virDomainBlockRebase

2012-01-31 Thread Eric Blake
On 01/31/2012 01:53 PM, Adam Litke wrote: On Tue, Jan 31, 2012 at 09:28:51AM -0700, Eric Blake wrote: Right now, the existing virDomainBlockPull API has a tough limitation - it is an all-or-none approach. In all my examples below, I'm starting from the following relationship, where '-' means

Re: [libvirt] [PATCH] docs: fill out rawio description

2012-01-31 Thread Eric Blake
On 01/31/2012 12:58 PM, Laine Stump wrote: The original doc entry for rawio didn't mention the values it could have, the default, or the fact that setting it to yes for one disk effectively set it to yes for all disks in the domain. That's true for now, but hopefully something we can change in

Re: [libvirt] [PATCH v2 1/4] conf: add rawio attribute to disk element of domain XML

2012-01-31 Thread Eric Blake
On 01/31/2012 11:53 AM, Laine Stump wrote: I also found that make check wouldn't pass, which was mostly traced to the concept of making the default value of rawio -1. The problem with this is that there are other functions that create and fill-in domain structures, and they hadn't been taught

Re: [libvirt] Qemu text monitor

2012-01-31 Thread Jim Fehlig
Shradha Shah wrote: Hello All, I am currently working with libvirt on RHEL6.2. There are a few points I have noticed regarding the QEMU monitor. When I hotplug a device into the guest, the Qemu text monitor receives a device_add command and adds the device to its current devices list (I

Re: [libvirt] RFC API proposal: virDomainBlockRebase

2012-01-31 Thread Adam Litke
On Tue, Jan 31, 2012 at 03:00:40PM -0700, Eric Blake wrote: On 01/31/2012 01:53 PM, Adam Litke wrote: On Tue, Jan 31, 2012 at 09:28:51AM -0700, Eric Blake wrote: Right now, the existing virDomainBlockPull API has a tough limitation - it is an all-or-none approach. In all my examples below,

Re: [libvirt] [PATCHv2] schema: Relax schema for domain name

2012-01-31 Thread Eric Blake
On 01/25/2012 08:49 AM, Peter Krempa wrote: The domain schema enforced restrictions on the domain name string that the code doesn't. This patch relaxes the check, leaving the restrictions on the driver or hypervisor. The only invalid character is a newline. --- docs/schemas/domaincommon.rng

Re: [libvirt] [PATCHv3] simplify block of codes

2012-01-31 Thread Eric Blake
On 01/30/2012 08:25 PM, alex@redhat.com wrote: From: Alex Jia a...@redhat.com Using new function 'virTypedParameterArrayClear' to simplify block of codes. * daemon/remote.c, src/remote/remote_driver.c: simplify codes. Signed-off-by: Alex Jia a...@redhat.com --- daemon/remote.c

Re: [libvirt] [PATCHv3] network: Avoid memory leaks on networkBuildDnsmasqArgv

2012-01-31 Thread Eric Blake
On 01/31/2012 12:15 AM, Alex Jia wrote: What I'd suggest is: declare variables outside the loop, start the for loop by freeing any state from previous iterations, and also free all state in the cleanup label at which point, you _don't_ have to follow the v1 approach of trying to free

Re: [libvirt] Implement virStorageVolResize() for FS backend

2012-01-31 Thread Eric Blake
On 01/31/2012 05:15 AM, Daniel P. Berrange wrote: On Mon, Jan 30, 2012 at 09:40:11AM +0200, Zeeshan Ali (Khattak) wrote: From: Zeeshan Ali (Khattak) zeesha...@gnome.org Currently only VIR_STORAGE_VOL_RESIZE_DELTA flag is supported. --- src/storage/storage_backend.h|6 +++

[libvirt] [libvirt-glib] Add gvir_storage_vol_resize()

2012-01-31 Thread Zeeshan Ali (Khattak)
From: Zeeshan Ali (Khattak) zeesha...@gnome.org Add wrapper for virStorageVolResize(). --- libvirt-gobject/libvirt-gobject-storage-vol.c | 45 + libvirt-gobject/libvirt-gobject-storage-vol.h | 20 +++ libvirt-gobject/libvirt-gobject.sym |1 + 3

Re: [libvirt] [PATCH] qemu: Clenup qemuDomainSetInterfaceParameters

2012-01-31 Thread Eric Blake
On 01/31/2012 05:51 AM, Michal Privoznik wrote: which contained some useless lines, copied code, NULL dereference. --- src/libvirt.c |4 ++-- src/qemu/qemu_driver.c | 44 2 files changed, 18 insertions(+), 30 deletions(-) diff

Re: [libvirt] [PATCH] tests: dynamically replace dnsmasq path

2012-01-31 Thread Eric Blake
On 01/31/2012 07:58 AM, Philipp Hahn wrote: Hello Eric, Am Montag 30 Januar 2012 20:18:15 schrieb Eric Blake: +if (diff 0) { +tmp = realloc((void *)*buf, new_len); We should not be using realloc in this file, but should be using VIR_RESIZE_N or similar. Okay, makes

[libvirt] [PATCH] qemu: fix my typo at commit 74e034964c32edb1732d0ff7642f3977f3587d72

2012-01-31 Thread Taku Izumi
Fix my typo at commit 74e034964c32edb1732d0ff7642f3977f3587d72 disk-rawio == -1 indicates that this value is not specified. So in case of this, domain must not be tainted. Signed-off-by: Taku Izumi izumi.t...@jp.fujitsu.com --- src/qemu/qemu_domain.c |2 +- 1 file changed, 1

[libvirt] ANNOUNCE: virt-manager 0.9.1 and virtinst 0.600.1 released

2012-01-31 Thread Cole Robinson
I'm happy to announce two new releases: virt-manager 0.9.1: virt-manager is a desktop application for managing KVM and Xen virtual machines via libvirt. virtinst 0.600.1: virtinst is a collection of command line tools for provisioning libvirt virtual machines, including virt-install and

Re: [libvirt] [PATCH] qemu: fix my typo at commit 74e034964c32edb1732d0ff7642f3977f3587d72

2012-01-31 Thread Eric Blake
On 01/31/2012 05:54 PM, Taku Izumi wrote: Fix my typo at commit 74e034964c32edb1732d0ff7642f3977f3587d72 disk-rawio == -1 indicates that this value is not specified. So in case of this, domain must not be tainted. Signed-off-by: Taku Izumi izumi.t...@jp.fujitsu.com ---

Re: [libvirt] [PATCH v3 1/5] virDomainGetDiskErrors public API

2012-01-31 Thread Eric Blake
On 01/31/2012 12:26 PM, Jiri Denemark wrote: We already provide ways to detect when a domain has been paused as a result of I/O error, but there was no way of getting the exact error or even the device that experienced it. This new API may be used for both. --- include/libvirt/libvirt.h.in

Re: [libvirt] [PATCH v3 2/5] Remote protocol for virDomainGetDiskErrors

2012-01-31 Thread Eric Blake
On 01/31/2012 12:26 PM, Jiri Denemark wrote: --- daemon/remote.c | 103 ++ src/remote/remote_driver.c | 77 +++ src/remote/remote_protocol.x | 23 +- src/remote_protocol-structs | 17 +++

Re: [libvirt] [PATCH v3 3/5] qemu: Implement virDomainGetDiskErrors

2012-01-31 Thread Eric Blake
On 01/31/2012 12:26 PM, Jiri Denemark wrote: --- src/qemu/qemu_conf.h |1 + src/qemu/qemu_driver.c | 86 ++ src/qemu/qemu_monitor.c | 40 +++ src/qemu/qemu_monitor.h |1 +

Re: [libvirt] [PATCH v3 4/5] virsh: Implement domblkerror command

2012-01-31 Thread Eric Blake
On 01/31/2012 12:26 PM, Jiri Denemark wrote: This command lists all disk devices with errors --- tools/virsh.c | 78 +++ tools/virsh.pod |7 + 2 files changed, 85 insertions(+), 0 deletions(-) ACK. -- Eric Blake

Re: [libvirt] [PATCH v3 5/5] python: Add binding for virDomainGetDiskErrors

2012-01-31 Thread Eric Blake
On 01/31/2012 12:26 PM, Jiri Denemark wrote: --- python/libvirt-override-api.xml |6 python/libvirt-override.c | 50 +++ 2 files changed, 56 insertions(+), 0 deletions(-) +if ((count = virDomainGetDiskErrors(domain, NULL, 0, 0)) 0)

[libvirt] [PATCH 2/3] block rebase: wire up remote protocol

2012-01-31 Thread Eric Blake
Nice and simple. * src/remote/remote_protocol.x (REMOTE_PROC_DOMAIN_BLOCK_REBASE): New RPC. * src/remote/remote_driver.c (remote_driver): Wire it up. * src/remote_protocol-structs: Regenerate. --- src/remote/remote_driver.c |1 + src/remote/remote_protocol.x | 10 +-

[libvirt] [PATCH 3/3] block rebase: initial qemu implementation

2012-01-31 Thread Eric Blake
This is a trivial implementation, which works with the current released qemu 1.0 with backports of preliminary block pull but no partial rebase. Future patches will update the monitor handling to support an optional parameter for partial rebase; but as qemu 1.1 is unreleased, it can be in later

[libvirt] [PATCH 0/3] add virDomainBlockRebase

2012-01-31 Thread Eric Blake
As discussed here: https://www.redhat.com/archives/libvir-list/2012-January/msg01448.html Qemu patch series here: https://lists.gnu.org/archive/html/qemu-devel/2012-01/msg03488.html This is the bare-minimum implementation for getting the API in place prior to the 0.9.10 rc1 freeze; I can later do

[libvirt] [PATCH 1/3] block rebase: add new API virDomainBlockRebase

2012-01-31 Thread Eric Blake
Qemu is adding the ability to do a partial rebase. That is, given: base - intermediate - current virDomainBlockPull will produce: current but qemu now has the ability to leave base in the chain, to produce: base - current Note that current qemu can only do a forward merge, and only with the

Re: [libvirt] [test-API][PATCH 1/2] Add 2 new functions in storageAPI

2012-01-31 Thread Guannan Ren
On 01/31/2012 04:45 PM, Wayne Sun wrote: * download(self, poolname, volname, stream, offset, length, flags = 0) * upload(self, poolname, volname, stream, offset, length, flags = 0) --- lib/storageAPI.py | 17 + 1 files changed, 17 insertions(+), 0 deletions(-) diff

[libvirt] [PATCH] python: correct a copy-paste error

2012-01-31 Thread Alex . Jia
From: Alex Jia a...@redhat.com * python/libvirt-override-virStream.py: fix a copy-paste error in sendAll(). Signed-off-by: Alex Jia a...@redhat.com --- python/libvirt-override-virStream.py |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git