[libvirt] [PATCH] network: avoid memory leak on cleanup

2011-07-15 Thread ajia
* src/network/bridge_driver.c: Fix memory leak on cleanup section from networkGetBridgeName function. --- src/network/bridge_driver.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index 0a12bc0..59e780d

Re: [libvirt] [PATCH] network: avoid memory leak on cleanup

2011-07-15 Thread Matthias Bolte
2011/7/15 a...@redhat.com: * src/network/bridge_driver.c: Fix memory leak on cleanup section from  networkGetBridgeName function. ---  src/network/bridge_driver.c |    3 ++-  1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/network/bridge_driver.c

[libvirt] [PATCH 0/3] RFC: setvcpus: support --current option

2011-07-15 Thread Taku Izumi
Hi all, This patchset adds the --current option to virsh setvcpus command. Currently virsh setvcpus command supports --live and --config , but --current option. From view of consistency, it's reasonable to support --current option too. *[PATCH 1/3] setvcpus: extend virDomainSetVcpusFlags API

[libvirt] [PATCH 1/3] setvcpus: extend virDomainSetVcpusFlags API to support current flag

2011-07-15 Thread Taku Izumi
This patch extends virDomainSetVcpusFlags API to support VIR_DOMAIN_AFFECT_CURRENT flag. Now because most APIs accept VIR_DOMAIN_AFFECT_CURRENT flags, virDomainSetVcpusFlags API should also do. Signed-off-by: Taku Izumi izumi.t...@jp.fujitsu.com --- include/libvirt/libvirt.h.in |4 ++--

[libvirt] [PATCH 2/3] setvcpus: extend qemuDomainSetVcpusFlags() to support current flag

2011-07-15 Thread Taku Izumi
This patch extends qemudDomainSetVcpusFlags() function to support VIR_DOMAIN_AFFECT_CURRENT flag. Signed-off-by: Taku Izumi izumi.t...@jp.fujitsu.com --- src/qemu/qemu_driver.c | 37 +++-- 1 file changed, 27 insertions(+), 10 deletions(-) Index:

[libvirt] [PATCH 3/3] setvcpus: add --current option to virsh setvcpus

2011-07-15 Thread Taku Izumi
This patch adds the --current option to virsh setvcpus command. Currently virsh setvcpus command supports --live and --config , but --current option. From view of consistency, it's reasonable to support --current option too. When --current is specified, it affects a current domain.

Re: [libvirt] [PATCH] network: avoid memory leak on cleanup

2011-07-15 Thread Alex Jia
On 07/15/2011 02:49 PM, Matthias Bolte wrote: 2011/7/15a...@redhat.com: * src/network/bridge_driver.c: Fix memory leak on cleanup section from networkGetBridgeName function. --- src/network/bridge_driver.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git

[libvirt] [PATCH v3 1/2] vshCommandOptString returns -1 if option is empty and not VSH_OFLAG_EMPTY_OK

