[libvirt] [PATCH] initialize meta in virStorageFileGetMetadata, not in each caller

2010-05-18 Thread Jim Meyering
Here's proactive clean-up that is IMHO required. Otherwise, it's just too easy not to realize that meta must be cleared before each and every call to virStorageFileGetMetadata and virStorageFileGetMetadataFromFD. Besides, any change that adds just 2 lines and removes 11, in addition to making the

Re: [libvirt] [PATCH] qemudDomainSetVcpus: avoid NULL-deref on failed uuid look-up

2010-05-18 Thread Jim Meyering
Eric Blake wrote: On 05/17/2010 11:33 AM, Jim Meyering wrote: Here's the fix, followed by the endjob/cleanup code: From d696f6067d6e802714adbf3e36bf53c9fcf3ec76 Mon Sep 17 00:00:00 2001 From: Jim Meyering meyer...@redhat.com Date: Mon, 17 May 2010 19:28:44 +0200 Subject: [PATCH]

[libvirt] [PATCH] ebiptablesWriteToTempFile: don't close a negative file descriptor

2010-05-18 Thread Jim Meyering
If mkstemp fails here, we end up closing a negative FD: int fd = mkstemp(filename); if (fd 0) { virNWFilterReportError(VIR_ERR_INTERNAL_ERROR, %s, _(cannot create temporary file)); goto err_exit; } Here's

[libvirt] [PATCH] virDomainNetDefParseXML: avoid leak upon multiple filterref

2010-05-18 Thread Jim Meyering
The offending code below appears in this loop: virNWFilterHashTablePtr filterparams = NULL; ... cur = node-children; while (cur != NULL) { ... } so the first assignment works fine, but second and subsequent ones leak the buffer returned by each preceding

Re: [libvirt] [PATCH 1/2] Add simple bitmap operations to utils

2010-05-18 Thread Daniel P. Berrange
On Mon, May 17, 2010 at 12:09:59PM -0600, Jim Fehlig wrote: --- src/util/util.c | 38 ++ src/util/util.h | 10 ++ 2 files changed, 48 insertions(+), 0 deletions(-) Can you put those in util/bitmap.{h,c} as the util.c file is getting far too

Re: [libvirt] [PATCH 2/2] Fix race in finding available vnc port

2010-05-18 Thread Daniel P. Berrange
On Mon, May 17, 2010 at 12:10:00PM -0600, Jim Fehlig wrote: The qemu driver contains a subtle race in the logic to find next available vnc port. Currently it iterates through all available ports and returns the first for which bind(2) succeeds. However it is possible that a previously issued

[libvirt] [PATCH] linuxNodeInfoCPUPopulate: avoid used-uninitialized via a test

2010-05-18 Thread Jim Meyering
See the comment: From 1b200ba22d742e685de0b9853c8cd276df8e129f Mon Sep 17 00:00:00 2001 From: Jim Meyering meyer...@redhat.com Date: Tue, 18 May 2010 11:58:32 +0200 Subject: [PATCH] linuxNodeInfoCPUPopulate: avoid used-uninitialized via a test * tests/nodeinfotest.c (linuxTestCompareFiles):

[libvirt] [PATCH] virNWFilterDefParseXML: avoid leak on error paths

