Re: [libvirt] [PATCH v2] add --cache, --serial, --sharable and --pciaddress options(was Re: [PATCH 1/3] add --cache option for attach-disk)

2011-07-13 Thread Hu Tao
On Tue, Jul 12, 2011 at 11:50:51AM -0600, Eric Blake wrote: On 07/12/2011 01:47 AM, Hu Tao wrote: +ignore_value(vshCommandOptString(cmd, cache, cache)); Not so nice. --cache '' will make vshCommandOptString return -1, because that usage is a virsh usage error and should be

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

2011-07-13 Thread Wen Congyang
At 07/07/2011 10:32 AM, Taku Izumi Write: So why introduce VCPU level apis? Adam Litke said IBM's performance team nead to control cpu bandwidth for each vcpu. Right, but we do not export that as a User API, that was my suggestion. We can internally control each vcpu's bandwidth, i.e.

Re: [libvirt] [PATCH 08/19] qemu: Consolidate qemuMigrationPrepare{Direct, Tunnel}

2011-07-13 Thread Jiri Denemark
On Mon, Jul 11, 2011 at 21:28:30 +0100, Daniel P. Berrange wrote: On Fri, Jul 08, 2011 at 01:34:13AM +0200, Jiri Denemark wrote: Most of the code in these two functions is supposed to be identical but currently it isn't (which is natural since the code is duplicated). Let's move common

Re: [libvirt] [PATCH 00/19] Rollback migration when libvirtd restarts

2011-07-13 Thread Jiri Denemark
On Fri, Jul 08, 2011 at 01:34:05 +0200, Jiri Denemark wrote: This series is also available at https://gitorious.org/~jirka/libvirt/jirka-staging/commits/migration-recovery The series does several things: - persists current job and its phase in status xml - allows safe monitor commands to be

Re: [libvirt] [PATCH v2 0/7] Add support for setting QoS

2011-07-13 Thread Stefan Hajnoczi
On Tue, Jul 12, 2011 at 12:57 PM, Michal Privoznik mpriv...@redhat.com wrote: This patch series add support for setting traffic shaping and policing on both domain's interface and network's virtual bridge. Basically, this is done via 'tc' from iproute2 package. For shaping is HTB used, for

Re: [libvirt] [PATCH] Add domain events support to UML driver

2011-07-13 Thread Jiri Denemark
On Mon, Jul 04, 2011 at 13:32:23 +0100, Daniel P. Berrange wrote: * src/uml_conf.h: Add queue for dispatch of domain events * src/uml_driver.c: Trigger domain events upon important lifecycle transitions Does it mean someone is actually using UML? :-) diff --git a/src/uml/uml_driver.c

[libvirt] [PATCH] virsh: fix missing prompt message for 'snapshot-delete' command

2011-07-13 Thread Nan Zhang
Make the command 'virsh snapshot-delete' has the appropriate prompt message when executing sucessful or failed. --- tools/virsh.c |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index cd17f42..b7cea58 100644 --- a/tools/virsh.c +++

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

2011-07-13 Thread Nikunj A. Dadhania
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? Adam Litke said IBM's performance team nead to control cpu bandwidth for each vcpu. Right, but we do not export that as a User

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

2011-07-13 Thread Wen Congyang
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? Adam Litke said IBM's performance team nead to control cpu bandwidth for each vcpu.

Re: [libvirt] [Matahari] [libvirt-qpid PATCH 2/3] Convert class names to lower case

2011-07-13 Thread Andrew Beekhof
On Wed, Jul 13, 2011 at 2:29 AM, Zane Bitter zbit...@redhat.com wrote: This schema change is necessary to ensure that classes keep the same names after changing from the QMF to the QMFv2 API. Odd. But if you say so, ACK :-) ---  src/DomainWrap.cpp     |    2 +-  src/NodeWrap.cpp       |    

Re: [libvirt] [Matahari] [libvirt-qpid PATCH 1/3] Convert to QMFv2 APIs

2011-07-13 Thread Andrew Beekhof
On Wed, Jul 13, 2011 at 2:46 AM, Daniel P. Berrange berra...@redhat.com wrote: On Tue, Jul 12, 2011 at 06:28:46PM +0200, Zane Bitter wrote: diff --git a/src/DomainWrap.cpp b/src/DomainWrap.cpp index 47876de..eab6bbc 100644 --- a/src/DomainWrap.cpp +++ b/src/DomainWrap.cpp @@ -2,266 +2,310 @@

Re: [libvirt] [Matahari] [libvirt-qpid PATCH 3/3] Make libvirt-qpid a matahari agent

2011-07-13 Thread Andrew Beekhof
Looks good to me. Ack On Wed, Jul 13, 2011 at 2:29 AM, Zane Bitter zbit...@redhat.com wrote: ---  AUTHORS              |    2  configure.ac         |    1  libvirt-qpid.spec    |    2  src/LibvirtAgent.cpp |   97  src/LibvirtAgent.h   |   36 +  