2011-07-15 Thread Hu Tao
Pointed out by Eric. Thanks. --- tools/virsh.c |9 +++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index b7cea58..b43af70 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -12375,8 +12375,13 @@ vshCommandOptString(const vshCmd *cmd, const

Re: [libvirt] [PATCH] network: avoid memory leak on cleanup

2011-07-15 Thread Matthias Bolte
2011/7/15 Alex Jia a...@redhat.com: On 07/15/2011 03:03 PM, Alex Jia wrote: On 07/15/2011 02:49 PM, Matthias Bolte wrote: 2011/7/15 a...@redhat.com: * src/network/bridge_driver.c: Fix memory leak on cleanup section from  networkGetBridgeName function. ---  src/network/bridge_driver.c |  

Re: [libvirt] [PATCH] build: also track RPC on-wire enum values

2011-07-15 Thread Daniel Veillard
On Thu, Jul 14, 2011 at 10:20:28AM -0600, Eric Blake wrote: As long as we guarantee RPC struct layout stability, we might as well also guarantee RPC enum value constancy. * src/Makefile.am (r1, r2, PDWTAGS): Adjust rule to pick up named and anonymous enums. * src/remote_protocol-structs:

Re: [libvirt] RFC: Implement virDomainGetIPAddress()

2011-07-15 Thread Michal Novotny
On 07/14/2011 05:42 PM, Matthias Bolte wrote: 2011/7/14 Michal Novotny minov...@redhat.com: Hi guys, some time ago I've been investigating the options to get the guest's IP address information without having to connect to guest's VNC window or console. It was for one project I've been working

Re: [libvirt] [PATCH 06/10] vcpubandwidth: introduce two new libvirt APIs

2011-07-15 Thread Wen Congyang
At 07/15/2011 12:03 PM, Nikunj A. Dadhania Write: On Thu, 14 Jul 2011 16:14:01 +0900, Taku Izumi izumi.t...@jp.fujitsu.com wrote: On Wed, 13 Jul 2011 16:55:28 +0800 Wen Congyang we...@cn.fujitsu.com wrote: At 07/13/2011 04:50 PM, Nikunj A. Dadhania Write: On Wed, 13 Jul 2011 14:26:23

Re: [libvirt] [PATCH] network: avoid memory leak on cleanup

2011-07-15 Thread Alex Jia
On 07/15/2011 03:35 PM, Matthias Bolte wrote: 2011/7/15 Alex Jiaa...@redhat.com: On 07/15/2011 03:03 PM, Alex Jia wrote: On 07/15/2011 02:49 PM, Matthias Bolte wrote: 2011/7/15a...@redhat.com: * src/network/bridge_driver.c: Fix memory leak on cleanup section from networkGetBridgeName

Re: [libvirt] RFC: Implement virDomainGetIPAddress()

2011-07-15 Thread Michal Novotny
On 07/15/2011 10:04 AM, Michal Novotny wrote: On 07/14/2011 05:42 PM, Matthias Bolte wrote: 2011/7/14 Michal Novotny minov...@redhat.com: Hi guys, some time ago I've been investigating the options to get the guest's IP address information without having to connect to guest's VNC window or

Re: [libvirt] [PATCH] docs: document dxml argument to migrate2

2011-07-15 Thread Daniel Veillard
On Thu, Jul 14, 2011 at 11:10:56AM -0600, Eric Blake wrote: Commit 135554166 introduced a nice feature without documenting it. * src/libvirt.c (virDomainMigrate2): Add paragraph. --- src/libvirt.c |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git

Re: [libvirt] RFC: Implement virDomainGetIPAddress()

2011-07-15 Thread Matthias Bolte
2011/7/15 Michal Novotny minov...@redhat.com: On 07/14/2011 05:42 PM, Matthias Bolte wrote: 2011/7/14 Michal Novotny minov...@redhat.com: Hi guys, some time ago I've been investigating the options to get the guest's IP address information without having to connect to guest's VNC window or

[libvirt] [PATCH v2 2/8] undefine: Define the new API

2011-07-15 Thread Osier Yang
This introduce a new API virDomainUndefineFlags to control the domain undefine process, as the existed API virDomainUndefine doesn't support flags. Currently only flag VIR_DOMAIN_UNDEFINE_MANAGED_STATE is supported. If the domain has a managed state file, including

[libvirt] [PATCH v2 0/8] Introduce New API virDomainUndefineFlags

2011-07-15 Thread Osier Yang
Per discussion on https://www.redhat.com/archives/libvir-list/2011-July/msg00556.html, This patch series introduce new API virDomainUndefineFlags, which only support flag VIR_DOMAIN_UNDEFINE_MANAGED_STATE now, might introduce more flags in future though. If the domain has a managed state file,

[libvirt] [PATCH v2 8/8] virsh: Extend virsh dominfo to display if managed state exists

2011-07-15 Thread Osier Yang
--- tools/virsh.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index 8a62612..120f3c8 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -2366,6 +2366,7 @@ cmdDominfo(vshControl *ctl, const vshCmd *cmd) int autostart;

[libvirt] [PATCH v2 3/8] undefine: Wire up the remote protocol

2011-07-15 Thread Osier Yang
--- src/remote/remote_driver.c |3 ++- src/remote/remote_protocol.x |9 - src/remote_protocol-structs |4 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index a2c62ba..1acef17 100644 ---

[libvirt] [PATCH v2 5/8] undefine: Implement internal API for libxl driver

2011-07-15 Thread Osier Yang
This is just similiar as changes on qemu driver. * src/libxl/libxl_driver.c: New callback for libxl_driver, new function libxlDomainUndefineFlags, and changes libxlDomainUndefine as a wrapper of libxlDomainUndefineFlags. --- src/libxl/libxl_driver.c | 31 ++- 1

[libvirt] [PATCH v2 7/8] undefine: Extend virsh undefine to support the new API

2011-07-15 Thread Osier Yang
If the domain has managed state file, and --managed-state is not specified, then it fails with error prompt to tell user there is managed state file exists. And the domain has managed state file, and --managed-state is specified, it invokes virDomainUndefineFlags, if virDomainUndefineFlag fails,

[libvirt] [PATCH v2 4/8] undefine: Implement internal API for qemu driver

2011-07-15 Thread Osier Yang
* src/qemu/qemu_driver.c: New call back for qemu_driver, New function qemudDomainUndefineFlags, and changes on qemudDomainUndefine. --- src/qemu/qemu_driver.c | 35 ++- 1 files changed, 34 insertions(+), 1 deletions(-) diff --git a/src/qemu/qemu_driver.c

[libvirt] [PATCH v2 6/8] undefine: Implement undefineFlags in all other drivers

2011-07-15 Thread Osier Yang
Add domainUndefineFlags support for these drivers (except qemu and libxl driver), and changes domainUndefine as a wrapper of domainUndefineFlags, but they actually perform same. --- src/esx/esx_driver.c | 11 ++- src/lxc/lxc_driver.c | 11 ++-

Re: [libvirt] RFC: Implement virDomainGetIPAddress()

2011-07-15 Thread Michal Novotny
On 07/15/2011 10:28 AM, Matthias Bolte wrote: 2011/7/15 Michal Novotny minov...@redhat.com: On 07/14/2011 05:42 PM, Matthias Bolte wrote: 2011/7/14 Michal Novotny minov...@redhat.com: Hi guys, some time ago I've been investigating the options to get the guest's IP address information without

[libvirt] [PATCH] util: fix a typo error on virStrncpy

2011-07-15 Thread ajia
* src/util/util.c: fix a typo error on virStrncpy. --- src/util/util.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/util/util.c b/src/util/util.c index 0ca81df..1080823 100644 --- a/src/util/util.c +++ b/src/util/util.c @@ -1754,7 +1754,7 @@ virStrncpy(char *dest,

Re: [libvirt] RFC: Implement virDomainGetIPAddress()

2011-07-15 Thread Matthias Bolte
2011/7/15 Michal Novotny minov...@redhat.com: On 07/15/2011 10:28 AM, Matthias Bolte wrote: 2011/7/15 Michal Novotny minov...@redhat.com: On 07/14/2011 05:42 PM, Matthias Bolte wrote: 2011/7/14 Michal Novotny minov...@redhat.com: Hi guys, some time ago I've been investigating the options to

Re: [libvirt] [PATCH] build: fix VPATH build of todo

2011-07-15 Thread Jiri Denemark
On Thu, Jul 14, 2011 at 09:43:40 -0600, Eric Blake wrote: Without this patch, the make rule in a VPATH build was trying to invoke ../../docs/../../docs/todo.pl, which didn't exist. * docs/Makefile.am (todo.html.in): Using $ already implies $(srcdir) in GNU make VPATH situations. Uh, and I

Re: [libvirt] [PATCH] util: fix a typo error on virStrncpy

2011-07-15 Thread Matthias Bolte
2011/7/15 a...@redhat.com: * src/util/util.c: fix a typo error on virStrncpy. ---  src/util/util.c |    2 +-  1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/util/util.c b/src/util/util.c index 0ca81df..1080823 100644 --- a/src/util/util.c +++ b/src/util/util.c @@

Re: [libvirt] [PATCH] docs: mention EMOTIVE as a libvirt-using app

2011-07-15 Thread Alex Vaqué Brull
Good morning, I talked with Jordi Guitart, an author of EMOTIVE Cloud . And he say me that you can use this email jordi.guit...@bsc.es in http://libvirt.org/apps.html#iaas;. Thanks a lot! Alex Vaqué 2011/7/14 Alex Vaqué Brull mem...@gmail.com You can put my name but I am a simple

Re: [libvirt] RFC: Implement virDomainGetIPAddress()

2011-07-15 Thread Michal Novotny
[snip] Wait a minute there please. The MAC address should be unique in the system so user should be using just one IP address per one MAC address. Since MAC address should be unique in the system then the IP address assigned to this MAC address should be just one, shouldn't it ? You can

Re: [libvirt] [PATCH] util: fix a typo error on virStrncpy

2011-07-15 Thread Alex Jia
On 07/15/2011 05:11 PM, Matthias Bolte wrote: 2011/7/15a...@redhat.com: * src/util/util.c: fix a typo error on virStrncpy. --- src/util/util.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/util/util.c b/src/util/util.c index 0ca81df..1080823 100644 ---

Re: [libvirt] RFC: Implement virDomainGetIPAddress()

2011-07-15 Thread Daniel P. Berrange
On Thu, Jul 14, 2011 at 05:14:57PM +0200, Michal Novotny wrote: Hi guys, some time ago I've been investigating the options to get the guest's IP address information without having to connect to guest's VNC window or console. It was for one project I've been working on and I found that the

Re: [libvirt] RFC: Implement virDomainGetIPAddress()

2011-07-15 Thread Michal Novotny
[snip] ipv4s = virDomainGetIPAddress(domain, macaddr, count, VIR_DOMAIN_ADDRESS_IPV4); ipv6s = virDomainGetIPAddress(domain, macaddr, count, VIR_DOMAIN_ADDRESS_IPV6); This are the simple cases where the caller explicitly requests only one version and knows the version of the returned IP

Re: [libvirt] [PATCH] network: avoid memory leak on cleanup

2011-07-15 Thread Daniel P. Berrange
On Fri, Jul 15, 2011 at 03:03:07PM +0800, Alex Jia wrote: On 07/15/2011 02:49 PM, Matthias Bolte wrote: 2011/7/15a...@redhat.com: * src/network/bridge_driver.c: Fix memory leak on cleanup section from networkGetBridgeName function. --- src/network/bridge_driver.c |3 ++- 1 files

[libvirt] ANNOUNCE: libvirt Perl bindings Sys::Virt 0.9.3 release

2011-07-15 Thread Daniel P. Berrange
I am happy to announce a new release[1] of the libvirt Perl bindings, Sys::Virt 0.9.3 is available for download: http://search.cpan.org/CPAN/authors/id/D/DA/DANBERR/Sys-Virt-0.9.3.tar.gz Changes in this release - Add all new APIs in libvirt 0.9.3 - Requires libvirt = 0.9.3 The permanent

[libvirt] [PATCH] Unregister event callback if a fatal error occurs during dispatch

2011-07-15 Thread Daniel P. Berrange
If we get an I/O error in the async event callback for an RPC client, we might not have consumed all pending data off the wire. This could result in the callback being immediately invoked again. At which point the same I/O might occur. And we're invoked again. And again...And again...

Re: [libvirt] RFC New virDomainBlockPull API family to libvirt

2011-07-15 Thread Stefan Hajnoczi
On Thu, Jul 14, 2011 at 7:47 PM, Adam Litke a...@us.ibm.com wrote: On 07/13/2011 08:04 PM, Daniel Veillard wrote: On Wed, Jul 13, 2011 at 03:46:30PM -0500, Adam Litke wrote: Unfortunately, after committing the blockPull API to libvirt, the qemu community decided to change the API somewhat and

[libvirt] [PATCH] Add some basic sanity checking of certificates before use

2011-07-15 Thread Daniel P. Berrange
If the libvirt daemon or libvirt client is configured with bogus certificates, it is very unhelpful to only find out about this when a TLS connection is actually attempted. Not least because the error messages you get back for failures are incredibly obscure. This adds some basic sanity checking

[libvirt] [PATCH] Fix error message for missing TLS write function

2011-07-15 Thread Daniel P. Berrange
* src/rpc/virnettlscontext.c: s/read/write/ --- src/rpc/virnettlscontext.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/rpc/virnettlscontext.c b/src/rpc/virnettlscontext.c index 4963ab7..6a06565 100644 --- a/src/rpc/virnettlscontext.c +++

[libvirt] [PATCH] Fix reporting of cert validation failures

2011-07-15 Thread Daniel P. Berrange
If the server succesfully validates the client cert, it will send back a single byte, under TLS. If it fails, it will close the connection. In this case, we were just reporting the standard I/O error. The original RPC code had a special case hack for the GNUTLS_E_UNEXPECTED_PACKET_LENGTH error

Re: [libvirt] RFC New virDomainBlockPull API family to libvirt

2011-07-15 Thread Stefan Hajnoczi
On Thu, Jul 14, 2011 at 7:54 PM, Adam Litke a...@us.ibm.com wrote: On 07/14/2011 05:33 AM, Stefan Hajnoczi wrote: On Thu, Jul 14, 2011 at 11:19 AM, Jiri Denemark jdene...@redhat.com wrote: On Thu, Jul 14, 2011 at 10:58:31 +0100, Stefan Hajnoczi wrote: On Thu, Jul 14, 2011 at 10:21 AM, Jiri

Re: [libvirt] RFC: Implement virDomainGetIPAddress()

2011-07-15 Thread Michal Novotny
On 07/15/2011 12:09 PM, Daniel P. Berrange wrote: On Thu, Jul 14, 2011 at 05:14:57PM +0200, Michal Novotny wrote: Hi guys, some time ago I've been investigating the options to get the guest's IP address information without having to connect to guest's VNC window or console. It was for one

Re: [libvirt] RFC New virDomainBlockPull API family to libvirt

2011-07-15 Thread Kevin Wolf
Am 15.07.2011 12:50, schrieb Stefan Hajnoczi: On Thu, Jul 14, 2011 at 7:54 PM, Adam Litke a...@us.ibm.com wrote: On 07/14/2011 05:33 AM, Stefan Hajnoczi wrote: On Thu, Jul 14, 2011 at 11:19 AM, Jiri Denemark jdene...@redhat.com wrote: On Thu, Jul 14, 2011 at 10:58:31 +0100, Stefan Hajnoczi

Re: [libvirt] RFC New virDomainBlockPull API family to libvirt

2011-07-15 Thread Stefan Hajnoczi
On Fri, Jul 15, 2011 at 12:05 PM, Kevin Wolf kw...@redhat.com wrote: Am 15.07.2011 12:50, schrieb Stefan Hajnoczi: On Thu, Jul 14, 2011 at 7:54 PM, Adam Litke a...@us.ibm.com wrote: On 07/14/2011 05:33 AM, Stefan Hajnoczi wrote: On Thu, Jul 14, 2011 at 11:19 AM, Jiri Denemark

Re: [libvirt] [PATCH] Fix error message for missing TLS write function

2011-07-15 Thread Jiri Denemark
On Fri, Jul 15, 2011 at 11:43:35 +0100, Daniel P. Berrange wrote: * src/rpc/virnettlscontext.c: s/read/write/ --- src/rpc/virnettlscontext.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/rpc/virnettlscontext.c b/src/rpc/virnettlscontext.c index

[libvirt] [PATCH] Add sanity checking of basic contraints, key purpose key usage

2011-07-15 Thread Daniel P. Berrange
Gnutls requires that certificates have basic constraints present to be used as a CA certificate. OpenSSL doesn't add this data by default, so add a sanity check to catch this situation. Also validate that the key usage and key purpose constraints contain correct data * src/rpc/virnettlscontext.c:

Re: [libvirt] [PATCH] Unregister event callback if a fatal error occurs during dispatch

2011-07-15 Thread Jiri Denemark
On Fri, Jul 15, 2011 at 11:25:08 +0100, Daniel P. Berrange wrote: If we get an I/O error in the async event callback for an RPC client, we might not have consumed all pending data off the wire. This could result in the callback being immediately invoked again. At which point the same I/O might

Re: [libvirt] [PATCH] Fix reporting of cert validation failures

2011-07-15 Thread Jiri Denemark
On Fri, Jul 15, 2011 at 11:43:22 +0100, Daniel P. Berrange wrote: If the server succesfully validates the client cert, it will send back a single byte, under TLS. If it fails, it will close the connection. In this case, we were just reporting the standard I/O error. The original RPC code had a

Re: [libvirt] [PATCH] Add some basic sanity checking of certificates before use

2011-07-15 Thread Jiri Denemark
On Fri, Jul 15, 2011 at 11:40:01 +0100, Daniel P. Berrange wrote: If the libvirt daemon or libvirt client is configured with bogus certificates, it is very unhelpful to only find out about this when a TLS connection is actually attempted. Not least because the error messages you get back for

[libvirt] [PATCH 1/1] Fix error code for storage operations

2011-07-15 Thread Dave Allan
Many volume operations will fail if the volume in question is being allocated. These operations were returning VIR_ERR_INTERNAL_ERROR when they should be returning VIR_ERR_OPERATION_INVALID. --- src/storage/storage_driver.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff

Re: [libvirt] [PATCH 1/1] Fix error code for storage operations

2011-07-15 Thread Osier Yang
于 2011年07月15日 21:47, Dave Allan 写道: Many volume operations will fail if the volume in question is being allocated. These operations were returning VIR_ERR_INTERNAL_ERROR when they should be returning VIR_ERR_OPERATION_INVALID. --- src/storage/storage_driver.c |8 1 files

Re: [libvirt] [PATCH]: Add another portion virStream bindings (C# bindings, libvirt-csharp.git)

2011-07-15 Thread Matthias Bolte
2011/7/14 Anthony Fox a.podava...@gmail.com: ACK and applied, thanks. The comment to virStreamRecv misses two lines in the returns block, so I'm squashing this in (this diff will probably come through mangled because of the long lines) diff --git a/Stream.cs b/Stream.cs index b349605..d824726

[libvirt] [PATCH] interface: Check for interface (in-)activity on some operations

2011-07-15 Thread Michal Privoznik
Right now it is possible to undefine an active interface, or destroy inactive. This patch add some checking to these operations to prevent this. Also fix test driver. --- src/interface/netcf_driver.c | 83 -- src/test/test_driver.c |5 +++ 2

Re: [libvirt] [PATCH 0/3] RFC: setvcpus: support --current option

2011-07-15 Thread Eric Blake
On 07/15/2011 12:54 AM, Taku Izumi wrote: Hi all, This patchset adds the --current option to virsh setvcpus command. Currently virsh setvcpus command supports --live and --config , but --current option. From view of consistency, it's reasonable to support --current option too.

Re: [libvirt] RFC New virDomainBlockPull API family to libvirt

2011-07-15 Thread Adam Litke
On 07/15/2011 05:39 AM, Stefan Hajnoczi wrote: On Thu, Jul 14, 2011 at 7:47 PM, Adam Litke a...@us.ibm.com wrote: On 07/13/2011 08:04 PM, Daniel Veillard wrote: On Wed, Jul 13, 2011 at 03:46:30PM -0500, Adam Litke wrote: Unfortunately, after committing the blockPull API to libvirt, the qemu

Re: [libvirt] [PATCH] interface: Check for interface (in-)activity on some operations

2011-07-15 Thread Eric Blake
On 07/15/2011 07:58 AM, Michal Privoznik wrote: Right now it is possible to undefine an active interface, or destroy inactive. This patch add some checking to these operations to prevent this. Also fix test driver. I'm inclined to NACK this on design principles (I haven't read the patch

Re: [libvirt] [PATCH 3/3] setvcpus: add --current option to virsh setvcpus

2011-07-15 Thread Eric Blake
On 07/15/2011 01:02 AM, Taku Izumi wrote: This patch adds the --current option to virsh setvcpus command. Currently virsh setvcpus command supports --live and --config , but --current option. From view of consistency, it's reasonable to support --current option too. When --current is

Re: [libvirt] [PATCH 1/3] setvcpus: extend virDomainSetVcpusFlags API to support current flag

2011-07-15 Thread Eric Blake
On 07/15/2011 01:00 AM, Taku Izumi wrote: This patch extends virDomainSetVcpusFlags API to support VIR_DOMAIN_AFFECT_CURRENT flag. Now because most APIs accept VIR_DOMAIN_AFFECT_CURRENT flags, virDomainSetVcpusFlags API should also do. Signed-off-by: Taku Izumi izumi.t...@jp.fujitsu.com

Re: [libvirt] [PATCH 2/3] setvcpus: extend qemuDomainSetVcpusFlags() to support current flag

2011-07-15 Thread Eric Blake
On 07/15/2011 01:01 AM, Taku Izumi wrote: This patch extends qemudDomainSetVcpusFlags() function to support VIR_DOMAIN_AFFECT_CURRENT flag. We've been renaming qemudDomain to qemuDomain lately, so now is as good a time to make the change for this function as any. Especially since you used

Re: [libvirt] [PATCH] interface: Check for interface (in-)activity on some operations

2011-07-15 Thread Michal Privoznik
On 15.07.2011 16:29, Eric Blake wrote: On 07/15/2011 07:58 AM, Michal Privoznik wrote: Right now it is possible to undefine an active interface, or destroy inactive. This patch add some checking to these operations to prevent this. Also fix test driver. I'm inclined to NACK this on design

[libvirt] [PATCH] Fix now dead cleanup of VMs on libvirtd restart

2011-07-15 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com When libvirtd restarts it will attempt to reconnect to existing LXC containers. If it loads a XML state file for the container the container will appear running. If we fail to read the PID file, or fail to connect to the LXC monitor, we should be

Re: [libvirt] [PATCH] interface: Check for interface (in-)activity on some operations

2011-07-15 Thread Michal Privoznik
On 15.07.2011 16:45, Eric Blake wrote: On 07/15/2011 08:36 AM, Michal Privoznik wrote: On the other hand, if we don't support transient interfaces, then the above analysis which works for domains would have to be adjusted for interfaces, so you may have something to patch after all. Well,

Re: [libvirt] [PATCH] interface: Check for interface (in-)activity on some operations

2011-07-15 Thread Eric Blake
On 07/15/2011 08:45 AM, Eric Blake wrote: On 07/15/2011 08:36 AM, Michal Privoznik wrote: On the other hand, if we don't support transient interfaces, then the above analysis which works for domains would have to be adjusted for interfaces, so you may have something to patch after all. Well,

[libvirt] [PATCH 1/1] Repoint main page links to libvirt driver pages

2011-07-15 Thread Dave Allan
From: David Allan dal...@redhat.com The libvirt supports: section on the main page of libvirt.org contains a list of hypervisors with links that point to the sites of the underlying virt technologies. The entry for KVM points to http://www.linux-kvm.org/, for example. People coming to

Re: [libvirt] [PATCH] interface: Check for interface (in-)activity on some operations

2011-07-15 Thread Eric Blake
On 07/15/2011 08:48 AM, Michal Privoznik wrote: On 15.07.2011 16:45, Eric Blake wrote: On 07/15/2011 08:36 AM, Michal Privoznik wrote: On the other hand, if we don't support transient interfaces, then the above analysis which works for domains would have to be adjusted for interfaces, so you

Re: [libvirt] [PATCH] interface: Check for interface (in-)activity on some operations

2011-07-15 Thread Matthias Bolte
2011/7/15 Eric Blake ebl...@redhat.com: On 07/15/2011 08:45 AM, Eric Blake wrote: On 07/15/2011 08:36 AM, Michal Privoznik wrote: On the other hand, if we don't support transient interfaces, then the above analysis which works for domains would have to be adjusted for interfaces, so you may

Re: [libvirt] [PATCH] interface: Check for interface (in-)activity on some operations

2011-07-15 Thread Matthias Bolte
2011/7/15 Eric Blake ebl...@redhat.com: On 07/15/2011 08:48 AM, Michal Privoznik wrote: On 15.07.2011 16:45, Eric Blake wrote: On 07/15/2011 08:36 AM, Michal Privoznik wrote: On the other hand, if we don't support transient interfaces, then the above analysis which works for domains would

Re: [libvirt] [PATCH 1/1] Repoint main page links to libvirt driver pages

2011-07-15 Thread Eric Blake
On 07/15/2011 08:49 AM, Dave Allan wrote: From: David Allan dal...@redhat.com The libvirt supports: section on the main page of libvirt.org contains a list of hypervisors with links that point to the sites of the underlying virt technologies. The entry for KVM points to

Re: [libvirt] [RFC PATCH] qemu: Fail APIs not allowed during async job

2011-07-15 Thread Eric Blake
On 07/15/2011 08:41 AM, Jiri Denemark wrote: When an asynchronous job is running while another API that is incompatible with that job is called, we now try to wait until the job finishes and either run the API or fail with timeout. I guess nicer solution is to just fail such API immediately

Re: [libvirt] [PATCH v2] qemu: Fix a regression of attaching device

2011-07-15 Thread Eric Blake
On 07/15/2011 09:16 AM, Osier Yang wrote: The regression is introduced by Commit da1eba6b, the new codes with this commit doesn't reset ret to -1 when it fails on parsing the device XML (live device attachment) This patch changes the codes to reset the ret and -1, and also changes the codes

[libvirt] RFC (V2) New virDomainBlockPull API family to libvirt

2011-07-15 Thread Adam Litke
In light of discussion on V1 of this API, here is V2 of the next generation BlockPull API. In this series we make the abort and info operations more generic so that they may apply to future block jobs (such as compression, live block copy, etc). We also add in a mechanism to set the maximum

Re: [libvirt] [RFC PATCH] qemu: Fail APIs not allowed during async job

2011-07-15 Thread Daniel P. Berrange
On Fri, Jul 15, 2011 at 04:41:38PM +0200, Jiri Denemark wrote: When an asynchronous job is running while another API that is incompatible with that job is called, we now try to wait until the job finishes and either run the API or fail with timeout. I guess nicer solution is to just fail such

Re: [libvirt] [PATCHv3 1/6] flags: use common dumpxml flags check

2011-07-15 Thread Matthias Bolte
2011/7/15 Eric Blake ebl...@redhat.com: The previous patches only cleaned up ATTRIBUTE_UNUSED flags cases; auditing the drivers found other places where flags was being used but not validated.  In particular, domainGetXMLDesc had issues with clients accepting a different set of flags than the

Re: [libvirt] [PATCHv3 2/6] flags: simplify qemu migration flags

2011-07-15 Thread Matthias Bolte
2011/7/15 Eric Blake ebl...@redhat.com: * src/qemu/qemu_driver.c (QEMU_MIGRATION_FLAGS): New define. Simplify all migration callbacks. --- v3: new patch  src/qemu/qemu_driver.c |  101 ++--  1 files changed, 21 insertions(+), 80 deletions(-)

Re: [libvirt] [PATCHv3 3/6] esx: reject unknown flags

2011-07-15 Thread Matthias Bolte
2011/7/15 Eric Blake ebl...@redhat.com: Silently ignored flags get in the way of new features that use those flags. Regarding ESX migration flags - right now, ESX silently enforces VIR_MIGRATE_PERSIST_DEST, VIR_MIGRATE_UNDEFINE_SOURCE, and VIR_MIGRATE_LIVE, even if those flags were not

Re: [libvirt] [PATCHv3 4/6] xen: reject unknown flags

2011-07-15 Thread Matthias Bolte
2011/7/15 Eric Blake ebl...@redhat.com: Also fix a logic bug in xenXMDomain{Attach,Detach}DeviceFlags, where (flags VIR_DOMAIN_DEVICE_MODIFY_CURRENT) is always false. * src/xen/xen_driver.c (xenUnifiedDomainXMLFromNative) (xenUnifiedDomainXMLToNative, xenUnifiedDomainBlockPeek): Reject

Re: [libvirt] [PATCH v3 1/2] vshCommandOptString returns -1 if option is empty and not VSH_OFLAG_EMPTY_OK

2011-07-15 Thread Eric Blake
On 07/15/2011 01:06 AM, Hu Tao wrote: Pointed out by Eric. Thanks. --- tools/virsh.c |9 +++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index b7cea58..b43af70 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -12375,8 +12375,13

Re: [libvirt] [PATCHv3 6/6] build: add syntax check for proper flags use

2011-07-15 Thread Matthias Bolte
2011/7/15 Eric Blake ebl...@redhat.com: Enforce the recent flags cleanups - we want to use 'unsigned int flags' in any of our APIs (except where backwards compatibility is important, in the public migration APIs), and that all flags are checked for validity (except when there are stub

[libvirt] [PATCH] virsh: improve option handling

2011-07-15 Thread Eric Blake
The documentation for vshCommandOptString claims that it returns -1 on a missing required argument, but in reality, that error message was unreachable (it was buried inside an if clause that is true only if the argument was present). The code was so hairy that I decided a rewrite would make it

Re: [libvirt] [PATCHv3 1/6] flags: use common dumpxml flags check

2011-07-15 Thread Eric Blake
On 07/15/2011 09:25 AM, Matthias Bolte wrote: 2011/7/15 Eric Blake ebl...@redhat.com: The previous patches only cleaned up ATTRIBUTE_UNUSED flags cases; auditing the drivers found other places where flags was being used but not validated. In particular, domainGetXMLDesc had issues with

Re: [libvirt] [PATCHv3 2/6] flags: simplify qemu migration flags

2011-07-15 Thread Eric Blake
On 07/15/2011 12:26 PM, Eric Blake wrote: On 07/15/2011 09:27 AM, Matthias Bolte wrote: 2011/7/15 Eric Blake ebl...@redhat.com: * src/qemu/qemu_driver.c (QEMU_MIGRATION_FLAGS): New define. Simplify all migration callbacks. --- v3: new patch src/qemu/qemu_driver.c | 101

[libvirt] [PATCH 1/1] website: Point main page links to libvirt driver pages

2011-07-15 Thread Dave Allan
The libvirt supports: section on the main page of libvirt.org contains a list of hypervisors with links that point to the sites of the underlying virt technologies. The entry for KVM points to http://www.linux-kvm.org/, for example. People coming to libvirt.org for the first time are likely to

Re: [libvirt] [PATCH] virsh: Expose virDomainMigrateSetMaxSpeed API to virsh

2011-07-15 Thread Hui Kang
Hi, I checked the libvirt git tree. It seems that this patch has not been applied. I think to use virsh command line to control the migration bandwidth is useful. Thanks. - Hui API virDomainMigrateSetMaxSpeed was introduced since 0.9.0, but no command in virsh yet. --- tools/virsh.c |

Re: [libvirt] [PATCH] virsh: Expose virDomainMigrateSetMaxSpeed API to virsh

2011-07-15 Thread Eric Blake
On 07/15/2011 12:34 PM, Hui Kang wrote: Hi, I checked the libvirt git tree. It seems that this patch has not been applied. I think to use virsh command line to control the migration bandwidth is useful. Thanks. - Hui API virDomainMigrateSetMaxSpeed was introduced since 0.9.0,

Re: [libvirt] [PATCHv3 1/6] flags: use common dumpxml flags check

2011-07-15 Thread Eric Blake
n 07/14/2011 04:42 PM, Eric Blake wrote: The previous patches only cleaned up ATTRIBUTE_UNUSED flags cases; auditing the drivers found other places where flags was being used but not validated. In particular, domainGetXMLDesc had issues with clients accepting a different set of flags than the

Re: [libvirt] [PATCH] virsh: improve option handling

2011-07-15 Thread Matthias Bolte
2011/7/15 Eric Blake ebl...@redhat.com: The documentation for vshCommandOptString claims that it returns -1 on a missing required argument, but in reality, that error message was unreachable (it was buried inside an if clause that is true only if the argument was present).  The code was so

Re: [libvirt] [PATCH] flags: fix domain_conf migration regression

2011-07-15 Thread Eric Blake
On 07/15/2011 01:05 PM, Eric Blake wrote: Commit 461e0f1a broke migration, because there was a code path that tried to enable an internal flag while still going through the public function. Split the internal flag into a separate callback, and validate that flags do not overlap. *

Re: [libvirt] [PATCH] Fix now dead cleanup of VMs on libvirtd restart

2011-07-15 Thread Eric Blake
On 07/15/2011 08:37 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com When libvirtd restarts it will attempt to reconnect to existing LXC containers. If it loads a XML state file for the container the container will appear running. If we fail to read the PID file,

Re: [libvirt] [PATCH] Add some basic sanity checking of certificates before use

2011-07-15 Thread Eric Blake
On 07/15/2011 06:15 AM, Jiri Denemark wrote: On Fri, Jul 15, 2011 at 11:40:01 +0100, Daniel P. Berrange wrote: If the libvirt daemon or libvirt client is configured with bogus certificates, it is very unhelpful to only find out about this when a TLS connection is actually attempted. Not least

Re: [libvirt] [PATCH] Add sanity checking of basic contraints, key purpose key usage

2011-07-15 Thread Eric Blake
On 07/15/2011 01:46 PM, Eric Blake wrote: On 07/15/2011 05:57 AM, Daniel P. Berrange wrote: Gnutls requires that certificates have basic constraints present to be used as a CA certificate. OpenSSL doesn't add this data by default, so add a sanity check to catch this situation. Also validate

Re: [libvirt] [PATCH v2 1/8] rpc: Fix typos in rpc generator scripts

2011-07-15 Thread Eric Blake
On 07/15/2011 03:06 AM, Osier Yang wrote: These typos are introduced by file renaming in commit b17b4afaf. src/remote/qemu_protocol.x \ src/remote/remote_protocol.x \ src/rpc/gendispatch.pl: s/remote_generator/gendispatch/ src/rpc/genprotocol.pl:

Re: [libvirt] [PATCH v2 2/8] undefine: Define the new API

2011-07-15 Thread Eric Blake
On 07/15/2011 03:06 AM, Osier Yang wrote: This introduce a new API virDomainUndefineFlags to control the s/introduce/introduces/ domain undefine process, as the existed API virDomainUndefine s/existed/existing/ doesn't support flags. Currently only flag VIR_DOMAIN_UNDEFINE_MANAGED_STATE

Re: [libvirt] [PATCH v2 3/8] undefine: Wire up the remote protocol

2011-07-15 Thread Eric Blake
On 07/15/2011 03:06 AM, Osier Yang wrote: --- src/remote/remote_driver.c |3 ++- src/remote/remote_protocol.x |9 - src/remote_protocol-structs |4 3 files changed, 14 insertions(+), 2 deletions(-) +++ b/src/remote_protocol-structs @@ -533,6 +533,10 @@ struct

Re: [libvirt] [PATCH] virsh: Expose virDomainMigrateSetMaxSpeed API to virsh

2011-07-15 Thread Hui Kang
My bad. I found that in the 0.9.3 tags. Thanks. - Hui On 7/15/11 2:57 PM, Eric Blake ebl...@redhat.com wrote: On 07/15/2011 12:34 PM, Hui Kang wrote: Hi, I checked the libvirt git tree. It seems that this patch has not been applied. I think to use virsh command line to control the

Re: [libvirt] [PATCH v2 4/8] undefine: Implement internal API for qemu driver

2011-07-15 Thread Eric Blake
On 07/15/2011 03:06 AM, Osier Yang wrote: * src/qemu/qemu_driver.c: New call back for qemu_driver, New function qemudDomainUndefineFlags, and changes on qemudDomainUndefine. --- src/qemu/qemu_driver.c | 35 ++- 1 files changed, 34 insertions(+), 1

Re: [libvirt] [PATCH v2 5/8] undefine: Implement internal API for libxl driver

2011-07-15 Thread Eric Blake
On 07/15/2011 03:06 AM, Osier Yang wrote: This is just similiar as changes on qemu driver. * src/libxl/libxl_driver.c: New callback for libxl_driver, new function libxlDomainUndefineFlags, and changes libxlDomainUndefine as a wrapper of libxlDomainUndefineFlags. ---

Re: [libvirt] [PATCH v2 6/8] undefine: Implement undefineFlags in all other drivers

2011-07-15 Thread Eric Blake
On 07/15/2011 03:06 AM, Osier Yang wrote: Add domainUndefineFlags support for these drivers (except qemu and libxl driver), and changes domainUndefine as a wrapper of domainUndefineFlags, but they actually perform same. --- src/esx/esx_driver.c | 11 ++- src/lxc/lxc_driver.c

Re: [libvirt] [PATCH v2 7/8] undefine: Extend virsh undefine to support the new API

2011-07-15 Thread Eric Blake
On 07/15/2011 03:06 AM, Osier Yang wrote: If the domain has managed state file, and --managed-state is not specified, then it fails with error prompt to tell user there is managed state file exists. Grammar suggestion: then it fails with an error telling the user that a managed save still

Re: [libvirt] [PATCH v2 8/8] virsh: Extend virsh dominfo to display if managed state exists

2011-07-15 Thread Eric Blake
On 07/15/2011 03:06 AM, Osier Yang wrote: --- tools/virsh.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index 8a62612..120f3c8 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -2366,6 +2366,7 @@ cmdDominfo(vshControl

  1   2   >