Re: [libvirt] [PATCH] qemu: Fix startupPolicy for snapshot-revert

2012-03-08 Thread Michal Privoznik
On 07.03.2012 19:36, Eric Blake wrote: On 03/07/2012 11:19 AM, Michal Privoznik wrote: Currently, startupPolicy='requisite' was determining cold boot by migrateForm != NULL. That means, if domain was started up with migrateForm set we didn't require disk source path and allowed

[libvirt] [PATCH 0/7] Various bugfixes related to device management

2012-03-08 Thread Laine Stump
This series contains 7 patches that are mostly related by the face that I noticed the problems they're solving while writing the interface type='hostdev' code during the past couple weeks. After that series was pushed, I sat down to fix everything I'd noticed before I forgot about it. I'm sending

[libvirt] [PATCH 1/7] util: consolidate duplicated error messages in virnetlink.c

2012-03-08 Thread Laine Stump
There are special stub versions of all public functions in this file that are compiled when either libnl isn't available or the platform isn't linux. Each of these functions had two almost identical message, differing only in the function name included in the message. Since log messages already

[libvirt] [PATCH 3/7] qemu: don't 'remove' hostdev objects from domain if operation fails

2012-03-08 Thread Laine Stump
There were certain paths through the hostdev detach code that could lead to the lower level function failing (and not removing the object from the domain's hostdevs list), but the higher level function free'ing the hostdev object anyway. This would leave a stale hostdevdef pointer in the list,

[libvirt] [PATCH 2/7] util: make virDomainLeaseDefFree global

2012-03-08 Thread Laine Stump
It will be used in a different file in an upcoming patch. --- src/conf/domain_conf.c |2 +- src/conf/domain_conf.h |1 + src/libvirt_private.syms |1 + 3 files changed, 3 insertions(+), 1 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index

[libvirt] [PATCH 4/7] util: eliminate device object leaks related to virDomain*Remove*()

2012-03-08 Thread Laine Stump
There are several functions in domain_conf.c that remove a device object from the domain's list of that object type, but don't free the object or return it to the caller to free. In many cases this isn't a problem because the caller already had a pointer to the object and frees it afterward, but

[libvirt] [PATCH 5/7] util: standardize return from functions calling virNetlinkCommand

2012-03-08 Thread Laine Stump
There are several functions that call virNetlinkCommand, and they all follow a common pattern, with three exit labels: err_exit (or cleanup), malformed_resp, and buffer_too_small. All three of these labels do their own cleanup and have their own return. However, the malformed_resp label usually

[libvirt] [PATCH 7/7] qemu: eliminate memory leak in qemuDomainUpdateDeviceConfig

2012-03-08 Thread Laine Stump
This function was freeing a virDomainNetDef with VIR_FREE(). virDomainNetDef is a complex structure with many pointers to other dynamically allocated data; to properly free it virDomainNetDefFree() must be called instead, otherwise several strings (and potentially other things) will be leaked. ---

[libvirt] [PATCH 6/7] qemu: support persistent hotplug of hostdev devices

2012-03-08 Thread Laine Stump
For some reason, although live hotplug of hostdev devices is supported, persistent hotplug is not. This patch adds the proper VIR_DOMAIN_DEVICE_HOSTDEV cases to the switches in qemuDomainAttachDeviceConfig and qemuDomainDetachDeviceConfig. --- src/qemu/qemu_driver.c | 32

Re: [libvirt] [PATCH] qemu: Don't parse device twice in attach/detach

2012-03-08 Thread Michal Privoznik
On 07.03.2012 19:46, Laine Stump wrote: On 03/07/2012 12:48 PM, Michal Privoznik wrote: Some nits are generated during XML parse (e.g. MAC address of an interface); However, with current implementation, if we are plugging a device both to persistent and live config, we parse given XML twice:

[libvirt] [PATCH] util: Don't overflow on errno in virFileAccessibleAs

2012-03-08 Thread Michal Privoznik
If we need to virFork() to check assess() under different UID+GID we need to translate returned status via WEXITSTATUS(). Otherwise, we may return values greater than 255 which is obviously wrong. --- src/util/util.c |7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git

[libvirt] [PATCH v2] virsh: Use option alias for outmoded --persistent

2012-03-08 Thread Osier Yang
Since VIR_DOMAIN_AFFECT_{LIVE,CONFIG,CURRENT} was created, all new virsh commands use --config to represents the persistent changing. This patch add --config option for the old commands which still use --persistent, and --persistent is now alias of --config. tools/virsh.c: (use --config, and

Re: [libvirt] [PATCH] sanlock: Fix condition left crippled while debugging

2012-03-08 Thread Peter Krempa
On 03/07/2012 05:05 PM, Eric Blake wrote: On 03/07/2012 07:36 AM, Peter Krempa wrote: --- src/locking/lock_driver_sanlock.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) ACK. Pushed; Thanks Peter -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] [PATCH] sanlock: Use STREQ_NULLABLE instead of STREQ on strings that may be null