2010-05-18 Thread Jim Meyering
In this function, static virNWFilterDefPtr virNWFilterDefParseXML(xmlXPathContextPtr ctxt) { we allocate space for the result we expect to return: if (VIR_ALLOC(ret) 0) { virReportOOMError(); return NULL; } and later, ... if

Re: [libvirt] [PATCH] linuxNodeInfoCPUPopulate: avoid used-uninitialized via a test

2010-05-18 Thread Jim Meyering
Jim Meyering wrote: See the comment: From 1b200ba22d742e685de0b9853c8cd276df8e129f Mon Sep 17 00:00:00 2001 From: Jim Meyering meyer...@redhat.com Date: Tue, 18 May 2010 11:58:32 +0200 Subject: [PATCH] linuxNodeInfoCPUPopulate: avoid used-uninitialized via a test * tests/nodeinfotest.c

[libvirt] [PATCH] qemuMonitorTextMigrate: avoid leak on OOM-error path

2010-05-18 Thread Jim Meyering
Fix a minor leak: From 0fc88bfcae06346e871d2a4a89febb160bc0857e Mon Sep 17 00:00:00 2001 From: Jim Meyering meyer...@redhat.com Date: Tue, 18 May 2010 12:17:23 +0200 Subject: [PATCH] qemuMonitorTextMigrate: avoid leak on OOM-error path * src/qemu/qemu_monitor_text.c (qemuMonitorTextMigrate):

Re: [libvirt] [PATCH] virNWFilterDefParseXML: avoid leak on error paths

2010-05-18 Thread Stefan Berger
On Tue, 2010-05-18 at 12:09 +0200, Jim Meyering wrote: Hence, the lack of anything to free ret when this function returns NULL constitutes a leak. Here's the patch: From 4c13990a15b33f03595d58b46b6e34e03bfffa65 Mon Sep 17 00:00:00 2001 From: Jim Meyering meyer...@redhat.com Date: Tue,

[libvirt] [PATCH] tests: do not ignore virInitialize failure

2010-05-18 Thread Jim Meyering
Simple... From f5ee09ed08473478b3ea3135d51125fbf687e402 Mon Sep 17 00:00:00 2001 From: Jim Meyering meyer...@redhat.com Date: Tue, 18 May 2010 12:32:39 +0200 Subject: [PATCH] tests: do not ignore virInitialize failure * tests/nodeinfotest.c (mymain): Do not ignore virInitialize failure. Most

[libvirt] python module set-up ignores virInitialize failure

2010-05-18 Thread Jim Meyering
I've just fixed code in a test that ignored virInitialize failure. Looking at all uses, I saw one other: in python/libvirt-override.c, where the initialization function ignores virInitialize failure: void #ifndef __CYGWIN__ initlibvirtmod #else initcygvirtmod #endif (void) {

Re: [libvirt] [PATCH] ebiptablesWriteToTempFile: don't close a negative file descriptor

2010-05-18 Thread Stefan Berger
On Tue, 2010-05-18 at 10:13 +0200, Jim Meyering wrote: From b7c6593b3a8b59d49b492cd45fbf5f9c706bb78f Mon Sep 17 00:00:00 2001 From: Jim Meyering meyer...@redhat.com Date: Tue, 18 May 2010 10:11:23 +0200 Subject: [PATCH] ebiptablesWriteToTempFile: don't close a negative file descriptor

Re: [libvirt] python module set-up ignores virInitialize failure

2010-05-18 Thread Daniel P. Berrange
On Tue, May 18, 2010 at 12:32:13PM +0200, Jim Meyering wrote: I've just fixed code in a test that ignored virInitialize failure. Looking at all uses, I saw one other: in python/libvirt-override.c, where the initialization function ignores virInitialize failure: void #ifndef __CYGWIN__

Re: [libvirt] [PATCH] Init script for suspending/resuming guests on shutdown/boot

2010-05-18 Thread Jiri Denemark
+ +# the following is the LSB init header see +# http://www.linux-foundation.org/spec//booksets/LSB-Core-generic/LSB-Core-generic.html#INITSCRCOMCONV Is the second // necessary, or can it just be spec/booksets? For that matter, that URL didn't work for me; I found:

Re: [libvirt] [PATCH] Init script for suspending/resuming guests on shutdown/boot

2010-05-18 Thread Jiri Denemark
just an idea: wouldn't it make sense to add a global configure switch allowing to shut down the vms instead of suspending them? E.g. in /etc/sysconfig/libvirtd: ON_SHUTDOWN=suspend (this is the default) or ON_SHUTDOWN=shutdown This could be made available through the init script

Re: [libvirt] python module set-up ignores virInitialize failure

2010-05-18 Thread Jim Meyering
Daniel P. Berrange wrote: On Tue, May 18, 2010 at 12:32:13PM +0200, Jim Meyering wrote: I've just fixed code in a test that ignored virInitialize failure. Looking at all uses, I saw one other: in python/libvirt-override.c, where the initialization function ignores virInitialize failure:

Re: [libvirt] python module set-up ignores virInitialize failure

2010-05-18 Thread Daniel P. Berrange
On Tue, May 18, 2010 at 11:43:30AM +0100, Daniel P. Berrange wrote: On Tue, May 18, 2010 at 12:32:13PM +0200, Jim Meyering wrote: I've just fixed code in a test that ignored virInitialize failure. Looking at all uses, I saw one other: in python/libvirt-override.c, where the initialization

Re: [libvirt] python module set-up ignores virInitialize failure

2010-05-18 Thread Jim Meyering
Daniel P. Berrange wrote: On Tue, May 18, 2010 at 11:43:30AM +0100, Daniel P. Berrange wrote: On Tue, May 18, 2010 at 12:32:13PM +0200, Jim Meyering wrote: I've just fixed code in a test that ignored virInitialize failure. Looking at all uses, I saw one other: in python/libvirt-override.c,

[libvirt] [PATCH] qemudDomainRestore: handle a case of virDomainSaveStatus failure

2010-05-18 Thread Jim Meyering
For each of the other uses of virDomainSaveStatus, the caller handles failure. Here it was ignored. At first I was inclined to simply goto endjob;, like a few other uses in this file, but probing a bit, I found a few paths by which it could fail with no diagnostic whatsoever. And even if we've

[libvirt] [PATCH] ebtablesAddRemoveRule, iptablesAddRemoveRule: don't skip va_end

2010-05-18 Thread Jim Meyering
Coverity spotted two missing uses of va_end: From 4baa4228a74f640fe789914bd034e4c5b805cdfb Mon Sep 17 00:00:00 2001 From: Jim Meyering meyer...@redhat.com Date: Tue, 18 May 2010 14:42:33 +0200 Subject: [PATCH] ebtablesAddRemoveRule, iptablesAddRemoveRule: don't skip va_end * src/util/ebtables.c

[libvirt] managed save and autoboot

2010-05-18 Thread Daniel Berteaud
Hi everyone. I'm trying to auto-suspend my guests when the host shutdown using the managedsave function introduced in libvirt 0.8.0. If I manually managedsave all my guest, then manually start all of the guest with virsh start guest, everything works as expected, the saved state is restored.

[libvirt] handling qemuMonitorAddDevice failure: missing drive_del function?

2010-05-18 Thread Jim Meyering
In src/qemu/qemu_driver.c, coverity gripes (rightly) about this: 6912qemuDomainObjEnterMonitorWithDriver(driver, vm); 6913if (qemuCmdFlags QEMUD_CMD_FLAG_DEVICE) { 6914ret = qemuMonitorAddDrive(priv-mon, drivestr); 6915if (ret == 0) No check of the return value of

[libvirt] [PATCH v2] Init script for handling guests on shutdown/boot

2010-05-18 Thread Jiri Denemark
Example output during shutdown: Running guests on default URI: console, rhel6-1, rhel5-64 Running guests on lxc:/// URI: lxc-shell Running guests on xen:/// URI: error: no hypervisor driver available for xen:/// error: failed to connect to the hypervisor Running guests on vbox+tcp://orkuz/system

Re: [libvirt] managed save and autoboot

2010-05-18 Thread Jiri Denemark
Hi, I'm trying to auto-suspend my guests when the host shutdown using the managedsave function introduced in libvirt 0.8.0. FYI, I just posted a second version of libvirt-guests init script which seems to be doing exactly the same thing... So, it looks like there's a difference in the way

Re: [libvirt] managed save and autoboot

2010-05-18 Thread Daniel P. Berrange
On Tue, May 18, 2010 at 03:15:48PM +0200, Daniel Berteaud wrote: Hi everyone. I'm trying to auto-suspend my guests when the host shutdown using the managedsave function introduced in libvirt 0.8.0. If I manually managedsave all my guest, then manually start all of the guest with virsh

Re: [libvirt] handling qemuMonitorAddDevice failure: missing drive_del function?

2010-05-18 Thread Daniel P. Berrange
On Tue, May 18, 2010 at 03:23:23PM +0200, Jim Meyering wrote: In src/qemu/qemu_driver.c, coverity gripes (rightly) about this: 6912qemuDomainObjEnterMonitorWithDriver(driver, vm); 6913if (qemuCmdFlags QEMUD_CMD_FLAG_DEVICE) { 6914ret = qemuMonitorAddDrive(priv-mon,

Re: [libvirt] managed save and autoboot

2010-05-18 Thread Daniel Berteaud
Le mardi 18 mai 2010 à 15:36 +0200, Jiri Denemark a écrit : Hi, I'm trying to auto-suspend my guests when the host shutdown using the managedsave function introduced in libvirt 0.8.0. FYI, I just posted a second version of libvirt-guests init script which seems to be doing exactly the

Re: [libvirt] managed save and autoboot

2010-05-18 Thread Daniel Berteaud
Le mardi 18 mai 2010 à 14:40 +0100, Daniel P. Berrange a écrit : On Tue, May 18, 2010 at 03:15:48PM +0200, Daniel Berteaud wrote: So, it looks like there's a difference in the way libvirt starts guests between autoboot and a manual virsh start. Yep, there's a design bug in the way this

Re: [libvirt] handling qemuMonitorAddDevice failure: missing drive_del function?

2010-05-18 Thread Jim Meyering
Daniel P. Berrange wrote: On Tue, May 18, 2010 at 03:23:23PM +0200, Jim Meyering wrote: In src/qemu/qemu_driver.c, coverity gripes (rightly) about this: 6912qemuDomainObjEnterMonitorWithDriver(driver, vm); 6913if (qemuCmdFlags QEMUD_CMD_FLAG_DEVICE) { 6914ret =

Re: [libvirt] [PATCH] (qemuTeardownDiskCgroup): avoid dead code

2010-05-18 Thread Eric Blake
On 05/17/2010 11:40 PM, Jim Meyering wrote: Eric Blake wrote: On 05/17/2010 02:52 PM, Jim Meyering wrote: It's a good thing the latter while loop condition could never be true -- otherwise it'd be an infloop. char *path = disk-src; int ret = -1; -while (path != NULL) { +

Re: [libvirt] [PATCH] virDomainNetDefParseXML: avoid leak upon multiple filterref

2010-05-18 Thread Eric Blake
On 05/18/2010 02:22 AM, Jim Meyering wrote: * src/conf/domain_conf.c (virDomainNetDefParseXML): Don't leak memory when parsing two or more filterref elements. --- src/conf/domain_conf.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/conf/domain_conf.c

Re: [libvirt] [PATCH] initialize meta in virStorageFileGetMetadata, not in each caller

2010-05-18 Thread Eric Blake
On 05/18/2010 01:09 AM, Jim Meyering wrote: Here's proactive clean-up that is IMHO required. Otherwise, it's just too easy not to realize that meta must be cleared before each and every call to virStorageFileGetMetadata and virStorageFileGetMetadataFromFD. Besides, any change that adds just

[libvirt] [PATCH] Add support for SSE4.1 and SSE4.2 CPU features

2010-05-18 Thread Jiri Denemark
--- src/cpu/cpu_map.xml |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/src/cpu/cpu_map.xml b/src/cpu/cpu_map.xml index 30c28d7..084b879 100644 --- a/src/cpu/cpu_map.xml +++ b/src/cpu/cpu_map.xml @@ -126,6 +126,12 @@ feature name='dca' !-- CPUID_EXT_DCA --

Re: [libvirt] [PATCH] linuxNodeInfoCPUPopulate: avoid used-uninitialized via a test

2010-05-18 Thread Eric Blake
On 05/18/2010 04:14 AM, Jim Meyering wrote: * tests/nodeinfotest.c (linuxTestCompareFiles): Don't use nodeinfo-member uninitialized. linuxNodeInfoCPUPopulate requires that some of its nodeinfo members (including threads) be initialized upon input. The nodeinfotest.c program lacked the

Re: [libvirt] managed save and autoboot

2010-05-18 Thread Daniel Berteaud
Le mardi 18 mai 2010 à 14:40 +0100, Daniel P. Berrange a écrit : On Tue, May 18, 2010 at 03:15:48PM +0200, Daniel Berteaud wrote: So, it looks like there's a difference in the way libvirt starts guests between autoboot and a manual virsh start. Yep, there's a design bug in the way this is

Re: [libvirt] VIR_WARN and VIR_WARN0: many diags were not marked for translation

2010-05-18 Thread Daniel P. Berrange
On Tue, May 18, 2010 at 04:47:50PM +0200, Jim Meyering wrote: I noticed some VIR_WARN* uses with unmarked (for translation) strings. It turns out there are more than 50: $ g grep -E 'VIR_WARN0?\(.*[,)]'|wc -l 128 Here's a sample: src/phyp/phyp_driver.c:

[libvirt] [PATCH] qemuMonitorTextMigrate: avoid leak on OOM-error path

2010-05-18 Thread Jim Meyering
Oops. Nearly forgot to post this one: From f1b58f1f7bd287b4a2157f62ebb63100b45a8b62 Mon Sep 17 00:00:00 2001 From: Jim Meyering meyer...@redhat.com Date: Tue, 18 May 2010 12:17:23 +0200 Subject: [PATCH] qemuMonitorTextMigrate: avoid leak on OOM-error path * src/qemu/qemu_monitor_text.c

Re: [libvirt] [PATCH] qemuMonitorTextMigrate: avoid leak on OOM-error path

2010-05-18 Thread Eric Blake
On 05/18/2010 04:18 AM, Jim Meyering wrote: Fix a minor leak: From 0fc88bfcae06346e871d2a4a89febb160bc0857e Mon Sep 17 00:00:00 2001 From: Jim Meyering meyer...@redhat.com Date: Tue, 18 May 2010 12:17:23 +0200 Subject: [PATCH] qemuMonitorTextMigrate: avoid leak on OOM-error path *

Re: [libvirt] [PATCH] tests: do not ignore virInitialize failure

2010-05-18 Thread Eric Blake
On 05/18/2010 04:33 AM, Jim Meyering wrote: Simple... From f5ee09ed08473478b3ea3135d51125fbf687e402 Mon Sep 17 00:00:00 2001 From: Jim Meyering meyer...@redhat.com Date: Tue, 18 May 2010 12:32:39 +0200 Subject: [PATCH] tests: do not ignore virInitialize failure * tests/nodeinfotest.c

Re: [libvirt] python module set-up ignores virInitialize failure

2010-05-18 Thread Daniel P. Berrange
On Tue, May 18, 2010 at 01:56:23PM +0200, Jim Meyering wrote: Daniel P. Berrange wrote: On Tue, May 18, 2010 at 11:43:30AM +0100, Daniel P. Berrange wrote: On Tue, May 18, 2010 at 12:32:13PM +0200, Jim Meyering wrote: I've just fixed code in a test that ignored virInitialize failure.

Re: [libvirt] handling qemuMonitorAddDevice failure: missing drive_del function?

2010-05-18 Thread Daniel P. Berrange
On Tue, May 18, 2010 at 04:02:44PM +0200, Jim Meyering wrote: Daniel P. Berrange wrote: On Tue, May 18, 2010 at 03:23:23PM +0200, Jim Meyering wrote: In src/qemu/qemu_driver.c, coverity gripes (rightly) about this: 6912qemuDomainObjEnterMonitorWithDriver(driver, vm); 6913if

Re: [libvirt] [PATCH] qemuMonitorTextMigrate: avoid leak on OOM-error path

2010-05-18 Thread Daniel P. Berrange
On Tue, May 18, 2010 at 05:01:16PM +0200, Jim Meyering wrote: Oops. Nearly forgot to post this one: From f1b58f1f7bd287b4a2157f62ebb63100b45a8b62 Mon Sep 17 00:00:00 2001 From: Jim Meyering meyer...@redhat.com Date: Tue, 18 May 2010 12:17:23 +0200 Subject: [PATCH] qemuMonitorTextMigrate:

Re: [libvirt] [PATCH] Init script for suspending/resuming guests on shutdown/boot

2010-05-18 Thread Eric Blake
On 05/18/2010 04:54 AM, Jiri Denemark wrote: +test -f $sysconfdir/sysconfig/libvirt-guests . $sysconfdir/sysconfig/libvirt-guests Likewise. Also, should we fail if sourcing the config file failed? Hmm, not sure what's the policy for this. libvirtd.init.in does exactly this. Well, sounds

Re: [libvirt] VIR_WARN and VIR_WARN0: many diags were not marked for translation

2010-05-18 Thread Jim Meyering
Daniel P. Berrange wrote: On Tue, May 18, 2010 at 04:47:50PM +0200, Jim Meyering wrote: I noticed some VIR_WARN* uses with unmarked (for translation) strings. It turns out there are more than 50: $ g grep -E 'VIR_WARN0?\(.*[,)]'|wc -l 128 Here's a sample:

Re: [libvirt] python module set-up ignores virInitialize failure

2010-05-18 Thread Eric Blake
On 05/18/2010 05:56 AM, Jim Meyering wrote: Actually I've got another idea. Make the Py_InitModule() call conditional on virInitialize() suceeding. That way if virInitialize() fails, none of the libvirt APIs will get bound to the python layer, preventing their use Either works for me:

Re: [libvirt] [PATCH] qemudDomainRestore: handle a case of virDomainSaveStatus failure

2010-05-18 Thread Eric Blake
On 05/18/2010 06:17 AM, Jim Meyering wrote: For each of the other uses of virDomainSaveStatus, the caller handles failure. Here it was ignored. At first I was inclined to simply goto endjob;, like a few other uses in this file, but probing a bit, I found a few paths by which it could fail

Re: [libvirt] [PATCH] ebtablesAddRemoveRule, iptablesAddRemoveRule: don't skip va_end

2010-05-18 Thread Eric Blake
On 05/18/2010 06:44 AM, Jim Meyering wrote: Coverity spotted two missing uses of va_end: From 4baa4228a74f640fe789914bd034e4c5b805cdfb Mon Sep 17 00:00:00 2001 From: Jim Meyering meyer...@redhat.com Date: Tue, 18 May 2010 14:42:33 +0200 Subject: [PATCH] ebtablesAddRemoveRule,

Re: [libvirt] [PATCH] tests: do not ignore virInitialize failure

2010-05-18 Thread Jim Meyering
Eric Blake wrote: On 05/18/2010 04:33 AM, Jim Meyering wrote: Simple... From f5ee09ed08473478b3ea3135d51125fbf687e402 Mon Sep 17 00:00:00 2001 From: Jim Meyering meyer...@redhat.com Date: Tue, 18 May 2010 12:32:39 +0200 Subject: [PATCH] tests: do not ignore virInitialize failure *

Re: [libvirt] [PATCH 1/4] qemu: Properly cleanup in security startup error path

2010-05-18 Thread Eric Blake
On 05/17/2010 11:17 AM, Cole Robinson wrote: Everything after hostdev setup needs to jump to cleanup on error. Signed-off-by: Cole Robinson crobi...@redhat.com --- src/qemu/qemu_driver.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/qemu/qemu_driver.c

Re: [libvirt] [PATCH 2/4] qemu: Remove explicit VNC XML cleanup

2010-05-18 Thread Eric Blake
On 05/17/2010 11:17 AM, Cole Robinson wrote: This only exists for a certain cleanup path in StartVMDaemon, but is unneeded since domain_conf.c handles this for us automatically. Signed-off-by: Cole Robinson crobi...@redhat.com --- src/qemu/qemu_driver.c |4 1 files changed, 0

Re: [libvirt] [PATCH] tests: do not ignore virInitialize failure

2010-05-18 Thread Daniel P. Berrange
On Tue, May 18, 2010 at 05:25:20PM +0200, Jim Meyering wrote: Eric Blake wrote: On 05/18/2010 04:33 AM, Jim Meyering wrote: Simple... From f5ee09ed08473478b3ea3135d51125fbf687e402 Mon Sep 17 00:00:00 2001 From: Jim Meyering meyer...@redhat.com Date: Tue, 18 May 2010 12:32:39 +0200

Re: [libvirt] [PATCH] tests: do not ignore virInitialize failure

2010-05-18 Thread Eric Blake
On 05/18/2010 09:35 AM, Daniel P. Berrange wrote: Shouldn't we be adding ATTRIBUTE_RETURN_CHECK to virInitialize in the appropriate header, to let the compiler enforce us to do the checking? That would be nice, but the declaration of virInitialize is in libvirt.h.in, and I am leery of adding

Re: [libvirt] [PATCH] Add support for SSE4.1 and SSE4.2 CPU features

2010-05-18 Thread Eric Blake
On 05/18/2010 08:26 AM, Jiri Denemark wrote: --- src/cpu/cpu_map.xml |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/src/cpu/cpu_map.xml b/src/cpu/cpu_map.xml index 30c28d7..084b879 100644 --- a/src/cpu/cpu_map.xml +++ b/src/cpu/cpu_map.xml @@ -126,6 +126,12

Re: [libvirt] [PATCH] tests: do not ignore virInitialize failure

2010-05-18 Thread Jim Meyering
Eric Blake wrote: On 05/18/2010 09:35 AM, Daniel P. Berrange wrote: Shouldn't we be adding ATTRIBUTE_RETURN_CHECK to virInitialize in the appropriate header, to let the compiler enforce us to do the checking? That would be nice, but the declaration of virInitialize is in libvirt.h.in, and I

Re: [libvirt] [PATCH 3/4] qemu: Don't deny ShutdownVMDaemon for non-running VMs

2010-05-18 Thread Eric Blake
On 05/17/2010 11:17 AM, Cole Robinson wrote: Clients that require this already seem to do so. Calling this function with pid 1 also should not cause problems. Signed-off-by: Cole Robinson crobi...@redhat.com --- src/qemu/qemu_driver.c |7 +++ 1 files changed, 3 insertions(+), 4

[libvirt] [PATCH] correct typo: s/VIR_MIGRATE_TUNNELLED/VIR_MIGRATE_TUNNELED/, ...

2010-05-18 Thread Jim Meyering
I noticed a typo in a public interface. IMHO it's well worth fixing, so propose this: (imagine someone searching for all occurrences of tunneled with the proper spelling. They would miss this symbol.) From b9a1ea6c9e3d4e5150c39868b430f184c10b2660 Mon Sep 17 00:00:00 2001 From: Jim Meyering

Re: [libvirt] [PATCH 4/4] qemu: Use ShutdownVMDaemon for all startup cleanup paths

2010-05-18 Thread Eric Blake
On 05/17/2010 11:17 AM, Cole Robinson wrote: The current cleanup: in StartVMDaemon path is a poor duplication. qemuShutdownVMDaemon can handle teardown for inactive VMs, so let's use it. Signed-off-by: Cole Robinson crobi...@redhat.com --- src/qemu/qemu_driver.c | 18 +-

[libvirt] [PATCH] esx: Make esxVI_*_CastFromAnyType dynamically dispatched

2010-05-18 Thread Matthias Bolte
This will be used in the ESX storage driver in order to handle the DatastoreInfo type and inheriting types properly. --- src/esx/esx_vi_generator.py | 13 - src/esx/esx_vi_types.c | 28 +--- 2 files changed, 33 insertions(+), 8 deletions(-) diff --git

[libvirt] [PATCH v2] esx: Add read-only storage pool access

2010-05-18 Thread Matthias Bolte
Allows listing existing pools and requesting information about them. Alter the esxVI_ProductVersion enum in a way that allows to check for product type by masking. Changes in v2: - split not directly related parts into separate patches - simplify goto usage: don't jump backwards - rework

Re: [libvirt] [PATCH] virDomainNetDefParseXML: avoid leak upon multiple filterref

2010-05-18 Thread Stefan Berger
On Tue, 2010-05-18 at 08:22 -0600, Eric Blake wrote: On 05/18/2010 02:22 AM, Jim Meyering wrote: * src/conf/domain_conf.c (virDomainNetDefParseXML): Don't leak memory when parsing two or more filterref elements. --- src/conf/domain_conf.c |1 + 1 files changed, 1 insertions(+), 0

Re: [libvirt] [PATCH 3/4] qemu: Don't deny ShutdownVMDaemon for non-running VMs

2010-05-18 Thread Cole Robinson
On 05/18/2010 12:27 PM, Eric Blake wrote: On 05/17/2010 11:17 AM, Cole Robinson wrote: Clients that require this already seem to do so. Calling this function with pid 1 also should not cause problems. Signed-off-by: Cole Robinson crobi...@redhat.com --- src/qemu/qemu_driver.c |7

Re: [libvirt] VIR_WARN and VIR_WARN0: many diags were not marked for translation

2010-05-18 Thread Daniel P. Berrange
On Tue, May 18, 2010 at 05:06:52PM +0200, Jim Meyering wrote: Daniel P. Berrange wrote: On Tue, May 18, 2010 at 04:47:50PM +0200, Jim Meyering wrote: I noticed some VIR_WARN* uses with unmarked (for translation) strings. It turns out there are more than 50: $ g grep -E

[libvirt] [PATCH] esx: Allow esxVI_X_DynamicCast to be called successfully on X objects

2010-05-18 Thread Matthias Bolte
This semantic will be used in the ESX storage driver. --- src/esx/esx_vi_types.c | 16 +--- 1 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/esx/esx_vi_types.c b/src/esx/esx_vi_types.c index 7d2c02c..de2839f 100644 --- a/src/esx/esx_vi_types.c +++

Re: [libvirt] VIR_WARN and VIR_WARN0: many diags were not marked for translation

2010-05-18 Thread Jiri Denemark
Nonetheless, many of my manual changes highlighted existing (bogus) attempts to translate VIR_WARN0? diagnostics. Those should be addressed regardless. Considering the large number of existing VIR_WARN uses with strings marked for translation, do you want to reconsider? $ g

Re: [libvirt] [PATCH] correct typo: s/VIR_MIGRATE_TUNNELLED/VIR_MIGRATE_TUNNELED/, ...

2010-05-18 Thread Daniel P. Berrange
On Tue, May 18, 2010 at 06:30:34PM +0200, Jim Meyering wrote: I noticed a typo in a public interface. IMHO it's well worth fixing, so propose this: (imagine someone searching for all occurrences of tunneled with the proper spelling. They would miss this symbol.) I don't think we should make

Re: [libvirt] [PATCH] correct typo: s/VIR_MIGRATE_TUNNELLED/VIR_MIGRATE_TUNNELED/, ...

2010-05-18 Thread Jim Meyering
Daniel P. Berrange wrote: On Tue, May 18, 2010 at 06:30:34PM +0200, Jim Meyering wrote: I noticed a typo in a public interface. IMHO it's well worth fixing, so propose this: (imagine someone searching for all occurrences of tunneled with the proper spelling. They would miss this symbol.) I

Re: [libvirt] [PATCH] virDomainNetDefParseXML: avoid leak upon multiple filterref

2010-05-18 Thread Jim Meyering
Stefan Berger wrote: On Tue, 2010-05-18 at 08:22 -0600, Eric Blake wrote: On 05/18/2010 02:22 AM, Jim Meyering wrote: * src/conf/domain_conf.c (virDomainNetDefParseXML): Don't leak memory when parsing two or more filterref elements. --- src/conf/domain_conf.c |1 + 1 files

[libvirt] FYI, I've pushed a bunch of ACK'd patches

2010-05-18 Thread Jim Meyering
I've pushed these: ebiptablesWriteToTempFile: don't close a negative file descriptor virDomainNetDefParseXML: avoid leak upon multiple filterref linuxNodeInfoCPUPopulate: avoid used-uninitialized via a test virNWFilterDefParseXML: avoid leak on error paths

[libvirt] Problems with pdwtags on Ubuntu 10.04

2010-05-18 Thread Matthias Bolte
The help avoid accidental remote_protocol.x changes commit 180d4b2b added a make check rule that tried using pdwtags from the dwarves package to protect against accidental remote_protocol.x changes. I installed dwarves package on Ubuntu 10.04 and make check fails for me now. The temporary file

Re: [libvirt] [PATCH v2] Init script for handling guests on shutdown/boot

2010-05-18 Thread Eric Blake
On 05/18/2010 07:27 AM, Jiri Denemark wrote: Version 2 changes: - fixes suggested by Eric - configurable ON_BOOT and ON_SHUTDOWN behavior inspired by Gerd +++ b/daemon/libvirt-guests.init.in @@ -0,0 +1,295 @@ + +sysconfd...@sysconfdir@ +localstated...@localstatedir@ Just in case

Re: [libvirt] [PATCH v2] Init script for handling guests on shutdown/boot

2010-05-18 Thread Jiri Denemark
+while read uri list; do +if $suspending; then +echo $Suspending guests on $uri URI... +else +echo $Shutting down guests on $uri URI... +fi + +for guest in $list; do +if $suspending; then +

Re: [libvirt] [PATCH] Add support for SSE4.1 and SSE4.2 CPU features

2010-05-18 Thread Jiri Denemark
feature name='dca' !-- CPUID_EXT_DCA -- cpuid function='0x0001' ecx='0x0004'/ /feature +feature name='sse4.1' !-- CPUID_EXT_SSE41 -- + cpuid function='0x0001' ecx='0x0008'/ +/feature +feature name='sse4.2' !-- CPUID_EXT_SSE42 -- +

Re: [libvirt] [PATCH v2] Fix potential NULL dereference in remoteDomainMigratePrepare2

2010-05-18 Thread Jiri Denemark
--- a/src/remote/remote_driver.c +++ b/src/remote/remote_driver.c @@ -2849,17 +2849,34 @@ remoteDomainMigratePrepare2 (virConnectPtr dconn, goto done; if (ret.cookie.cookie_len 0) { +if (!cookie || !cookielen) { +

Re: [libvirt] [PATCH] correct typo: s/VIR_MIGRATE_TUNNELLED/VIR_MIGRATE_TUNNELED/, ...

2010-05-18 Thread Chris Lalancette
On 05/18/2010 01:15 PM, Jim Meyering wrote: Daniel P. Berrange wrote: On Tue, May 18, 2010 at 06:30:34PM +0200, Jim Meyering wrote: I noticed a typo in a public interface. IMHO it's well worth fixing, so propose this: (imagine someone searching for all occurrences of tunneled with the proper

[libvirt] reviewing of patches

2010-05-18 Thread Stephen Shaw
I was wondering after watching this mailing list fro the last few weeks if you guys have maybe thought about using something like reviewboard. We have been using it for our team for the past several months and have really liked it. I imagine it would cut down on the volume of traffic and make

Re: [libvirt] [PATCH] Query block allocation extent from QEMU monitor

2010-05-18 Thread Eric Blake
On 05/16/2010 03:03 AM, Daniel P. Berrange wrote: that means you now propagate that fatal error out of the call, rather than falling back on the default. Yes, that is the intended behaviour here. If it is a block device + not using the raw format, then we want the caller to be able to see

Re: [libvirt] [PATCH] esx: Allow esxVI_X_DynamicCast to be called successfully on X objects

2010-05-18 Thread Eric Blake
On 05/18/2010 10:30 AM, Matthias Bolte wrote: This semantic will be used in the ESX storage driver. --- src/esx/esx_vi_types.c | 16 +--- 1 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/esx/esx_vi_types.c b/src/esx/esx_vi_types.c index 7d2c02c..de2839f

Re: [libvirt] [PATCH] esx: Make esxVI_*_CastFromAnyType dynamically dispatched

2010-05-18 Thread Eric Blake
On 05/18/2010 10:31 AM, Matthias Bolte wrote: This will be used in the ESX storage driver in order to handle the DatastoreInfo type and inheriting types properly. --- src/esx/esx_vi_generator.py | 13 - src/esx/esx_vi_types.c | 28 +--- 2 files

Re: [libvirt] Problems with pdwtags on Ubuntu 10.04

2010-05-18 Thread Eric Blake
On 05/18/2010 11:57 AM, Matthias Bolte wrote: The help avoid accidental remote_protocol.x changes commit 180d4b2b added a make check rule that tried using pdwtags from the dwarves package to protect against accidental remote_protocol.x changes. I installed dwarves package on Ubuntu 10.04 and

Re: [libvirt] [PATCH] phyp: first part of storage management driver

2010-05-18 Thread Eduardo Otubo
On 05/14/2010 05:27 PM, Stefan Berger wrote: libvir-list-boun...@redhat.com wrote on 05/13/2010 10:53:53 AM: Hello all, This is the first patch about storage management driver on IBM Power Hypervisor. I reviewd a couple of times but perhaps I might be missing something. Any

Re: [libvirt] Problems with pdwtags on Ubuntu 10.04

2010-05-18 Thread Matthias Bolte
2010/5/18 Eric Blake ebl...@redhat.com: On 05/18/2010 11:57 AM, Matthias Bolte wrote: The help avoid accidental remote_protocol.x changes commit 180d4b2b added a make check rule that tried using pdwtags from the dwarves package to protect against accidental remote_protocol.x changes. I

[libvirt] How to enable vhost for virtIO NIC?

2010-05-18 Thread Huang, Zhiteng
Hi gurus on the list, I'm trying to bring up a Linux with virtio vhost backend. My system is running on kernel 2.6.34-rc7, libvirt 0.8.0. Two questions regarding to vhost: 1) XML format for vhost I didn't find any documents on libvirt.org description the XML or QMU argument format for vhost.