Re: [libvirt] [PATCHv2 01/27] maint: exclude more files from syntax check

2011-07-13 Thread Matthias Bolte
2011/7/8 Eric Blake ebl...@redhat.com: * cfg.mk (VC_LIST_ALWAYS_EXCLUDE_REGEX): Exempt docs/api_extension/*.patch. (exclude_file_name_regexp--sc_prohibit_always_true_header_tests) (exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF) (exclude_file_name_regexp--sc_prohibit_fork_wrappers)

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

2011-07-13 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 | 34 +- src/qemu/qemu_monitor.h |3

Re: [libvirt] [Matahari] [libvirt-qpid PATCH 1/3] Convert to QMFv2 APIs

2011-07-13 Thread Zane Bitter
Hi Daniel, Thanks for the very helpful (and prompt!) feedback. Responses inline. cheers, Zane. On 13/07/11 08:49, Andrew Beekhof wrote: On Wed, Jul 13, 2011 at 2:46 AM, Daniel P. Berrangeberra...@redhat.com wrote: On Tue, Jul 12, 2011 at 06:28:46PM +0200, Zane Bitter wrote: diff --git

[libvirt] [PATCH 0/8] Introduce new API virDomainUndefineFlags

2011-07-13 Thread Osier Yang
Hi, 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. If the flag is specified, the domain

[libvirt] [PATCH 1/8] Small fixes on rpc generator scripts

2011-07-13 Thread Osier Yang
1. Fix typos caused by the renaming 2. It should substitute remote/remote_protocol.h to remote_protocol.h. --- src/rpc/gendispatch.pl |6 +++--- src/rpc/genprotocol.pl |2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/rpc/gendispatch.pl b/src/rpc/gendispatch.pl

Re: [libvirt] [PATCHv2 02/27] maint: print flags in hex during debug

2011-07-13 Thread Matthias Bolte
2011/7/8 Eric Blake ebl...@redhat.com: Continuation of commit 313ac7fd, and enforce things with a syntax check. Technically, virNetServerClientCalculateHandleMode is not printing a mode_t, but rather a collection of VIR_EVENT_HANDLE_* bits; however, these bits are 8, so there is no

[libvirt] [PATCH 7/8] UndefineFlags: Implement the remote protocol

2011-07-13 Thread Osier Yang
With small typo fixes (s/remote_generator/gendispatch/, and s/remote_internal/remote_driver/) --- src/remote/qemu_protocol.x |2 +- src/remote/remote_driver.c |5 +++-- src/remote/remote_protocol.x | 14 ++ src/remote_protocol-structs |4 4 files changed, 18

[libvirt] [PATCH 4/8] UndefineFlags: Define the internal API

2011-07-13 Thread Osier Yang
--- src/driver.h |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/src/driver.h b/src/driver.h index 71a52c9..3db9fb7 100644 --- a/src/driver.h +++ b/src/driver.h @@ -219,6 +219,9 @@ typedef virDomainPtr typedef int (*virDrvDomainUndefine)

[libvirt] [PATCH 6/8] UndefineFlags: Implement libxl driver handling

2011-07-13 Thread Osier Yang
--- src/libxl/libxl_driver.c | 32 1 files changed, 28 insertions(+), 4 deletions(-) diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index 808480f..f04931b 100644 --- a/src/libxl/libxl_driver.c +++ b/src/libxl/libxl_driver.c @@ -220,10 +220,8

[libvirt] [PATCH 8/8] UndefineFlags: Extend virsh undefine to support new flag

2011-07-13 Thread Osier Yang
--- tools/virsh.c | 12 +++- tools/virsh.pod |6 +- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index 3cdf043..f81e923 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -1409,6 +1409,7 @@ static const vshCmdInfo info_undefine[]

[libvirt] [PATCH 3/8] UndefineFlags: Implement the public API

2011-07-13 Thread Osier Yang
--- src/libvirt.c | 53 - 1 files changed, 52 insertions(+), 1 deletions(-) diff --git a/src/libvirt.c b/src/libvirt.c index 7e70caa..eeb25a5 100644 --- a/src/libvirt.c +++ b/src/libvirt.c @@ -6381,7 +6381,8 @@ error: * Returns 0 in case of

[libvirt] [PATCH 5/8] UndefineFlags: Implement qemu driver handling

2011-07-13 Thread Osier Yang
--- src/qemu/qemu_driver.c | 31 +++ 1 files changed, 27 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index f962e2c..a9f6986 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -2402,10 +2402,8 @@

Re: [libvirt] [PATCHv2 04/27] libvirt-qemu: use unsigned flags

2011-07-13 Thread Matthias Bolte
2011/7/8 Eric Blake ebl...@redhat.com: Like commit 1740c381, but for libvirt-qemu. * src/remote/qemu_protocol.x (qemu_monitor_command_args): Adjust type to match API. * src/qemu_protocol-structs: Update accordingly. --- v2: new patch  src/qemu_protocol-structs  |    2 +-  

Re: [libvirt] [PATCHv2 06/27] node_device: reject unknown flags

2011-07-13 Thread Matthias Bolte
2011/7/8 Eric Blake ebl...@redhat.com: * src/node_device/node_device_driver.c (nodeNumOfDevices) (nodeListDevices, nodeDeviceGetXMLDesc, nodeDeviceCreateXML): Reject unknown flags. * src/node_device/node_device_hal.c (halNodeDrvOpen): Likewise. * src/node_device/node_device_udev.c

Re: [libvirt] [PATCHv2 05/27] util: reject unknown flags, and prefer unsigned flags

2011-07-13 Thread Matthias Bolte
2011/7/8 Eric Blake ebl...@redhat.com: Silently ignored flags get in the way of new features that use those flags.  Also, an upcoming syntax check will favor unsigned flags. * src/nodeinfo.h (nodeGetCPUStats, nodeGetMemoryStats): Drop unused attribute. * src/interface/netcf_driver.c

Re: [libvirt] [PATCHv2 07/27] storage: reject unknown flags

2011-07-13 Thread Matthias Bolte
2011/7/8 Eric Blake ebl...@redhat.com: * src/storage/storage_backend.c (virStorageBackendCreateBlockFrom) (virStorageBackendCreateQemuImg) (virStorageBackendCreateQcowCreate): Reject unknown flags. * src/storage/storage_backend_disk.c (virStorageBackendDiskBuildPool)

Re: [libvirt] [PATCHv2 08/27] esx: reject unknown flags

2011-07-13 Thread Matthias Bolte
2011/7/8 Eric Blake ebl...@redhat.com: Silently ignored flags get in the way of new features that use those flags. * src/esx/esx_device_monitor.c (esxDeviceOpen): Reject unknown flags. * src/esx/esx_driver.c (esxOpen, esxDomainReboot) (esxDomainXMLFromNative, esxDomainXMLToNative)

Re: [libvirt] [PATCHv2 09/27] libxl: reject unknown flags

2011-07-13 Thread Matthias Bolte
2011/7/8 Eric Blake ebl...@redhat.com: * src/libxl/libxl_driver.c (libxlOpen, libxlDomainReboot) (libxlDomainXMLFromNative, libxlDomainXMLToNative) (libxlDomainCreateWithFlags): Reject unknown flags. ---  src/libxl/libxl_driver.c |   18 +-  1 files changed, 13 insertions(+),

Re: [libvirt] [PATCHv2 10/27] lxc: reject unknown flags

2011-07-13 Thread Matthias Bolte
2011/7/8 Eric Blake ebl...@redhat.com: * src/lxc/lxc_driver.c (lxcOpen, lxcDomainSetMemoryParameters) (lxcDomainGetMemoryParameters): Reject unknown flags. * src/lxc/lxc_container.c (lxcContainerStart): Use unsigned flags. ---  src/lxc/lxc_container.c |    4 ++--  src/lxc/lxc_driver.c    |  

Re: [libvirt] [PATCHv2 11/27] openvz: reject unknown flags

2011-07-13 Thread Matthias Bolte
2011/7/8 Eric Blake ebl...@redhat.com: * src/openvz/openvz_driver.c (openvzDomainReboot, openvzOpen): Reject unknown flags. ---  src/openvz/openvz_driver.c |    9 +++--  1 files changed, 7 insertions(+), 2 deletions(-) ACK. -- Matthias Bolte http://photron.blogspot.com -- libvir-list

Re: [libvirt] [PATCHv2 12/27] phyp: reject unknown flags

2011-07-13 Thread Matthias Bolte
2011/7/8 Eric Blake ebl...@redhat.com: * src/phyp/phyp_driver.c (phypOpen, phypDomainReboot) (phypVIOSDriverOpen): Reject unknown flags. ---  src/phyp/phyp_driver.c |   12 +---  1 files changed, 9 insertions(+), 3 deletions(-) ACK. -- Matthias Bolte http://photron.blogspot.com --

Re: [libvirt] [PATCHv2 13/27] qemu: reject unknown flags

2011-07-13 Thread Matthias Bolte
2011/7/8 Eric Blake ebl...@redhat.com: * src/qemu/qemu_driver.c (qemudOpen, qemuDomainScreenshot) (qemuDomainXMLFromNative, qemuDomainXMLToNative) (qemudDomainBlockPeek, qemuCPUCompare, qemuCPUBaseline): Reject unknown flags. * src/qemu/qemu_migration.c (qemuMigrationConfirm): Likewise.

Re: [libvirt] [PATCHv2 14/27] test: reject unknown flags

2011-07-13 Thread Matthias Bolte
2011/7/8 Eric Blake ebl...@redhat.com: * src/test/test_driver.c (testOpen, testDomainCoreDump) (testOpenNetwork, testNetworkGetXMLDesc, testOpenInterface) (testInterfaceChangeBegin, testInterfaceChangeCommit) (testInterfaceChangeRollback, testInterfaceGetXMLDesc) (testInterfaceDefineXML,

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

2011-07-13 Thread Matthias Bolte
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 insertions(+), 3 deletions(-) @@ -1559,11 +1562,14 @@ cleanup:  static char

Re: [libvirt] [PATCHv2 16/27] vbox: reject unknown flags

2011-07-13 Thread Matthias Bolte
2011/7/8 Eric Blake ebl...@redhat.com: * src/vbox/vbox_driver.c (vboxOpenDummy): Reject unknown flags. * src/vbox/vbox_tmpl.c (vboxOpen, vboxDomainReboot) (vboxNetworkOpen, vboxNetworkGetXMLDesc, vboxStorageOpen) (vboxStorageVolCreateXML, vboxStorageVolDelete) (vboxStorageVolGetXMLDesc,

Re: [libvirt] [PATCHv2 17/27] vmware: reject unknown flags

2011-07-13 Thread Matthias Bolte
2011/7/8 Eric Blake ebl...@redhat.com: * src/vmware/vmware_driver.c (vmwareOpen, vmwareDomainReboot) (vmwareDomainCreateXML, vmwareDomainCreateWithFlags): Reject unknown flags. ---  src/vmware/vmware_driver.c |   17 -  1 files changed, 12 insertions(+), 5 deletions(-) ACK.

Re: [libvirt] [PATCH] virsh: fix missing prompt message for 'snapshot-delete' command

2011-07-13 Thread Osier Yang
于 2011年07月13日 16:36, Nan Zhang 写道: Make the command 'virsh snapshot-delete' has the appropriate prompt message when executing sucessful or failed. --- tools/virsh.c |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index

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

2011-07-13 Thread Matthias Bolte
2011/7/8 Eric Blake ebl...@redhat.com: * src/xen/xen_driver.c (xenUnifiedDomainXMLFromNative) (xenUnifiedDomainXMLToNative, xenUnifiedDomainBlockPeek): Reject unknown flags. * src/xen/xen_hypervisor.c (xenHypervisorOpen) (xenHypervisorGetDomainState): Likewise. * src/xen/xen_inotify.c

Re: [libvirt] [PATCHv2 19/27] xenapi: reject unknown flags

2011-07-13 Thread Matthias Bolte
2011/7/8 Eric Blake ebl...@redhat.com: * src/xenapi/xenapi_driver.c (xenapiOpen, xenapiDomainReboot) (xenapiDomainGetXMLDesc): Reject unknown flags. ---  src/xenapi/xenapi_driver.c |   13 ++---  1 files changed, 10 insertions(+), 3 deletions(-) @@ -1309,6 +1314,8 @@

Re: [libvirt] [PATCHv2 23/27] conf: prefer unsigned flags

2011-07-13 Thread Matthias Bolte
2011/7/8 Eric Blake ebl...@redhat.com: * src/conf/cpu_conf.h (virCPUDefFormat, virCPUDefFormatBuf): Change flags type. * src/conf/cpu_conf.c (virCPUDefFormat, virCPUDefFormatBuf): Likewise. * src/conf/storage_conf.c (_virStoragePoolOptions): Likewise. * src/datatypes.h (_virConnect,

Re: [libvirt] [PATCHv2 20/27] virsh, daemon: prefer unsigned flags

2011-07-13 Thread Matthias Bolte
2011/7/8 Eric Blake ebl...@redhat.com: * tools/virsh.c (vshCmdDef): Change flags type. * daemon/remote.c (remoteDispatchOpen): Likewise. --- v2: new patch  daemon/remote.c |    2 +-  tools/virsh.c   |    2 +-  2 files changed, 2 insertions(+), 2 deletions(-) ACK. -- Matthias Bolte

Re: [libvirt] [PATCHv2 22/27] python: prefer unsigned flags

2011-07-13 Thread Matthias Bolte
2011/7/8 Eric Blake ebl...@redhat.com: * python/libvirt-override.c (libvirt_virConnectOpenAuth) (libvirt_virDomainSnapshotListNames) (libvirt_virDomainRevertToSnapshot): Change flags type. --- v2: new patch  python/libvirt-override.c |    6 +++---  1 files changed, 3 insertions(+), 3

Re: [libvirt] [PATCHv2 21/27] node_device: avoid implicit int

2011-07-13 Thread Matthias Bolte
2011/7/8 Eric Blake ebl...@redhat.com: 'unsigned a' and 'unsigned int a' are synonyms, but we generally always spell out the 'int' in that case.  Fixing this will avoid a false positive in the next syntax-check commit. * src/conf/node_device_conf.h (pci_config_address) (_virNodeDevCapsDef):

Re: [libvirt] [PATCHv2 25/27] conf: delete unused flags arguments

2011-07-13 Thread Matthias Bolte
2011/7/8 Eric Blake ebl...@redhat.com: For static functions not used as callbacks, there's no need to keep an unused parameter. * src/conf/domain_conf.c (virDomainChrDefParseTargetXML) (virDomainTimerDefParseXML, virDomainHostdevSubsysUsbDefParseXML) (virDomainVcpuPinDefParseXML): Drop

Re: [libvirt] [PATCHv2 24/27] build: don't hand-roll cloexec code

2011-07-13 Thread Matthias Bolte
2011/7/8 Eric Blake ebl...@redhat.com: No need to repeat common code. * src/util/bridge.c (brInit): Use virSetCloseExec. (brSetInterfaceUp): Prefer unsigned flags. * src/uml/uml_driver.c (umlSetCloseExec): Delete. (umlStartVMDaemon): Use util version instead. --- v2: new patch  

Re: [libvirt] [PATCHv2 26/27] remote: prefer unsigned flags

2011-07-13 Thread Matthias Bolte
2011/7/8 Eric Blake ebl...@redhat.com: * src/remote/remote_driver.c (call, remoteOpenSecondaryDriver): Prefer unsigned flags. --- v2: new patch  src/remote/remote_driver.c |    6 +++---  1 files changed, 3 insertions(+), 3 deletions(-) ACK. -- Matthias Bolte http://photron.blogspot.com

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

2011-07-13 Thread Dave Allan
On Wed, Jul 13, 2011 at 06:19:44PM +0800, Osier Yang wrote: --- tools/virsh.c | 12 +++- tools/virsh.pod |6 +- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index 3cdf043..f81e923 100644 --- a/tools/virsh.c +++

Re: [libvirt] [PATCH] util: honor anchored names when searching for executables

2011-07-13 Thread Eric Blake
On 07/12/2011 08:51 PM, Daniel Veillard wrote: On Tue, Jul 12, 2011 at 04:51:51PM -0600, Eric Blake wrote: I got bit in a debugging session on an uninstalled libvirtd; the code tried to call out to the installed $LIBEXECDIR/libvirt_iohelper instead of my just-built version. So I set a

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

2011-07-13 Thread Matthias Bolte
2011/7/8 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 functions

Re: [libvirt] [PATCH] command: avoid fd leak on failure

2011-07-13 Thread Eric Blake
On 07/12/2011 08:43 PM, Daniel Veillard wrote: On Tue, Jul 12, 2011 at 02:09:34PM -0600, Eric Blake wrote: 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

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

2011-07-13 Thread Matthias Bolte
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 optimize something based on this when it cannot

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

2011-07-13 Thread Jiri Denemark
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 started again it didn't know anything about the new process and we end up with an orphaned qemu process. Let's

Re: [libvirt] [PATCHv2 02/27] maint: print flags in hex during debug

2011-07-13 Thread Eric Blake
On 07/13/2011 03:49 AM, Matthias Bolte wrote: 2011/7/8 Eric Blake ebl...@redhat.com: Continuation of commit 313ac7fd, and enforce things with a syntax check. Technically, virNetServerClientCalculateHandleMode is not printing a mode_t, but rather a collection of VIR_EVENT_HANDLE_* bits;

[libvirt] [PATCH] util: Avoid duplicating virFileOpenAsNoFork in virFileOpenAs

2011-07-13 Thread Jiri Denemark
In 2f4d2496a88055a8343b3efca618522da8715d92 I didn't notice that one part of virFileOpenAs doesn't actually call to virFileOpenAsNoFork but rather includes a copy of the code from there. --- src/util/util.c | 35 +-- 1 files changed, 5 insertions(+), 30

[libvirt] RFC on libvirt-qpid naming

2011-07-13 Thread Zane Bitter
The name libvirt-qpid is probably not as descriptive of the project as it could be. If we want to change the name then now is our best opportunity to do so, as part of the process to convert it to QMFv2 and make it a matahari agent - potentially breaking backward compatibility with existing

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

2011-07-13 Thread Eric Blake
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 started again it didn't know anything about the new process

Re: [libvirt] [PATCH] util: Avoid duplicating virFileOpenAsNoFork in virFileOpenAs

2011-07-13 Thread Eric Blake
On 07/13/2011 08:08 AM, Jiri Denemark wrote: In 2f4d2496a88055a8343b3efca618522da8715d92 I didn't notice that one part of virFileOpenAs doesn't actually call to virFileOpenAsNoFork but rather includes a copy of the code from there. --- src/util/util.c | 35

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

2011-07-13 Thread Osier Yang
qemuDomainModifyDeviceFlags: Changing ret to 0, but don't reset it to -1 on failure, it's not good idea to change the value of ret in the codes to do some condition checking. This patch fix it. --- src/qemu/qemu_driver.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git

Re: [libvirt] [PATCHv2 04/27] libvirt-qemu: use unsigned flags

2011-07-13 Thread Eric Blake
On 07/13/2011 03:54 AM, Matthias Bolte wrote: 2011/7/8 Eric Blake ebl...@redhat.com: Like commit 1740c381, but for libvirt-qemu. * src/remote/qemu_protocol.x (qemu_monitor_command_args): Adjust type to match API. * src/qemu_protocol-structs: Update accordingly. --- v2: new patch

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

2011-07-13 Thread Eric Blake
On 07/13/2011 09:17 AM, Osier Yang wrote: qemuDomainModifyDeviceFlags: Changing ret to 0, but don't reset it to -1 on failure, it's not good idea to change the value of ret in the codes to do some condition checking. This patch fix it. Can you identify which commit introduced the regression,

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

2011-07-13 Thread Eric Blake
On 07/08/2011 01:26 PM, Eric Blake wrote: 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

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

2011-07-13 Thread Eric Blake
On 07/13/2011 07:35 AM, Matthias Bolte wrote: @@ -516,13 +516,13 @@ virFDStreamOpenFileInternal(virStreamPtr st, int errfd = -1; pid_t pid = 0; -VIR_DEBUG(st=%p path=%s flags=%x offset=%llu length=%llu mode=%o delete=%d, - st, path, flags, offset, length, mode,

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

2011-07-13 Thread Eric Blake
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 users. --- src/qemu/qemu_monitor.c | 34

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

2011-07-13 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. Right now this function frees only one variable

Re: [libvirt] [PATCHv2 07/27] storage: reject unknown flags

2011-07-13 Thread Eric Blake
On 07/13/2011 05:34 AM, Matthias Bolte wrote: 2011/7/8 Eric Blake ebl...@redhat.com: * src/storage/storage_backend.c (virStorageBackendCreateBlockFrom) (virStorageBackendCreateQemuImg) (virStorageBackendCreateQcowCreate): Reject unknown flags. ACK. I've pushed 5, 6, and 7. -- Eric Blake

Re: [libvirt] [PATCH 1/1] qemu: build failed due to unused variables

2011-07-13 Thread Eric Blake
On 07/13/2011 06:44 AM, Osier Yang wrote: 于 2011年07月13日 18:11, Peter Krempa 写道: While compiling on F15 build crashed (probably because of new GCC). --- AUTHORS|1 + src/qemu/qemu_driver.c |7 --- 2 files changed, 5 insertions(+), 3 deletions(-) I meet the

Re: [libvirt] [PATCH] virsh: fix missing prompt message for 'snapshot-delete' command

2011-07-13 Thread Eric Blake
On 07/13/2011 06:51 AM, Osier Yang wrote: 于 2011年07月13日 16:36, Nan Zhang 写道: Make the command 'virsh snapshot-delete' has the appropriate prompt message when executing sucessful or failed. -if (virDomainSnapshotDelete(snapshot, flags) 0) You can keep this line unchanged, and switch

Re: [libvirt] [PATCH 1/8] Small fixes on rpc generator scripts

2011-07-13 Thread Eric Blake
On 07/13/2011 04:19 AM, Osier Yang wrote: 1. Fix typos caused by the renaming 2. It should substitute remote/remote_protocol.h to remote_protocol.h. --- src/rpc/gendispatch.pl |6 +++--- src/rpc/genprotocol.pl |2 +- 2 files changed, 4 insertions(+), 4 deletions(-) ACK. +++

Re: [libvirt] [PATCHv2 08/27] esx: reject unknown flags

2011-07-13 Thread Eric Blake
On 07/13/2011 06:15 AM, Matthias Bolte wrote: 2011/7/8 Eric Blake ebl...@redhat.com: Silently ignored flags get in the way of new features that use those flags. @@ -3829,12 +3837,14 @@ esxDomainMigratePrepare(virConnectPtr dconn, int *cookielen ATTRIBUTE_UNUSED,

Re: [libvirt] [PATCH 2/8] UndefineFlags: Define the public API

2011-07-13 Thread Eric Blake
On 07/13/2011 04:19 AM, Osier Yang wrote: Only support to remove domain managed state file when undefining s/to remove/removing/ the domain currently. --- include/libvirt/libvirt.h.in | 10 ++ python/generator.py |1 + src/libvirt_public.syms |5 + 3

Re: [libvirt] [PATCH 3/8] UndefineFlags: Implement the public API

2011-07-13 Thread Eric Blake
On 07/13/2011 04:19 AM, Osier Yang wrote: --- src/libvirt.c | 53 - 1 files changed, 52 insertions(+), 1 deletions(-) per my comments in 2/8, /** + * virDomainUndefineWithFlags:

Re: [libvirt] [PATCH 4/8] UndefineFlags: Define the internal API

2011-07-13 Thread Eric Blake
On 07/13/2011 04:19 AM, Osier Yang wrote: --- src/driver.h |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/src/driver.h b/src/driver.h index 71a52c9..3db9fb7 100644 --- a/src/driver.h +++ b/src/driver.h @@ -219,6 +219,9 @@ typedef virDomainPtr typedef int

Re: [libvirt] [PATCH 5/8] UndefineFlags: Implement qemu driver handling

2011-07-13 Thread Eric Blake
On 07/13/2011 04:19 AM, Osier Yang wrote: --- src/qemu/qemu_driver.c | 31 +++ 1 files changed, 27 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index f962e2c..a9f6986 100644 --- a/src/qemu/qemu_driver.c +++

Re: [libvirt] [PATCH 6/8] UndefineFlags: Implement libxl driver handling

2011-07-13 Thread Eric Blake
On 07/13/2011 04:19 AM, Osier Yang wrote: --- src/libxl/libxl_driver.c | 32 1 files changed, 28 insertions(+), 4 deletions(-) diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index 808480f..f04931b 100644 --- a/src/libxl/libxl_driver.c

Re: [libvirt] [PATCH 7/8] UndefineFlags: Implement the remote protocol

2011-07-13 Thread Eric Blake
On 07/13/2011 04:19 AM, Osier Yang wrote: With small typo fixes (s/remote_generator/gendispatch/, and s/remote_internal/remote_driver/) --- src/remote/qemu_protocol.x |2 +- src/remote/remote_driver.c |5 +++-- src/remote/remote_protocol.x | 14 ++

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

2011-07-13 Thread Eric Blake
On 07/13/2011 04:19 AM, Osier Yang wrote: --- tools/virsh.c | 12 +++- tools/virsh.pod |6 +- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index 3cdf043..f81e923 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@

[libvirt] [PATCH 4/5] hyperv: Add basic driver for Microsoft Hyper-V

2011-07-13 Thread Matthias Bolte
Domain listing, basic information retrieval and domain life cycle management is implemented. But currently the domian XML output lacks the complete devices section. The driver uses OpenWSMAN to directly communicate with an Hyper-V server over its WS-Management interface exposed via Microsoft

[libvirt] [PATCH 0/5] Add basic driver for Microsoft Hyper-V (series version)

2011-07-13 Thread Matthias Bolte
This is the series version of this patch https://www.redhat.com/archives/libvir-list/2011-July/msg00668.html Daniel suggested to split it for easier review. This series includes some small fixes for problem I noticed while splitting the original patch. Matthias -- libvir-list mailing list

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

2011-07-13 Thread Matthias Bolte
--- configure.ac | 38 ++ 1 files changed, 38 insertions(+), 0 deletions(-) diff --git a/configure.ac b/configure.ac index e9d5be4..d7ebe79 100644 --- a/configure.ac +++ b/configure.ac @@ -66,6 +66,7 @@ XMLRPC_REQUIRED=1.14.0 HAL_REQUIRED=0.5.0

[libvirt] [PATCH 5/5] hyperv: Add basic documentation

2011-07-13 Thread Matthias Bolte
--- docs/drivers.html.in |1 + docs/drvhyperv.html.in | 103 docs/index.html.in |3 + docs/sitemap.html.in |4 ++ src/README |3 +- 5 files changed, 113 insertions(+), 1 deletions(-) create mode 100644

Re: [libvirt] [PATCH] Add basic driver for Microsoft Hyper-V

2011-07-13 Thread Matthias Bolte
2011/7/12 Matthias Bolte matthias.bo...@googlemail.com: Domain listing, basic information retrieval and domain life cycle management is implemented. But currently the domian XML output lacks the complete devices section. The driver uses OpenWSMAN to directly communicate with an Hyper-V

[libvirt] [PATCH 3/5] hyperv: Add OpenWSMAN based client for the Hyper-V WMI API

2011-07-13 Thread Matthias Bolte
Add a generator script to generate the structs and serialization information for OpenWSMAN. openwsman.h collects workarounds for problems in OpenWSMAN = 2.2.6. There are also disabled sections that would use ws_serializer_free_mem but can't because it's broken in OpenWSMAN = 2.2.6. Patches to fix

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

2011-07-13 Thread Matthias Bolte
--- cfg.mk |1 + include/libvirt/virterror.h |1 + libvirt.spec.in |9 +++ po/POTFILES.in |1 + src/Makefile.am | 29 + src/driver.h |1 +

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

2011-07-13 Thread Eric Blake
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 - that is, both introduce the new

[libvirt] RFC New virDomainBlockPull API family to libvirt

2011-07-13 Thread Adam Litke
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 qemu API is settling out again, I would like to propose an updated libvirt public API which has required only a

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

2011-07-13 Thread Eric Blake
On 07/13/2011 01:01 PM, Matthias Bolte wrote: --- cfg.mk |1 + include/libvirt/virterror.h |1 + libvirt.spec.in |9 +++ See patch 1/5 about this file. po/POTFILES.in |1 + src/Makefile.am

Re: [libvirt] [PATCHv2 10/27] lxc: reject unknown flags

2011-07-13 Thread Eric Blake
On 07/13/2011 06:21 AM, Matthias Bolte wrote: 2011/7/8 Eric Blake ebl...@redhat.com: * src/lxc/lxc_driver.c (lxcOpen, lxcDomainSetMemoryParameters) (lxcDomainGetMemoryParameters): Reject unknown flags. * src/lxc/lxc_container.c (lxcContainerStart): Use unsigned flags. @@ -889,7 +889,7 @@ int

Re: [libvirt] [PATCHv2 14/27] test: reject unknown flags

2011-07-13 Thread Eric Blake
On 07/13/2011 06:35 AM, Matthias Bolte wrote: 2011/7/8 Eric Blake ebl...@redhat.com: static int testDomainCoreDump(virDomainPtr domain, const char *to, - unsigned int flags ATTRIBUTE_UNUSED) + unsigned

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

2011-07-13 Thread Eric Blake
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 insertions(+), 3 deletions(-) @@

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

2011-07-13 Thread Eric Blake
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 running domain's state info to the stateDir). To prevent this flag

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

2011-07-13 Thread Eric Blake
On 07/13/2011 03:14 PM, Eric Blake wrote: Don't get fooled by the ATTRIBUTE_UNUSED again. All *DomainGetXMLDesc use virDomainDefFormat and have to accept all flags that virDomainDefFormat accepts. I suggest to recheck your series for this pattern, here it's just the first time that I notice

Re: [libvirt] [PATCHv2 24/27] build: don't hand-roll cloexec code

2011-07-13 Thread Eric Blake
On 07/13/2011 07:22 AM, Matthias Bolte wrote: 2011/7/8 Eric Blake ebl...@redhat.com: No need to repeat common code. * src/util/bridge.c (brInit): Use virSetCloseExec. (brSetInterfaceUp): Prefer unsigned flags. * src/uml/uml_driver.c (umlSetCloseExec): Delete. (umlStartVMDaemon): Use util

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

2011-07-13 Thread Wen Congyang
At 07/13/2011 11:03 PM, Eric Blake Write: On 07/13/2011 09:17 AM, Osier Yang wrote: qemuDomainModifyDeviceFlags: Changing ret to 0, but don't reset it to -1 on failure, it's not good idea to change the value of ret in the codes to do some condition checking. This patch fix it. Can you

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

2011-07-13 Thread Osier Yang
于 2011年07月13日 23:03, Eric Blake 写道: On 07/13/2011 09:17 AM, Osier Yang wrote: qemuDomainModifyDeviceFlags: Changing ret to 0, but don't reset it to -1 on failure, it's not good idea to change the value of ret in the codes to do some condition checking. This patch fix it. Can you identify which

[libvirt] [PATCH 0/4 V4] Add support for send keys to guest

2011-07-13 Thread Lai Jiangshan
Add virtkey lib for usage-improvment and keycode translating. Expose send-key in virsh Implement send-key function for the qemu driver Daniel P. Berrange (1): util: Add keymaps.csv Lai Jiangshan (3): util: add virtkey send-key: Expose the new API in virsh qemu:send-key: Implement the

[libvirt] [PATCH 2/4 V4] util: add virtkey

2011-07-13 Thread Lai Jiangshan
Add virtkey lib for usage-improvment and keycode translating. Add 4 internal API for the aim const char *virKeycodeSetTypeToString(int codeset); int virKeycodeSetTypeFromString(const char *name); int virParseKeyName(virKeycodeSet codeset, const char *keyname); int

[libvirt] [PATCH 1/4 V4] util: Add keymaps.csv

2011-07-13 Thread Lai Jiangshan
From: Daniel P. Berrange berra...@redhat.com Should keep it as the same as: http://git.gnome.org/browse/gtk-vnc/commit/src/keymaps.csv All master keymaps are defined in a CSV file. THis covers Linux keycodes, OSX keycodes, AT set1, 2 3, XT keycodes, the XT encoding used by the Linux KBD

[libvirt] [PATCH 4/4 V4] qemu:send-key: Implement the driver methods

2011-07-13 Thread Lai Jiangshan
qemu driver just accept xt_kbd codeset's keycode, so the lib virtkey is used for translating keycodes from other codesets. Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- src/qemu/qemu_driver.c | 71 ++ src/qemu/qemu_monitor.c | 17

  1   2   >