2012-03-08 Thread Peter Krempa
On 03/07/2012 05:04 PM, Eric Blake wrote: On 03/07/2012 07:30 AM, Peter Krempa wrote: The function sanlock_inquire can return NULL in the state string if the message consists only of a header. The return value is arbitrary and sent by the server. We should proceed carefully while touching such

[libvirt] [PATCH v3] qemu: Support numad

2012-03-08 Thread Osier Yang
numad is an user-level daemon that monitors NUMA topology and processes resource consumption to facilitate good NUMA resource alignment of applications/virtual machines to improve performance and minimize cost of remote memory latencies. It provides a pre-placement advisory interface, so

Re: [libvirt] [Qemu-devel] Qemu, libvirt, and CPU models

2012-03-08 Thread Lee Schermerhorn
On Wed, 2012-03-07 at 16:07 -0700, Eric Blake wrote: On 03/07/2012 03:26 PM, Eduardo Habkost wrote: Thanks a lot for the explanations, Daniel. Comments about specific items inline. - How can we make sure there is no confusion between libvirt and Qemu about the CPU models?

Re: [libvirt] [PATCH] util: Don't overflow on errno in virFileAccessibleAs

2012-03-08 Thread Eric Blake
On 03/08/2012 03:37 AM, Michal Privoznik wrote: If we need to virFork() to check assess() under different UID+GID we need to translate returned status via WEXITSTATUS(). Otherwise, we may return values greater than 255 which is obviously wrong. --- src/util/util.c |7 ++- 1 files

[libvirt] [PATCH] qemuProcessStart: Switch to flags instead of bunch booleans

2012-03-08 Thread Michal Privoznik
Currently, we have 3 boolean arguments we have to pass to qemuProcessStart(). As libvirt grows it is harder and harder to remember them and their position. Therefore we should switch to flags instead. --- src/qemu/qemu_driver.c| 45 +

[libvirt] [PATCH] qemuBuildCommandLine: Don't add tlsPort if none set

2012-03-08 Thread Michal Privoznik
If user hasn't supplied any tlsPort we default to setting it to zero in our internal structure. However, when building command line we test it against -1 which is obviously wrong. --- src/qemu/qemu_command.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git

Re: [libvirt] [Qemu-devel] Qemu, libvirt, and CPU models

2012-03-08 Thread Jiri Denemark
On Wed, Mar 07, 2012 at 19:26:25 -0300, Eduardo Habkost wrote: Awesome. So, if Qemu and libvirt disagrees, libvirt will know that and add the necessary flags? That was my main worry. If disagreement between Qemu and libvirt is not a problem, it would make things much easier. ...but: Is

Re: [libvirt] [Qemu-devel] Qemu, libvirt, and CPU models

