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

2011-07-14 Thread Taku Izumi
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 +0800, Wen Congyang we...@cn.fujitsu.com wrote: At 07/07/2011 10:32 AM, Taku Izumi Write: So why introduce VCPU level apis?

Re: [libvirt] [PATCH] Fix rpm build with sanlock and without QEmu

2011-07-14 Thread Daniel Veillard
On Thu, Jul 14, 2011 at 01:22:10PM +0800, Wen Congyang wrote: At 07/06/2011 11:15 AM, Daniel Veillard Write: The qemu-sanlock.conf file is not installed in this case Pushed under build breaker rules Daniel diff --git a/libvirt.spec.in b/libvirt.spec.in index bf220f3..230237e

Re: [libvirt] [PATCHv2 15/27] uml: reject unknown flags

2011-07-14 Thread Matthias Bolte
2011/7/13 Eric Blake ebl...@redhat.com: On 07/13/2011 06:41 AM, Matthias Bolte wrote: 2011/7/8 Eric Blake ebl...@redhat.com: * src/uml/uml_driver.c (umlOpen, umlDomainGetXMLDesc) (umlDomainBlockPeek): Reject unknown flags. ---  src/uml/uml_driver.c |   14 +++---  1 files changed, 11

Re: [libvirt] [PATCHv2 18/27] xen: reject unknown flags