2012-03-08 Thread Eduardo Habkost
On Wed, Mar 07, 2012 at 04:07:06PM -0700, Eric Blake wrote: (Do we have any case of capability-querying being made using QMP before starting any actual VM, today?) Right now, we have two levels of queries - the 'qemu -help' and 'qemu -device ?' output is gathered up front (we really

Re: [libvirt] [PATCH] util: Don't overflow on errno in virFileAccessibleAs

2012-03-08 Thread Michal Privoznik
On 08.03.2012 14:08, Eric Blake wrote: On 03/08/2012 03:37 AM, Michal Privoznik wrote: If we need to virFork() to check assess() under different UID+GID we need to translate returned status via WEXITSTATUS(). Otherwise, we may return values greater than 255 which is obviously wrong. ---

Re: [libvirt] [PATCH] xml: Clean up schemas to use shared data types instead of local

2012-03-08 Thread Peter Krempa
On 03/06/2012 04:11 PM, Eric Blake wrote: On 03/06/2012 08:00 AM, Osier Yang wrote: On 2012年03月06日 22:15, Peter Krempa wrote: The schema files contained duplicate data types that can be shared from the basictypes.rng file. --- IIRC, unsignedLong allows the the + sign, and leading spaces,

[libvirt] [PATCH] Removed more AMD-specific features from cpu64-rhel* models

2012-03-08 Thread Martin Kletzander
We found few more AMD-specific features in cpu64-rhel* models that made it impossible to start qemu guest on Intel host (with this setting) even though qemu itself starts correctly with them. --- src/cpu/cpu_map.xml |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git

Re: [libvirt] [PATCH] Removed more AMD-specific features from cpu64-rhel* models

2012-03-08 Thread Eric Blake
On 03/08/2012 08:02 AM, Martin Kletzander wrote: We found few more AMD-specific features in cpu64-rhel* models that made it impossible to start qemu guest on Intel host (with this setting) even though qemu itself starts correctly with them. --- src/cpu/cpu_map.xml |2 -- 1 files

Re: [libvirt] [PATCH] rpc: Fix VPATH building issue

2012-03-08 Thread Eric Blake
On 03/07/2012 12:45 AM, Guannan Ren wrote: Subject: [PATCH] rpc: generalize solution for VPATH builds Commit 5d4b0c4c80 tried to fix certain classes of VPATH builds, but was too limited. In particular, Guannan Ren reported: For example: The libvirt source code resides in /home/testuser,

Re: [libvirt] [libvirt-glib] All string getters should return 'const'

2012-03-08 Thread Christophe Fergeau
Hey, Thanks for doing this! I'll do a more in depth review on Monday if noone beats me to it, just some quick notes: On Wed, Mar 07, 2012 at 06:02:06AM +0200, Zeeshan Ali (Khattak) wrote: From: Zeeshan Ali (Khattak) zeesha...@gnome.org -char * -gvir_config_xml_get_child_element_content_glib

Re: [libvirt] [libvirt-glib] Keep domain devices list sorted

2012-03-08 Thread Christophe Fergeau
On Wed, Mar 07, 2012 at 01:56:44AM +0200, Zeeshan Ali (Khattak) wrote: On Wed, Mar 7, 2012 at 1:03 AM, Eric Blake ebl...@redhat.com wrote: Actually, if I understand things right, preserving order _is_ important to guarantee.  For example, with older XML that lacked per-device boot

Re: [libvirt] Can't connect ESXi ssl with virsh

2012-03-08 Thread Matthias Bolte
2012/3/5 Zhimou Peng zhp...@redhat.com: Hi, I try to use virsh connect ESXi5.0 with ssl [root@zheng ~]#  virsh -c esx://10.66.6.211/ Enter username for 10.66.6.211 [root]: Enter root's password for 10.66.6.211: error: internal error curl_easy_perform() returned an error: Peer certificate

[libvirt] libvirt_tck autotest wrapper looks good, commited

2012-03-08 Thread Lucas Meneghel Rodrigues
Thanks Guannan: https://github.com/autotest/autotest/commit/ba4b748e7b9a9bfe7898a97cdccdc9b867d5321c Cheers, Lucas -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] Build error on OSX in src/util/virnetlink.c

2012-03-08 Thread Laine Stump
On 03/06/2012 11:28 AM, Eric Blake wrote: On 03/06/2012 09:15 AM, Duncan Rance wrote: Hi, I'm building on OSX with no libnl. I had to do this to get src/util/virnetlink.c to compile: diff --git a/src/util/virnetlink.c b/src/util/virnetlink.c index 1575bad..59f3e39 100644 ---

Re: [libvirt] [PATCH 1/7] util: consolidate duplicated error messages in virnetlink.c

2012-03-08 Thread Eric Blake
On 03/08/2012 02:24 AM, Laine Stump wrote: There are special stub versions of all public functions in this file that are compiled when either libnl isn't available or the platform isn't linux. Each of these functions had two almost identical message, differing only in the function name

Re: [libvirt] [PATCH 0/7] Various bugfixes related to device management

2012-03-08 Thread Eric Blake
On 03/08/2012 02:24 AM, Laine Stump wrote: This series contains 7 patches that are mostly related by the face that I noticed the problems they're solving while writing the interface type='hostdev' code during the past couple weeks. After that series was pushed, I sat down to fix everything I'd

Re: [libvirt] [PATCH v2] Attach vm-id to Open vSwitch interfaces.

2012-03-08 Thread Laine Stump
On 03/07/2012 02:15 AM, Ansis Atteka wrote: This patch will allow OpenFlow controllers to identify which interface belongs to a particular VM by using the Domain UUID. ovs-vsctl get Interface vnet0 external_ids {attached-mac=52:54:00:8C:55:2C, iface-id=83ce45d6-3639-096e-ab3c-21f66a05f7fa,

[libvirt] [PATCH] util: whitespace change to virNetDevOpenvswitchAddPort

2012-03-08 Thread Laine Stump
The indentation on the final lines of the function was off by four spaces, making me wonder for a second if there was something missing. (There wasn't.) --- Pushing under trivial rule. src/util/virnetdevopenvswitch.c | 14 +++--- 1 files changed, 7 insertions(+), 7 deletions(-) diff

Re: [libvirt] [PATCH] util: log error on OOM in virNetDevOpenvswitchAddPort

2012-03-08 Thread Eric Blake
On 03/08/2012 11:58 AM, Laine Stump wrote: OOM conditions silently returned failure. --- src/util/virnetdevopenvswitch.c | 12 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/util/virnetdevopenvswitch.c b/src/util/virnetdevopenvswitch.c index

[libvirt] [PATCH] util: log error on OOM in virNetDevOpenvswitchAddPort

2012-03-08 Thread Laine Stump
OOM conditions silently returned failure. --- src/util/virnetdevopenvswitch.c | 12 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/util/virnetdevopenvswitch.c b/src/util/virnetdevopenvswitch.c index e2d5124..61bb9e1 100644 --- a/src/util/virnetdevopenvswitch.c

[libvirt] [PATCH] util: add stub pciConfigAddressToSysfsFile for non-linux platforms

2012-03-08 Thread Laine Stump
Absence of this stub function caused a build failure on mingw32. --- Pushed under build breaker rule (I'm doing way too many of these - I really need to start running autobuild before any push, instead of just make check make syntax-check.) src/util/pci.c |9 + 1 files changed, 9

[libvirt] [PATCH] remove daemon/probes.h from .gitignore

2012-03-08 Thread Laine Stump
The file daemon/probes.h used to be generated as part of a build, but is no longer used. However, a stale copy of it lying around could cause a build to fail. Removing it from .gitignore will make it more likely someone will notice that they have it lying around. --- Although this is a very

[libvirt] [PATCH] util: consolidate duplicated error messages in pci.c

2012-03-08 Thread Laine Stump
This is nearly identical to an earlier patch for virnetlink.c (after fixing it per Eric's recommendations). There are special stub versions of all public functions in this file that are compiled when the platform isn't linux. Each of these functions had an almost identical message, differing only

Re: [libvirt] [PATCH] util: consolidate duplicated error messages in pci.c

2012-03-08 Thread Eric Blake
On 03/08/2012 02:53 PM, Laine Stump wrote: This is nearly identical to an earlier patch for virnetlink.c (after fixing it per Eric's recommendations). There are special stub versions of all public functions in this file that are compiled when the platform isn't linux. Each of these

Re: [libvirt] [PATCH] remove daemon/probes.h from .gitignore

2012-03-08 Thread Eric Blake
On 03/08/2012 02:53 PM, Laine Stump wrote: The file daemon/probes.h used to be generated as part of a build, but is no longer used. However, a stale copy of it lying around could cause a build to fail. Removing it from .gitignore will make it more likely someone will notice that they have it

Re: [libvirt] [PATCH 0/7] Various bugfixes related to device management

2012-03-08 Thread Laine Stump
On 03/08/2012 01:41 PM, Eric Blake wrote: On 03/08/2012 02:24 AM, Laine Stump wrote: This series contains 7 patches that are mostly related by the face that I noticed the problems they're solving while writing the interface type='hostdev' code during the past couple weeks. After that series

Re: [libvirt] [PATCH] util: log error on OOM in virNetDevOpenvswitchAddPort

2012-03-08 Thread Laine Stump
On 03/08/2012 02:00 PM, Eric Blake wrote: On 03/08/2012 11:58 AM, Laine Stump wrote: OOM conditions silently returned failure. --- src/util/virnetdevopenvswitch.c | 12 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/util/virnetdevopenvswitch.c

Re: [libvirt] [PATCH] util: consolidate duplicated error messages in pci.c

2012-03-08 Thread Laine Stump
On 03/08/2012 04:57 PM, Eric Blake wrote: On 03/08/2012 02:53 PM, Laine Stump wrote: This is nearly identical to an earlier patch for virnetlink.c (after fixing it per Eric's recommendations). There are special stub versions of all public functions in this file that are compiled when the

Re: [libvirt] [PATCH] remove daemon/probes.h from .gitignore

2012-03-08 Thread Laine Stump
On 03/08/2012 04:59 PM, Eric Blake wrote: On 03/08/2012 02:53 PM, Laine Stump wrote: The file daemon/probes.h used to be generated as part of a build, but is no longer used. However, a stale copy of it lying around could cause a build to fail. Removing it from .gitignore will make it more

Re: [libvirt] [PATCH] qemuBuildCommandLine: Don't add tlsPort if none set

2012-03-08 Thread Eric Blake
On 03/08/2012 06:30 AM, Michal Privoznik wrote: If user hasn't supplied any tlsPort we default to setting it to zero in our internal structure. However, when building command line we test it against -1 which is obviously wrong. --- src/qemu/qemu_command.c |2 +- 1 files changed, 1

Re: [libvirt] [PATCH 0/9] Add supports for three new QMP events

2012-03-08 Thread Osier Yang
ping! On 2012年03月05日 18:25, Osier Yang wrote: This patch series adds support for 3 new QMP events: WAKEUP, SUSPEND, and DEVICE_TRAY_MOVED, and related changes on domain's conf and status. [1/9] Add support for tray moved event [2/9] ~ [5/9]: New attribute tray is added to disk target,

Re: [libvirt] [PATCH v2] virsh: Use option alias for outmoded --persistent

2012-03-08 Thread Daniel Veillard
On Thu, Mar 08, 2012 at 07:38:57PM +0800, Osier Yang wrote: Since VIR_DOMAIN_AFFECT_{LIVE,CONFIG,CURRENT} was created, all new virsh commands use --config to represents the persistent changing. This patch add --config option for the old commands which still use --persistent, and --persistent

Re: [libvirt] [PATCH v2] virsh: Use option alias for outmoded --persistent

2012-03-08 Thread Osier Yang
On 2012年03月09日 10:55, Daniel Veillard wrote: On Thu, Mar 08, 2012 at 07:38:57PM +0800, Osier Yang wrote: Since VIR_DOMAIN_AFFECT_{LIVE,CONFIG,CURRENT} was created, all new virsh commands use --config to represents the persistent changing. This patch add --config option for the old commands

Re: [libvirt] libvirt_tck autotest wrapper looks good, commited

2012-03-08 Thread Guannan Ren
On 03/09/2012 01:40 AM, Lucas Meneghel Rodrigues wrote: Thanks Guannan: https://github.com/autotest/autotest/commit/ba4b748e7b9a9bfe7898a97cdccdc9b867d5321c Cheers, Lucas That's great, thank Lucas. This is the initial version, we need to maintain it later on. If that, the patch

Re: [libvirt] [Patch]: spice agent-mouse support [v3]

2012-03-08 Thread Osier Yang
On 2012年03月07日 19:57, Zhou Peng wrote: Sorry my git send-email failed to the list :-( Signed-off-by: Zhou Pengzhoup...@nfs.iscas.ac.cn spice agent-mouse support Usage: graphics type='spice' mouse mode='client'|'server'/ graphics/ Pushed with the attached diff squashed in. You are added