2011-07-14 Thread Matthias Bolte
2011/7/14 Eric Blake ebl...@redhat.com: On 07/13/2011 06:59 AM, Matthias Bolte wrote: 2011/7/8 Eric Blake ebl...@redhat.com: @@ -1629,8 +1633,10 @@ xenDaemonDomainSave(virDomainPtr domain, const char *filename)  */  static int  xenDaemonDomainCoreDump(virDomainPtr domain, const char

Re: [libvirt] [RFC PATCH] doc: add sample XML for disk

2011-07-14 Thread Wen Congyang
At 07/07/2011 05:33 PM, Daniel P. Berrange Write: On Thu, Jul 07, 2011 at 01:06:01PM +0800, Wen Congyang wrote: When I edit the xml config file, I need to know the format. The easiest way to know the format is a sample XML. But we do not have such sample now. TODO: 1. dir and network disk's

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

2011-07-14 Thread Jiri Denemark
On Wed, Jul 13, 2011 at 15:46:30 -0500, Adam Litke wrote: ... /* * BlockPull API */ /* An iterator for initiating and monitoring block pull operations */ typedef unsigned long long virDomainBlockPullCursor; typedef struct _virDomainBlockPullInfo virDomainBlockPullInfo; struct

Re: [libvirt] [Patch 0/3]virsh: Patches for virsh logging

2011-07-14 Thread Jiri Denemark
On Thu, Jul 14, 2011 at 12:57:41 +0530, Supriya Kannery wrote: On 06/30/2011 01:52 PM, Supriya Kannery wrote: Virsh logging has some basic issues: 1. In code, magic numbers are used for logging rather than loglevel variables. 2. Magic number 5 is used for logging which doesn't map to

Re: [libvirt] [PATCH 07/10] network: new XML to support virtual switch functionality

2011-07-14 Thread Daniel P. Berrange
On Wed, Jul 13, 2011 at 03:40:45PM -0600, Eric Blake wrote: On 07/05/2011 01:45 AM, Laine Stump wrote: The virDomainActualNetDef will only be parsed/formatted if the parse/format function is called with the VIR_DOMAIN_XML_ACTUAL_NET flags set (which is only needed when saving/loading a

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

2011-07-14 Thread Stefan Hajnoczi
On Thu, Jul 14, 2011 at 10:21 AM, Jiri Denemark jdene...@redhat.com wrote: On Wed, Jul 13, 2011 at 15:46:30 -0500, Adam Litke wrote: ... /*  * BlockPull API  */ /* An iterator for initiating and monitoring block pull operations */ typedef unsigned long long virDomainBlockPullCursor;

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

2011-07-14 Thread Jiri Denemark
On Thu, Jul 14, 2011 at 10:58:31 +0100, Stefan Hajnoczi wrote: On Thu, Jul 14, 2011 at 10:21 AM, Jiri Denemark jdene...@redhat.com wrote: On Wed, Jul 13, 2011 at 15:46:30 -0500, Adam Litke wrote: ... /*  * BlockPull API  */ /* An iterator for initiating and monitoring block pull

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

2011-07-14 Thread Stefan Hajnoczi
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 Denemark jdene...@redhat.com wrote: On Wed, Jul 13, 2011 at 15:46:30 -0500, Adam Litke wrote: ... /*  *

[libvirt] [PATCH v2] storage: Avoid memory leak on metadata fetching

2011-07-14 Thread Michal Privoznik
Getting metadata on storage allocates a memory (path) which need to be freed after use otherwise it gets leaked. This means after use of virStorageFileGetMetadataFromFD or virStorageFileGetMetadata one must call virStorageFileFreeMetadata to free it. This function frees structure internals and

Re: [libvirt] [Patch 3/3]virsh: Update virsh man page

2011-07-14 Thread Jiri Denemark
On Thu, Jun 30, 2011 at 13:52:45 +0530, Supriya Kannery wrote: Valid loglevel range for virsh is 0-4. Update virsh man page accordingly. Also explain virsh ENV variables and values. Signed-off-by: Supriya Kannery supri...@in.ibm.com --- tools/virsh.pod | 30

Re: [libvirt] [Patch 1/3]virsh: Avoid using magic numbers for logging

2011-07-14 Thread Jiri Denemark
On Thu, Jun 30, 2011 at 13:52:20 +0530, Supriya Kannery wrote: Replace magic numbers with loglevel variables. Signed-off-by: Supriya Kannery supri...@in.ibm.com --- tools/virsh.c | 112 +- 1 file changed, 65 insertions(+), 47

Re: [libvirt] [Patch 2/3]virsh: Make DEBUG loglevel the superset

2011-07-14 Thread Jiri Denemark
On Thu, Jun 30, 2011 at 13:52:32 +0530, Supriya Kannery wrote: Aligning loglevel values of virsh to that of libvirt. DEBUG=0 loglevel, when specified through commandline or env variable, should log all the messages. ERROR=4 should log only error messages. Signed-off-by: Supriya Kannery

Re: [libvirt] [PATCH 1/5] hyperv: Add configure check for OpenWSMAN

2011-07-14 Thread Matthias Bolte
2011/7/13 Eric Blake ebl...@redhat.com: On 07/13/2011 01:01 PM, Matthias Bolte wrote: ---  configure.ac |   38 ++  1 files changed, 38 insertions(+), 0 deletions(-) I'd like to see the libvirt.spec.in changes from patch 2/5 squashed back into this patch -

Re: [libvirt] [PATCH 2/5] hyperv: Add driver skeleton

2011-07-14 Thread Matthias Bolte
2011/7/13 Eric Blake ebl...@redhat.com: On 07/13/2011 01:01 PM, Matthias Bolte wrote: ---  cfg.mk                               |    1 +  include/libvirt/virterror.h          |    1 +  libvirt.spec.in                      |    9 +++ +++ b/src/hyperv/hyperv_driver.h @@ -0,0 +1,29 @@ + +/*

Re: [libvirt] [PATCH v2] storage: Avoid memory leak on metadata fetching

2011-07-14 Thread Jiri Denemark
On Thu, Jul 14, 2011 at 12:56:26 +0200, Michal Privoznik wrote: Getting metadata on storage allocates a memory (path) which need to be freed after use otherwise it gets leaked. This means after use of virStorageFileGetMetadataFromFD or virStorageFileGetMetadata one must call

Re: [libvirt] [PATCH v2] storage: Avoid memory leak on metadata fetching

2011-07-14 Thread Eric Blake
On 07/14/2011 06:23 AM, Jiri Denemark wrote: +void ATTRIBUTE_NONNULL(1) +virStorageFileFreeMetadata(virStorageFileMetadata *meta) +{ +VIR_FREE(meta-backingStore); +VIR_FREE(meta); +} We like having free-like functions to work with NULL arguments, shouldn't we follow that habit

Re: [libvirt] [PATCH] qemu: Don't overwrite errors by closefd in error paths

2011-07-14 Thread Jiri Denemark
On Wed, Jul 13, 2011 at 10:09:21 -0600, Eric Blake wrote: On 07/13/2011 03:25 AM, Jiri Denemark wrote: When qemuMonitorCloseFileHandle is called in error path, we need to preserve the original error since a possible further error when running closefd monitor command is not very useful to

[libvirt] [PATCH v2] qemu: Don't overwrite errors by closefd in error paths

2011-07-14 Thread Jiri Denemark
When qemuMonitorCloseFileHandle is called in error path, we need to preserve the original error since a possible further error when running closefd monitor command is not very useful to users. --- src/qemu/qemu_monitor.c | 14 -- src/qemu/qemu_monitor.h |3 +++ 2 files changed,

Re: [libvirt] [PATCH v2] qemu: Don't overwrite errors by closefd in error paths

2011-07-14 Thread Eric Blake
On 07/14/2011 06:50 AM, Jiri Denemark wrote: When qemuMonitorCloseFileHandle is called in error path, we need to preserve the original error since a possible further error when running closefd monitor command is not very useful to users. --- src/qemu/qemu_monitor.c | 14 --

Re: [libvirt] [Patch 1/3]virsh: Avoid using magic numbers for logging

2011-07-14 Thread Eric Blake
On 07/14/2011 05:51 AM, Jiri Denemark wrote: On Thu, Jun 30, 2011 at 13:52:20 +0530, Supriya Kannery wrote: Replace magic numbers with loglevel variables. Signed-off-by: Supriya Kannery supri...@in.ibm.com --- tools/virsh.c | 112

Re: [libvirt] [Patch 2/3]virsh: Make DEBUG loglevel the superset

2011-07-14 Thread Eric Blake
On 07/14/2011 05:58 AM, Jiri Denemark wrote: On Thu, Jun 30, 2011 at 13:52:32 +0530, Supriya Kannery wrote: Aligning loglevel values of virsh to that of libvirt. DEBUG=0 loglevel, when specified through commandline or env variable, should log all the messages. ERROR=4 should log only error

Re: [libvirt] [Patch 3/3]virsh: Update virsh man page

2011-07-14 Thread Eric Blake
On 07/14/2011 05:52 AM, Jiri Denemark wrote: On Thu, Jun 30, 2011 at 13:52:45 +0530, Supriya Kannery wrote: Valid loglevel range for virsh is 0-4. Update virsh man page accordingly. Also explain virsh ENV variables and values. Signed-off-by: Supriya Kannery supri...@in.ibm.com ---

Re: [libvirt] [PATCH 07/10] network: new XML to support virtual switch functionality

2011-07-14 Thread Eric Blake
On 07/14/2011 03:42 AM, Daniel P. Berrange wrote: It turns out that we've used internal-use flags before. See how libvirt.c filters out flags in both virDomainGetXMLDesc and virSecretGetValue if the flags are larger than 0x, so that it can start internal flags at 116. Regarding the

Re: [libvirt] [PATCHv2 15/27] uml: reject unknown flags

2011-07-14 Thread Eric Blake
On 07/14/2011 01:21 AM, Matthias Bolte wrote: +++ w/src/uml/uml_driver.c @@ -1599,7 +1599,9 @@ static char *umlDomainGetXMLDesc(virDomainPtr dom, virDomainObjPtr vm; char *ret = NULL; -virCheckFlags(0, NULL); +virCheckFlags(VIR_DOMAIN_XML_SECURE | +

Re: [libvirt] [PATCHv2 28/27] build: avoid ATTRIBUTE_UNUSED in headers

2011-07-14 Thread Eric Blake
On 07/13/2011 07:42 AM, Matthias Bolte wrote: 2011/7/9 Eric Blake ebl...@redhat.com: The compiler might optimize based on our declaration that something is unused. Can this actually happen? The unused marker only says that something _might_ be unused. I don't think that a compiler can

Re: [libvirt] [PATCH 07/10] network: new XML to support virtual switch functionality

2011-07-14 Thread Daniel P. Berrange
On Thu, Jul 14, 2011 at 07:32:56AM -0600, Eric Blake wrote: On 07/14/2011 03:42 AM, Daniel P. Berrange wrote: It turns out that we've used internal-use flags before. See how libvirt.c filters out flags in both virDomainGetXMLDesc and virSecretGetValue if the flags are larger than 0x,

Re: [libvirt] [PATCH v2] qemu: Don't overwrite errors by closefd in error paths

2011-07-14 Thread Jiri Denemark
On Thu, Jul 14, 2011 at 07:02:57 -0600, Eric Blake wrote: On 07/14/2011 06:50 AM, Jiri Denemark wrote: When qemuMonitorCloseFileHandle is called in error path, we need to preserve the original error since a possible further error when running closefd monitor command is not very useful to

Re: [libvirt] [PATCH] qemu: Save domain status ASAP after creating qemu process

2011-07-14 Thread Jiri Denemark
On Wed, Jul 13, 2011 at 08:32:21 -0600, Eric Blake wrote: On 07/13/2011 07:58 AM, Jiri Denemark wrote: When creating new qemu process we saved domain status XML only after the process was fully setup and running. In case libvirtd was killed before the whole process finished, once libvirtd

[libvirt] [PATCH v3] storage: Avoid memory leak on metadata fetching

2011-07-14 Thread Michal Privoznik
Getting metadata on storage allocates a memory (path) which need to be freed after use otherwise it gets leaked. This means after use of virStorageFileGetMetadataFromFD or virStorageFileGetMetadata one must call virStorageFileFreeMetadata to free it. This function frees structure internals and

Re: [libvirt] [PATCH 07/10] network: new XML to support virtual switch functionality

2011-07-14 Thread Daniel P. Berrange
On Thu, Jul 14, 2011 at 08:11:20AM -0600, Eric Blake wrote: On 07/14/2011 08:08 AM, Daniel P. Berrange wrote: That would be a valid concern if we passed internal flags over the wire, but we don't. I'm thinking about the case where a value we currently use for an internal flag, gets

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

2011-07-14 Thread Anthony Fox
From 13d3e161d94c02bd9b5803f23399c8dc90dac3b1 Mon Sep 17 00:00:00 2001 From: Anton Podavalov a.podava...@gmail.com Date: Thu, 14 Jul 2011 18:08:44 +0400 Subject: [PATCH] Add another portion of virStream bindings Recv, RecvAll, Ref. --- Stream.cs | 60

[libvirt] [PATCH 1/8] save: document new public API

2011-07-14 Thread Eric Blake
In order to choose whether to use O_DIRECT when saving a domain image to a file, we need a new flag. But virDomainSave was implemented before our policy of all new APIs having a flag argument. * include/libvirt/libvirt.h.in (virDomainSaveFlags): New prototype. * src/libvirt.c

[libvirt] [PATCH 2/8] save: wire up remote protocol

2011-07-14 Thread Eric Blake
* src/remote/remote_driver.c (remote_driver): Add new callback. * src/remote/remote_protocol.x (remote_procedure): New RPC. (remote_domain_save_flags_args): New struct. * src/remote_protocol-structs: Update. --- src/remote/remote_driver.c |1 + src/remote/remote_protocol.x | 11

[libvirt] [PATCH 5/8] save: let iohelper handle inherited fd

2011-07-14 Thread Eric Blake
Rather than making the iohelper subject to a race in reopening the file, it is nicer to pass an already-open fd by inheritance. The old synopsis form must continue to work - if someone updates their libvirt package and installs a new libvirt_iohelper but without restarting the old libvirtd

[libvirt] [PATCH 8/8] save: support O_DIRECT during qemu saves

2011-07-14 Thread Eric Blake
Wire together the previous patches to support O_DIRECT via API request in qemu. * src/qemu/qemu_driver.c (qemuDomainSaveInternal, doCoreDump): Add parameter. (qemuDomainSaveFlags, qemuDomainManagedSave, qemudDomainCoreDump) (processWatchdogEvent): Update callers. --- src/qemu/qemu_driver.c |

[libvirt] [PATCH 4/8] save: add --direct flag to virsh save operations

2011-07-14 Thread Eric Blake
Wire up the new flag to virsh. Also, the 'dump' command had undocumented flags. * tools/virsh.c (cmdSave, cmdManagedSave, cmdDump): Add new flag. * tools/virsh.pod (save, managedsave, dump): Document flags. --- tools/virsh.c | 12 ++-- tools/virsh.pod | 17 ++--- 2

[libvirt] [PATCH 3/8] save: wire up trivial saveFlags implementations

2011-07-14 Thread Eric Blake
For all hypervisors that support save, the new API now performs the same functions as the old. * src/libxl/libxl_driver.c (libxlDomainSave): Move guts... (libxlDomainSaveFlags): ...to new function. * src/test/test_driver.c (testDomainSave, testDomainSaveFlags): Likewise. * src/vbox/vbox_tmpl.c

[libvirt] [PATCH 0/8] Avoid filesystem cache pollution during virsh save

2011-07-14 Thread Eric Blake
Saving a domain's state creates a large file, which risks polluting the filesystem cache and slowing down a system. If a system has a lot of domians simultaneously being saved (such as the libvirt-guests init script doing managed saves), then this can cause noticeable slowdown due to filesystem

[libvirt] [PATCH 6/8] save: let iohelper work on O_DIRECT fds

2011-07-14 Thread Eric Blake
Required for a coming patch where iohelper will operate on O_DIRECT fds. There, the user-space memory must be aligned to file system boundaries (at least page-aligned works best, and some file systems prefer 64k). Made tougher by the fact that VIR_ALLOC won't work on void *, but posix_memalign

Re: [libvirt] [PATCH 07/10] network: new XML to support virtual switch functionality

2011-07-14 Thread Eric Blake
On 07/14/2011 08:14 AM, Daniel P. Berrange wrote: On Thu, Jul 14, 2011 at 08:11:20AM -0600, Eric Blake wrote: On 07/14/2011 08:08 AM, Daniel P. Berrange wrote: That would be a valid concern if we passed internal flags over the wire, but we don't. I'm thinking about the case where a value we

[libvirt] [PATCH 7/8] save: add virDirectFd wrapper type

2011-07-14 Thread Eric Blake
O_DIRECT has stringent requirements - I/O must occur with buffers that have both alignment and size as multiples of the file system block size (used to be 512 bytes, but these days, 4k is safer, and 64k allows for better throughput). Rather than make lots of changes at each site that wants to use

Re: [libvirt] [PATCH v3] storage: Avoid memory leak on metadata fetching

2011-07-14 Thread Eric Blake
On 07/14/2011 08:15 AM, Michal Privoznik wrote: Getting metadata on storage allocates a memory (path) which need to be freed after use otherwise it gets leaked. This means after use of virStorageFileGetMetadataFromFD or virStorageFileGetMetadata one must call virStorageFileFreeMetadata to free

Re: [libvirt] [PATCH 7/8] save: add virDirectFd wrapper type

2011-07-14 Thread Eric Blake
On 07/14/2011 08:24 AM, Eric Blake wrote: O_DIRECT has stringent requirements - I/O must occur with buffers that have both alignment and size as multiples of the file system block size (used to be 512 bytes, but these days, 4k is safer, and 64k allows for better throughput). Rather than make

Re: [libvirt] [PATCH v3] storage: Avoid memory leak on metadata fetching

2011-07-14 Thread Michal Privoznik
On 14.07.2011 16:28, Eric Blake wrote: On 07/14/2011 08:15 AM, Michal Privoznik wrote: Getting metadata on storage allocates a memory (path) which need to be freed after use otherwise it gets leaked. This means after use of virStorageFileGetMetadataFromFD or virStorageFileGetMetadata one must

[libvirt] [PATCH] xenapi: Improve error reporting in xenapiOpen

2011-07-14 Thread Matthias Bolte
Use better suited error code and avoid NULL in error messsage as *privP-session-error_description can be NULL. --- src/xenapi/xenapi_driver.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/xenapi/xenapi_driver.c b/src/xenapi/xenapi_driver.c index

Re: [libvirt] [PATCH] xenapi: Improve error reporting in xenapiOpen

2011-07-14 Thread Eric Blake
On 07/14/2011 08:59 AM, Matthias Bolte wrote: Use better suited error code and avoid NULL in error messsage as *privP-session-error_description can be NULL. --- src/xenapi/xenapi_driver.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) ACK. -- Eric Blake

Re: [libvirt] [PATCH] Fix rpm build with sanlock and without QEmu

2011-07-14 Thread Wen Congyang
At 14/07/11 15:14, Daniel Veillard write: On Thu, Jul 14, 2011 at 01:22:10PM +0800, Wen Congyang wrote: At 07/06/2011 11:15 AM, Daniel Veillard Write: The qemu-sanlock.conf file is not installed in this case Pushed under build breaker rules Daniel diff --git a/libvirt.spec.in

[libvirt] RFC: Implement virDomainGetIPAddress()

2011-07-14 Thread Michal Novotny
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 solution lies in the procfs, precisely in the /proc/{PID}/net/arp...

Re: [libvirt] [PATCH] build: check for virnetprotocol on-the-wire stability

2011-07-14 Thread Matthias Bolte
2011/7/13 Eric Blake ebl...@redhat.com: Similar to the recent qemu_protocol-structs addition. * src/virnetprotocol-structs: New file. * src/Makefile.am (%_protocol-structs): Factor body... (PDWTAGS): ...into new helper macro. (virnetprotocol-structs): New rule. (PROTOCOL_STRUCTS): Add

Re: [libvirt] [PATCH 1/8] save: document new public API

2011-07-14 Thread Eric Blake
On 07/14/2011 08:24 AM, Eric Blake wrote: In order to choose whether to use O_DIRECT when saving a domain image to a file, we need a new flag. But virDomainSave was implemented before our policy of all new APIs having a flag argument. /** + * virDomainSaveFlags: + * @domain: a domain

Re: [libvirt] [PATCH] build: check for virnetprotocol on-the-wire stability

2011-07-14 Thread Eric Blake
On 07/14/2011 09:19 AM, Matthias Bolte wrote: 2011/7/13 Eric Blake ebl...@redhat.com: Similar to the recent qemu_protocol-structs addition. * src/virnetprotocol-structs: New file. * src/Makefile.am (%_protocol-structs): Factor body... (PDWTAGS): ...into new helper macro.

Re: [libvirt] RFC: Implement virDomainGetIPAddress()

2011-07-14 Thread Matthias Bolte
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 on and I found that the solution lies in the

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

2011-07-14 Thread Eric Blake
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. --- Pushing under the trivial rule. docs/Makefile.am |2 +- 1 files

[libvirt] [PATCH] virsh: Avoid undefine active interface

2011-07-14 Thread ajia
* tools/virsh.c: libvirt should check if current interface is active before undefine the interface, and don't allow to undefine a active interface. --- tools/virsh.c | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index

Re: [libvirt] [PATCH] xenapi: Improve error reporting in xenapiOpen

2011-07-14 Thread Matthias Bolte
2011/7/14 Eric Blake ebl...@redhat.com: On 07/14/2011 08:59 AM, Matthias Bolte wrote: Use better suited error code and avoid NULL in error messsage as *privP-session-error_description can be NULL. ---  src/xenapi/xenapi_driver.c |    6 --  1 files changed, 4 insertions(+), 2 deletions(-)

Re: [libvirt] [PATCH] virsh: Avoid undefine active interface

2011-07-14 Thread Daniel P. Berrange
On Fri, Jul 15, 2011 at 12:04:17AM +0800, a...@redhat.com wrote: * tools/virsh.c: libvirt should check if current interface is active before undefine the interface, and don't allow to undefine a active interface. --- tools/virsh.c | 10 ++ 1 files changed, 10 insertions(+), 0

[libvirt] persistent-transient [was: [PATCH 8/8] UndefineFlags: Extend virsh undefine to support new flag]

2011-07-14 Thread Eric Blake
On 07/13/2011 09:56 PM, Osier Yang wrote: -=item Bundefine Idomain-id +=item Bundefine Idomain-id optional I--undefine-managed-state Undefine the configuration for an inactive domain. Since it's not running the domain name or UUID must be used as the Idomain-id. Oh, this is different

[libvirt] [PATCHv2] command: avoid fd leak on failure

2011-07-14 Thread Eric Blake
virCommandTransferFD promises that the fd is no longer owned by the caller. Normally, we want the fd to remain open until the child runs, but in error situations, we must close it earlier. To avoid any risks of double-close due to misunderstanding about this interface, change it to take a

[libvirt] [PATCH] update apparmor security driver for new udev paths

2011-07-14 Thread Jamie Strandboge
In the Ubuntu development release we recently got a new udev that moves /var/run to /run, /var/lock to /run/lock and /dev/shm to /run/shm. This change in udev requires updating the apparmor security driver in libvirt[1]. Attached is a patch that: * adjusts src/security/virt-aa-helper.c to allow

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

2011-07-14 Thread Eric Blake
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 a/src/libvirt.c b/src/libvirt.c index fc17f2b..13da214 100644 ---

Re: [libvirt] [PATCH 1/3] command: introduce virPidWait, virPidAbort

2011-07-14 Thread Matthias Bolte
2011/7/12 Eric Blake ebl...@redhat.com: When using virCommandRunAsync and saving the pid for later, it is useful to be able to reap that pid in the same way that it would have been auto-reaped by virCommand if we had passed NULL for the pid argument in the first place. * src/util/command.c

Re: [libvirt] [PATCH 3/3] virnetsocket: use new API for uniform child cleanup

2011-07-14 Thread Matthias Bolte
2011/7/12 Eric Blake ebl...@redhat.com: Rather than trying to clean up the ssh child ourselves, and risk subtle differences from the socket creation error path, we can just use the new APIs. * src/rpc/virnetsocket.c (virNetSocketFree): Use new function. ---  src/rpc/virnetsocket.c |   13

Re: [libvirt] [PATCH] update apparmor security driver for new udev paths

2011-07-14 Thread Eric Blake
On 07/14/2011 11:06 AM, Jamie Strandboge wrote: In the Ubuntu development release we recently got a new udev that moves /var/run to /run, /var/lock to /run/lock and /dev/shm to /run/shm. This change in udev requires updating the apparmor security driver in libvirt[1]. Attached is a patch

Re: [libvirt] [PATCH 2/3] fdstream: avoid child process leak on error

2011-07-14 Thread Eric Blake
On 07/14/2011 11:42 AM, Matthias Bolte wrote: 2011/7/12 Eric Blake ebl...@redhat.com: By requesting the pid in virCommandRunAsync, fdstream was claiming that it would manually wait for the process. But on the failure path, the child process was being leaked. This difference in behavior

Re: [libvirt] [PATCH 2/3] fdstream: avoid child process leak on error

2011-07-14 Thread Matthias Bolte
2011/7/14 Eric Blake ebl...@redhat.com: On 07/14/2011 11:42 AM, Matthias Bolte wrote: 2011/7/12 Eric Blake ebl...@redhat.com: By requesting the pid in virCommandRunAsync, fdstream was claiming that it would manually wait for the process.  But on the failure path, the child process was being

Re: [libvirt] [PATCH 1/3] command: introduce virPidWait, virPidAbort

2011-07-14 Thread Eric Blake
On 07/14/2011 11:34 AM, Matthias Bolte wrote: 2011/7/12 Eric Blake ebl...@redhat.com: When using virCommandRunAsync and saving the pid for later, it is useful to be able to reap that pid in the same way that it would have been auto-reaped by virCommand if we had passed NULL for the pid

Re: [libvirt] RFC: Implement virDomainGetIPAddress()

2011-07-14 Thread Matthias Bolte
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 on and I found that the solution lies in the

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

2011-07-14 Thread Adam Litke
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 we needed to revert the libvirt implementation. Now that the

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

2011-07-14 Thread Adam Litke
On 07/14/2011 04:21 AM, Jiri Denemark wrote: On Wed, Jul 13, 2011 at 15:46:30 -0500, Adam Litke wrote: ... /* * BlockPull API */ /* An iterator for initiating and monitoring block pull operations */ typedef unsigned long long virDomainBlockPullCursor; typedef struct

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

2011-07-14 Thread Adam Litke
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 Denemark jdene...@redhat.com wrote: On Wed, Jul 13, 2011 at 15:46:30

[libvirt] [PATCH 4/3] command: move all docs into .c file

2011-07-14 Thread Eric Blake
We already have a precedent of function documentation in C files, where it is closer to the implementation (witness libvirt.h vs. libvirt.c); maintaining docs in both files risks docs going stale. While I was at it, I used consistent doxygen style on all comments. * src/util/command.h: Remove

Re: [libvirt] persistent-transient [was: [PATCH 8/8] UndefineFlags: Extend virsh undefine to support new flag]

2011-07-14 Thread Osier Yang
于 2011年07月15日 00:25, Eric Blake 写道: On 07/13/2011 09:56 PM, Osier Yang wrote: -=item Bundefine Idomain-id +=item Bundefine Idomain-id optional I--undefine-managed-state Undefine the configuration for an inactive domain. Since it's not running the domain name or UUID must be used as

[libvirt] EMOTIVE Cloud based in Libvirt

2011-07-14 Thread Alex Vaqué Brull
Hi, We can link in http://libvirt.org/apps.html EMOTIVE Cloud ( www.emotivecloud.net ) ? It is an interesting middleware based in Libvirt. Thank you -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] EMOTIVE Cloud based in Libvirt

2011-07-14 Thread Eric Blake
On 07/14/2011 01:31 PM, Alex Vaqué Brull wrote: Hi, We can link in http://libvirt.org/apps.html EMOTIVE Cloud ( www.emotivecloud.net ) ? It is an interesting middleware based in Libvirt. Sure - we're always glad to advertise clients. Which category does it best belong in? Perhaps IaaS?

Re: [libvirt] EMOTIVE Cloud based in Libvirt

2011-07-14 Thread Alex Vaqué Brull
Thanks you can define EMOTIVE how IaaS I send you some idea Infrastructure as a Service (IaaS) EMOTIVE Cloudhttp://www.emotivecloud.net/The EMOTIVE middleware allows executing tasks and providing virtualized environments to the users with Xen, KVM or VirtualBox hypervisor. EMOTIVE main

Re: [libvirt] EMOTIVE Cloud based in Libvirt

2011-07-14 Thread Alex Vaqué Brull
Infrastructure as a Service (IaaS) Nimbus http://www.nimbusproject.org/Nimbus is an open-source toolkit focused on providing Infrastructure-as-a-Service (IaaS) capabilities to the scientific community. It uses libvirt for communication with all KVM and Xen virtual machines. goog_319587068EMOTIVE

Re: [libvirt] persistent-transient [was: [PATCH 8/8] UndefineFlags: Extend virsh undefine to support new flag]

2011-07-14 Thread Osier Yang
于 2011年07月15日 03:50, Osier Yang 写道: 于 2011年07月15日 00:25, Eric Blake 写道: On 07/13/2011 09:56 PM, Osier Yang wrote: -=item Bundefine Idomain-id +=item Bundefine Idomain-id optional I--undefine-managed-state Undefine the configuration for an inactive domain. Since it's not running

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

2011-07-14 Thread Eric Blake
From: Alex Vaqué Brull mem...@gmail.com * docs/apps.html.in: Add EMOTIVE. --- Is this okay to push in your name? I've elided the AUTHORS change from this email, to avoid exposing your address in plaintext on the list archives, but that change should be obvious to figure out. AUTHORS

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

2011-07-14 Thread Alex Vaqué Brull
You can put my name but I am a simple collaborator from EMOTIVE Cloud . I am not the author from the middleware. I developed some things and I am doing some little research about EMOTIVE. Tomorrow I ask to the autors to give me better name to put here. I am a simple collaborator It is

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

2011-07-14 Thread Eric Blake
On 07/14/2011 03:17 PM, Alex Vaqué Brull wrote: You can put my name but I am a simple collaborator from EMOTIVE Cloud . I am not the author from the middleware. I developed some things and I am doing some little research about EMOTIVE. Tomorrow I ask to the autors to give me better name to

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

2011-07-14 Thread Eric Blake
On 07/14/2011 03:33 PM, Eric Blake wrote: On 07/14/2011 03:17 PM, Alex Vaqué Brull wrote: You can put my name but I am a simple collaborator from EMOTIVE Cloud . I am not the author from the middleware. I developed some things and I am doing some little research about EMOTIVE. Tomorrow I

Re: [libvirt] [PATCHv2 18/27] xen: reject unknown flags

2011-07-14 Thread Eric Blake
On 07/14/2011 01:25 AM, Matthias Bolte wrote: I will also double-check that qemu and remote (the only other drivers with a MigratePrepare callback) are not affected. You should probably double-check all *DomainMigrate* driver functions as they all get the flags from the virDomainMigrate*

[libvirt] [PATCHv3 0/6] flags cleanup conclusion

2011-07-14 Thread Eric Blake
With this, I think I've addressed all the review comments from v2: https://www.redhat.com/archives/libvir-list/2011-July/msg00460.html as well as a side discussion on public API flag filtering: https://www.redhat.com/archives/libvir-list/2011-July/msg00833.html Eric Blake (6): flags: use

[libvirt] [PATCHv3 5/6] libvirt: do not mix internal flags into public API

2011-07-14 Thread Eric Blake
There were two API in driver.c that were silently masking flags bits prior to calling out to the drivers. This is not forward-compatible - if we ever have that many flags in the future, then talking to an old server that masks out the flags would be indistinguishable from talking to a new server

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

2011-07-14 Thread Eric Blake
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 common virDomainDefFormat helper function.

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

2011-07-14 Thread Eric Blake
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 supplied; it ignored other flags. This patch does

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

2011-07-14 Thread Eric Blake
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 functions that completely ignore the flags

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

2011-07-14 Thread Eric Blake
* 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(-) diff --git a/src/qemu/qemu_driver.c

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

2011-07-14 Thread Eric Blake
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 unknown flags. * src/xen/xen_hypervisor.c

Re: [libvirt] [PATCHv2 27/27] build: add syntax check for proper flags use

2011-07-14 Thread Eric Blake
On 07/13/2011 09:23 AM, Eric Blake wrote: Therefore, my conclusion is that we can't change any existing command lines, but can only add new ones. Adding new could include using 0x or 0 prefixes (the old code output decimal, so it is distinguishable, and the new iohelper command line would

Re: [libvirt] [PATCH 5/8] save: let iohelper handle inherited fd

2011-07-14 Thread Eric Blake
On 07/14/2011 08:24 AM, Eric Blake wrote: Rather than making the iohelper subject to a race in reopening the file, it is nicer to pass an already-open fd by inheritance. The old synopsis form must continue to work - if someone updates their libvirt package and installs a new libvirt_iohelper

Re: [libvirt] [PATCH 2/8] save: wire up remote protocol

2011-07-14 Thread Eric Blake
On 07/14/2011 08:24 AM, Eric Blake wrote: * src/remote/remote_driver.c (remote_driver): Add new callback. * src/remote/remote_protocol.x (remote_procedure): New RPC. (remote_domain_save_flags_args): New struct. * src/remote_protocol-structs: Update. --- src/remote/remote_driver.c |1 +

[libvirt] [PATCH 9/8] save: support direct autodump in qemu.conf

2011-07-14 Thread Eric Blake
When auto-dumping a domain on crash events, let the user configure whether to have the VIR_DUMP_DIRECT flag effects. * src/qemu/qemu.conf (auto_dump_direct): Document new variable. * src/qemu/libvirtd_qemu.aug (vnc_entry): Let augeas parse it. * src/qemu/qemu_conf.h (qemud_driver): Store new

[libvirt] [PATCH 10/8] save: support direct flag in libvirt-guests init script

2011-07-14 Thread Eric Blake
libvirt-guests is a perfect use case for O_DIRECT - lots of filesystem traffic done at system shutdown, where caching is pointless, and startup, where caching gets in the way. Make this a configurable option in the init script, but defaulting to existing behavior. * tools/libvirt-guests.sysconf

[libvirt] [PATCH 11/8] save: document new public API

2011-07-14 Thread Eric Blake
* include/libvirt/libvirt.h.in (virDomainCreateFlags): Add a flag. (virDomainRestoreFlags): New prototype. * src/libvirt.c (virDomainRestoreFlags): New function. * src/libvirt_public.syms: Export it. * src/driver.h (virDrvDomainRestoreFlags): New driver callback. --- I'm debating whether to

[libvirt] [PATCH 12/8] save: wire up remote protocol

2011-07-14 Thread Eric Blake
* src/remote/remote_driver.c (remote_driver): Add new callback. * src/remote/remote_protocol.x (remote_procdure): New RPC. (remote_domain_restore_flags_args): New struct. * src/remote_protocol-structs: Update. --- Again, I'm debating whether this should be part of 2/8.

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

2011-07-14 Thread Nikunj A. Dadhania
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 +0800, Wen Congyang we...@cn.fujitsu.com wrote:

  1   2   >