[libvirt] [PATCH] LXC: remove some incorrect setting ATTRIBUTE_UNUSED

2013-07-11 Thread Gao feng
these parameters shouldn't be marked as ATTRIBUTE_UNUSED. Signed-off-by: Gao feng gaof...@cn.fujitsu.com --- src/lxc/lxc_container.c | 28 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c index

Re: [libvirt] [PATCH v4 2/9] qemu: Implement chardev hotplug on config level

2013-07-11 Thread Michal Privoznik
On 10.07.2013 20:42, Chris Evich wrote: On 07/10/2013 01:02 PM, Michal Privoznik wrote: There are two levels on which a device may be hotplugged: config and live. The config level requires just an insert or remove from internal domain definition structure, which is exactly what this patch

Re: [libvirt] LXC: autostart feature does set all interfaces to state up.

2013-07-11 Thread Richard Weinberger
Am 10.07.2013 11:42, schrieb Gao feng: On 07/10/2013 03:23 PM, Richard Weinberger wrote: Am 10.07.2013 09:03, schrieb Gao feng: On 07/10/2013 02:00 PM, Richard Weinberger wrote: Yes,actually libvirt did up the veth devices, that's why only veth2 veth5 are down. Where does libvirt up the

Re: [libvirt] [PATCH RFC]:tolerate numa_node_size64 0 because nodeid might start from 1 instead of 0

2013-07-11 Thread hejianet
Hi, no one cares about it? On 7/8/2013 10:03 PM, hejia hejia wrote: In nodeGetFreeMemory/nodeGetCellsFreeMemory, they will calculate the free memory of every nodes. They assumed that nodeid of NUMA machine must be continuous and start from 0. But here is a counter-example: # numactl -H

Re: [libvirt] [PATCH RFC]:tolerate numa_node_size64 0 because nodeid might start from 1 instead of 0

2013-07-11 Thread Peter Krempa
On 07/11/13 09:54, hejianet wrote: Hi, no one cares about it? Hi, I have this on my to-do list, but I'll need to test it and didn't manage to find time for this. I'll try to do it this week. Peter -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] [PATCH] qemu: Slightly increase memory limit

2013-07-11 Thread Jiri Denemark
On Tue, Jul 09, 2013 at 14:56:05 -0400, Laine Stump wrote: On 07/08/2013 09:20 AM, Jiri Denemark wrote: For low-memory domains (roughly under 400MB) our automatic memory limit computation comes up with a limit that's too low. This is because the 0.5 multiplication does not add enough for

Re: [libvirt] LXC: autostart feature does set all interfaces to state up.

2013-07-11 Thread Gao feng
On 07/11/2013 03:18 PM, Richard Weinberger wrote: Am 10.07.2013 11:42, schrieb Gao feng: On 07/10/2013 03:23 PM, Richard Weinberger wrote: Am 10.07.2013 09:03, schrieb Gao feng: On 07/10/2013 02:00 PM, Richard Weinberger wrote: Yes,actually libvirt did up the veth devices, that's why only

Re: [libvirt] LXC: autostart feature does set all interfaces to state up.

2013-07-11 Thread Daniel P. Berrange
On Thu, Jul 11, 2013 at 09:18:24AM +0200, Richard Weinberger wrote: This morning I've installed a wrapper around ip to show me the process tree upon ip link ... down is used. The log showed this: 769 ?Ss 0:00 /usr/lib/systemd/systemd-udevd 17759 ?S 0:00 \_

Re: [libvirt] LXC: autostart feature does set all interfaces to state up.

2013-07-11 Thread Richard Weinberger
Am 11.07.2013 11:42, schrieb Gao feng: On 07/11/2013 03:18 PM, Richard Weinberger wrote: Am 10.07.2013 11:42, schrieb Gao feng: On 07/10/2013 03:23 PM, Richard Weinberger wrote: Am 10.07.2013 09:03, schrieb Gao feng: On 07/10/2013 02:00 PM, Richard Weinberger wrote: Yes,actually libvirt

Re: [libvirt] [PATCH] Reject duplicate disk targets

2013-07-11 Thread Daniel P. Berrange
On Wed, Jul 10, 2013 at 07:22:11PM +0200, Martin Kletzander wrote: On 07/10/2013 04:03 PM, Daniel P. Berrange wrote: On Wed, Jul 10, 2013 at 03:51:45PM +0200, Martin Kletzander wrote: On 07/10/2013 02:39 PM, Daniel P. Berrange wrote: On Wed, Jul 10, 2013 at 02:34:30PM +0200, Martin

Re: [libvirt] LXC: autostart feature does set all interfaces to state up.

2013-07-11 Thread Daniel P. Berrange
On Thu, Jul 11, 2013 at 11:44:48AM +0200, Richard Weinberger wrote: Am 11.07.2013 11:42, schrieb Gao feng: On 07/11/2013 03:18 PM, Richard Weinberger wrote: This morning I've installed a wrapper around ip to show me the process tree upon ip link ... down is used. The log showed this:

Re: [libvirt] [PATCH RFC]:tolerate numa_node_size64 0 because nodeid might start from 1 instead of 0

2013-07-11 Thread hejianet
Thanks, In my opinion, the best solution is let numa_node_size64 return the details of error, not merely -1. But this is out of libvirt's scope:( On 7/11/2013 4:06 PM, Peter Krempa wrote: On 07/11/13 09:54, hejianet wrote: Hi, no one cares about it? Hi, I have this on my to-do list, but I'll

[libvirt] [PATCH] storage: return -1 when fs pool can't be mounted

2013-07-11 Thread Ján Tomko
Don't reuse the return value of virStorageBackendFileSystemIsMounted. If it's 0, we'd return it even if the mount command failed. Also, don't report another error if it's -1, since one has already been reported. Introduced by 258e06c. https://bugzilla.redhat.com/show_bug.cgi?id=981251 ---

[libvirt] [PATCH 2/3] conf: Rework virDomainDeviceDefParse

2013-07-11 Thread Michal Privoznik
When adding a new domain device, it is fairly easy to forget to add corresponding piece into virDomainDeviceDefParse. However, if the internal structure is changed to one bit switch() the compiler will warn about not handled enum item. --- src/conf/domain_conf.c | 96

[libvirt] [PATCH 1/3] conf: Extend virDomainDeviceDefParse handled types

2013-07-11 Thread Michal Privoznik
Not all device types are parsed in virDomainDeviceDefParse, currently. Since all functions needed do exist, nothing hold us back to make the implementation complete. Similarly, the virDomainDeviceDefFree needs to be updated as well. --- src/conf/domain_conf.c | 37

[libvirt] [PATCH 0/3] Fix hotplug error messages

2013-07-11 Thread Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=982304 The problem is virDomainDeviceDefParse's incompleteness. When doing a hot(un-)plug or update, the passed XML snippet is parsed. However, if virDomainDeviceDefParse doesn't recognize the device (due its implementation incompleteness) an error is

[libvirt] [PATCH 3/3] qemu: Fix hot (un-)plug error codes and messages

2013-07-11 Thread Michal Privoznik
With current code, error reporting for unsupported devices for hot plug, unplug and update is total mess. The VIR_ERR_CONFIG_UNSUPPORTED error code is reported instead of VIR_ERR_OPERATION_UNSUPPORTED. Moreover, the error messages are not helping to find the root cause (lack of implementation).

Re: [libvirt] [PATCH] storage: return -1 when fs pool can't be mounted

2013-07-11 Thread Michal Privoznik
On 11.07.2013 12:43, Ján Tomko wrote: Don't reuse the return value of virStorageBackendFileSystemIsMounted. If it's 0, we'd return it even if the mount command failed. Also, don't report another error if it's -1, since one has already been reported. Introduced by 258e06c.

Re: [libvirt] [PATCH] storage: return -1 when fs pool can't be mounted

2013-07-11 Thread Ján Tomko
On 07/11/2013 01:30 PM, Michal Privoznik wrote: On 11.07.2013 12:43, Ján Tomko wrote: Don't reuse the return value of virStorageBackendFileSystemIsMounted. If it's 0, we'd return it even if the mount command failed. Also, don't report another error if it's -1, since one has already been

Re: [libvirt] [PATCH] LXC: remove some incorrect setting ATTRIBUTE_UNUSED

2013-07-11 Thread Michal Privoznik
On 11.07.2013 08:05, Gao feng wrote: these parameters shouldn't be marked as ATTRIBUTE_UNUSED. Signed-off-by: Gao feng gaof...@cn.fujitsu.com --- src/lxc/lxc_container.c | 28 1 file changed, 16 insertions(+), 12 deletions(-) ACKed pushed. Michal --

Re: [libvirt] [PATCH 3/3] qemu: Fix hot (un-)plug error codes and messages

2013-07-11 Thread Peter Krempa
On 07/11/13 13:29, Michal Privoznik wrote: With current code, error reporting for unsupported devices for hot plug, unplug and update is total mess. The VIR_ERR_CONFIG_UNSUPPORTED error code is reported instead of VIR_ERR_OPERATION_UNSUPPORTED. Moreover, the error messages are not helping to

Re: [libvirt] [PATCH] Reject duplicate disk targets

2013-07-11 Thread Martin Kletzander
On 07/11/2013 11:47 AM, Daniel P. Berrange wrote: [...] Huh, that doesn't make any sense. The 'alias' data is not user specified. If they attempt to set it in the XML, it'll be dropped by the parser. The alias names are assigned by the QEMU driver unconditionally and unless that code is broken

Re: [libvirt] LXC: autostart feature does set all interfaces to state up.

2013-07-11 Thread Richard Weinberger
Am 11.07.2013 11:49, schrieb Daniel P. Berrange: On Thu, Jul 11, 2013 at 11:44:48AM +0200, Richard Weinberger wrote: Am 11.07.2013 11:42, schrieb Gao feng: On 07/11/2013 03:18 PM, Richard Weinberger wrote: This morning I've installed a wrapper around ip to show me the process tree upon ip

Re: [libvirt] [PATCH 1/3] conf: Extend virDomainDeviceDefParse handled types

2013-07-11 Thread Peter Krempa
I'd reword the subject line as: conf: Extend device types handled by virDomainDeviceDefParse On 07/11/13 13:29, Michal Privoznik wrote: Not all device types are parsed in virDomainDeviceDefParse, currently. s/are/are currently/ s/, currently// Since all functions needed do exist, nothing

Re: [libvirt] [PATCH 2/3] conf: Rework virDomainDeviceDefParse

2013-07-11 Thread Peter Krempa
On 07/11/13 13:29, Michal Privoznik wrote: When adding a new domain device, it is fairly easy to forget to add corresponding piece into virDomainDeviceDefParse. However, if the internal structure is changed to one bit switch() the compiler will warn about not handled enum item. ---

[libvirt] [PATCH 0/7] Resolve Coverity issues

2013-07-11 Thread John Ferlan
The recent changes to change 'int i' to 'size_t i' seem to have uncovered a few new Coverity issues - resolve those. Also add a [dead_error_code] tag to a Coverity issue that's been there for a bit. After these patches the result is just back to 1 Coverity error in 'virLXCProcessReboot'

[libvirt] [PATCH 6/7] storage_backend: Resolve Coverity issue

2013-07-11 Thread John Ferlan
The switch statement in 'virStorageBackendCreateQemuImgOpts' used the for loop end condition 'VIR_STORAGE_FILE_FEATURE_LAST' as a possible value, but since that cannot happen Coverity spits out a DEADCODE message. Adding the Coverity tag just removes the Coverity message ---

[libvirt] [PATCH 2/7] testutils: Resolve Coverity issues

2013-07-11 Thread John Ferlan
Recent changes uncovered a NEGATIVE_RETURNS in the return from sysconf() when processing a for loop in virtTestCaptureProgramExecChild() --- tests/testutils.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/testutils.c b/tests/testutils.c index ec0fe52..2fdf7b8 100644 ---

[libvirt] [PATCH 7/7] qemu_hostdev: Resolve Coverity issue

2013-07-11 Thread John Ferlan
Recent changes uncovered a possibility that 'last_processed_hostdev_vf' was set to -1 in 'qemuPrepareHostdevPCIDevices' and would cause problems in for loop end condition in the 'resetvfnetconfig' label if the variable was never set to 'i' due to 'qemuDomainHostdevNetConfigReplace' failure. ---

[libvirt] [PATCH 3/7] virsh-domain-monitor: Resolve Coverity issues

2013-07-11 Thread John Ferlan
Recent changes uncovered a pair of NEGATIVE_RETURNS when processing the 'nnames' in 'vshDomainListCollect' in the for loop due to possible -1 value. --- tools/virsh-domain-monitor.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/virsh-domain-monitor.c

[libvirt] [PATCH 1/7] hellolibvirt: Resolve Coverity issues

2013-07-11 Thread John Ferlan
Recent changes uncovered a NEGATIVE_RETURNS when processing 'numNames' in 'showDomains' in the for loop after a possible -1 return. --- examples/hellolibvirt/hellolibvirt.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/examples/hellolibvirt/hellolibvirt.c

[libvirt] [PATCH 4/7] virsh-interface: Resolve Coverity issues

2013-07-11 Thread John Ferlan
Recent changes uncovered FORWARD_NULL and NEGATIVE_RETURNS problems with the processing of the 'nActiveIfaces' and 'nInactiveIfaces' and their associated allocated arrays in 'vshInterfaceListCollect' due to the possibility of returning -1 in a call and using the return value as a for loop index

[libvirt] [PATCH 5/7] virsh-nodedev: Resolve Coverity issues

2013-07-11 Thread John Ferlan
Recent changes uncovered FORWARD_NULL and NEGATIVE_RETURNS problems with the processing of the 'ndevices' and its associated allocated arrays in 'vshNodeDeviceListCollect' due to the possibility of returning -1 in a call and using the returned value as a for loop index end condition. ---

Re: [libvirt] [PATCH 6/7] storage_backend: Resolve Coverity issue

2013-07-11 Thread Ján Tomko
On 07/11/2013 02:34 PM, John Ferlan wrote: The switch statement in 'virStorageBackendCreateQemuImgOpts' used the for loop end condition 'VIR_STORAGE_FILE_FEATURE_LAST' as a possible value, but since that cannot happen Coverity spits out a DEADCODE message. Adding the Coverity tag just removes

Re: [libvirt] [PATCH] domain controller index check

2013-07-11 Thread Jincheng Miao
@Jan could you please review this patch? - Original Message - From: Jincheng Miao jm...@redhat.com To: libvir-list@redhat.com Cc: Jincheng Miao jm...@redhat.com Sent: Tuesday, July 9, 2013 12:13:44 PM Subject: [libvirt][PATCH] domain controller index check The index of the controller

Re: [libvirt] [PATCH 2/2] LXC: hostdev: parent directroy for hostdev atomically

2013-07-11 Thread Thomas Karcher
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Guys, thank you for your help and your effort! (Didn't try the solution yet, but I will.) Thomas -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlHepkcACgkQiMyIQtYO79zSLwCfdVfFwU5Tz5FYxmoYaKXTHOHT

Re: [libvirt] [PATCH] util: add rebase fix that was accidentally omitted from previous patch

2013-07-11 Thread Eric Blake
On 07/10/2013 09:11 PM, Laine Stump wrote: I had made the change locally, so make check and make syntax-check were successful, but forgot to add/commit. Unfortunately, git allows a push when the local directory is dirty, so it didn't catch my mistake. I also got bit by a similar situation

Re: [libvirt] [PATCH] util: add rebase fix that was accidentally omitted from previous patch

2013-07-11 Thread Eric Blake
On 07/11/2013 07:12 AM, Eric Blake wrote: Yes, it can be reasonable to push a patch while the tree is still dirty for unrelated reasons. But I agree that it seems like an advanced option, and that most users would much rather be informed any time 'send-email' or 'push' is attempted while

Re: [libvirt] [PATCH 1/7] hellolibvirt: Resolve Coverity issues

2013-07-11 Thread Daniel P. Berrange
On Thu, Jul 11, 2013 at 08:34:01AM -0400, John Ferlan wrote: Recent changes uncovered a NEGATIVE_RETURNS when processing 'numNames' in 'showDomains' in the for loop after a possible -1 return. --- examples/hellolibvirt/hellolibvirt.c | 7 +++ 1 file changed, 7 insertions(+) diff --git

Re: [libvirt] [PATCH 2/7] testutils: Resolve Coverity issues

2013-07-11 Thread Daniel P. Berrange
On Thu, Jul 11, 2013 at 08:34:02AM -0400, John Ferlan wrote: Recent changes uncovered a NEGATIVE_RETURNS in the return from sysconf() when processing a for loop in virtTestCaptureProgramExecChild() --- tests/testutils.c | 3 +++ 1 file changed, 3 insertions(+) diff --git

Re: [libvirt] [PATCH 3/7] virsh-domain-monitor: Resolve Coverity issues

2013-07-11 Thread Daniel P. Berrange
On Thu, Jul 11, 2013 at 08:34:03AM -0400, John Ferlan wrote: Recent changes uncovered a pair of NEGATIVE_RETURNS when processing the 'nnames' in 'vshDomainListCollect' in the for loop due to possible -1 value. --- tools/virsh-domain-monitor.c | 10 ++ 1 file changed, 6 insertions(+),

Re: [libvirt] [PATCH 5/7] virsh-nodedev: Resolve Coverity issues

2013-07-11 Thread Daniel P. Berrange
On Thu, Jul 11, 2013 at 08:34:05AM -0400, John Ferlan wrote: Recent changes uncovered FORWARD_NULL and NEGATIVE_RETURNS problems with the processing of the 'ndevices' and its associated allocated arrays in 'vshNodeDeviceListCollect' due to the possibility of returning -1 in a call and using

Re: [libvirt] [PATCH RFC]:tolerate numa_node_size64 0 because nodeid might start from 1 instead of 0

2013-07-11 Thread Peter Krempa
On 07/08/13 16:03, hejia hejia wrote: In nodeGetFreeMemory/nodeGetCellsFreeMemory, they will calculate the free memory of every nodes. They assumed that nodeid of NUMA machine must be continuous and start from 0. But here is a counter-example: # numactl -H available: 1 nodes (1) node 1 cpus:

Re: [libvirt] [PATCH 7/7] qemu_hostdev: Resolve Coverity issue

2013-07-11 Thread Daniel P. Berrange
On Thu, Jul 11, 2013 at 08:34:07AM -0400, John Ferlan wrote: Recent changes uncovered a possibility that 'last_processed_hostdev_vf' was set to -1 in 'qemuPrepareHostdevPCIDevices' and would cause problems in for loop end condition in the 'resetvfnetconfig' label if the variable was never set

Re: [libvirt] [PATCH 6/7] storage_backend: Resolve Coverity issue

2013-07-11 Thread Daniel P. Berrange
On Thu, Jul 11, 2013 at 08:34:06AM -0400, John Ferlan wrote: The switch statement in 'virStorageBackendCreateQemuImgOpts' used the for loop end condition 'VIR_STORAGE_FILE_FEATURE_LAST' as a possible value, but since that cannot happen Coverity spits out a DEADCODE message. Adding the Coverity

Re: [libvirt] [PATCH v2 05/10] Determine whether to start balloon memory stats gathering.

2013-07-11 Thread Michal Privoznik
On 08.07.2013 21:20, John Ferlan wrote: At vm startup, reconnect, and attach - check for the presence of the balloon driver and save the path in the private area of the driver. This path will remain constant throughout the life of the domain and can then be used rather than attempting to find

Re: [libvirt] [PATCH v2 00/10] Re-enable memballoon driver statistics reporting

2013-07-11 Thread Michal Privoznik
On 08.07.2013 21:20, John Ferlan wrote: This patchset replaces: https://www.redhat.com/archives/libvir-list/2013-July/msg00108.html Changes since V1: * Remove the external (eg, qemu_monitor.{c,h}) API's to the qom-list, qom-get, qom-set interfaces * Handle errors in virXPathInt()

Re: [libvirt] [PATCH v2 03/10] Add qemuMonitorJSONSetObjectProperty() method for QMP qom-set command

2013-07-11 Thread Michal Privoznik
On 08.07.2013 21:20, John Ferlan wrote: Add a new qemuMonitorJSONSetObjectProperty() method to support invocation of the 'qom-set' JSON monitor command with a provided path, property, and expected data type to set. The test code uses the same /machine/i440fx property as the get test and

Re: [libvirt] [PATCH v2 07/10] Add new public API virDomainSetMemoryStatsPeriodFlags

2013-07-11 Thread Michal Privoznik
On 08.07.2013 21:20, John Ferlan wrote: Add new API in order to set the balloon memory driver statistics collection period in order to allow dynamic period adjustment for the virsh dommemstats to display balloon stats data --- include/libvirt/libvirt.h.in | 3 ++ src/driver.h

[libvirt] [PATCH] nodeinfo: Don't fail on non-contiguous NUMA topologies

2013-07-11 Thread Peter Krempa
From: hejia hejia jiaker...@gmail.com nodeGetFreeMemory and nodeGetCellsFreeMemory assumed that the NUMA nodes are contiguous and starting from 0. Unfortunately there are machines that don't match this assumption: available: 1 nodes (1) node 1 cpus: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 node 1

Re: [libvirt] [PATCH 4/7] virsh-interface: Resolve Coverity issues

2013-07-11 Thread Daniel P. Berrange
On Thu, Jul 11, 2013 at 08:34:04AM -0400, John Ferlan wrote: Recent changes uncovered FORWARD_NULL and NEGATIVE_RETURNS problems with the processing of the 'nActiveIfaces' and 'nInactiveIfaces' and their associated allocated arrays in 'vshInterfaceListCollect' due to the possibility of

Re: [libvirt] [PATCH v2 2/7] storage: Support username for chap type auth

2013-07-11 Thread John Ferlan
On 07/10/2013 12:04 PM, Daniel P. Berrange wrote: On Wed, Jul 10, 2013 at 11:51:42AM -0400, John Ferlan wrote: On 07/10/2013 10:49 AM, Daniel P. Berrange wrote: On Tue, Jul 09, 2013 at 03:10:46PM -0400, John Ferlan wrote: ...snip To be sure we're on the same page, the storage_conf XML then

Re: [libvirt] [PATCH v2 01/10] Add qemuMonitorJSONGetObjectListPaths() method for QMP qom-list command

2013-07-11 Thread Michal Privoznik
On 08.07.2013 21:20, John Ferlan wrote: Add a new qemuMonitorJSONGetObjectListPaths() method to support invocation of the 'qom-list' JSON monitor command with a provided path. The returned list of paired data fields of name and type that can be used to peruse QOM configuration data and

Re: [libvirt] [PATCH v2 02/10] Add qemuMonitorJSONGetObjectProperty() method for QMP qom-get command

2013-07-11 Thread Michal Privoznik
On 08.07.2013 21:20, John Ferlan wrote: Add a new qemuMonitorJSONGetObjectProperty() method to support invocation of the 'qom-get' JSON monitor command with a provided path, property, and expected data type return. The qemuMonitorJSONObjectProperty is similar to virTypedParameter; however, a

Re: [libvirt] [PATCH v2 2/7] storage: Support username for chap type auth

2013-07-11 Thread Daniel P. Berrange
On Thu, Jul 11, 2013 at 10:11:16AM -0400, John Ferlan wrote: On 07/10/2013 12:04 PM, Daniel P. Berrange wrote: On Wed, Jul 10, 2013 at 11:51:42AM -0400, John Ferlan wrote: On 07/10/2013 10:49 AM, Daniel P. Berrange wrote: On Tue, Jul 09, 2013 at 03:10:46PM -0400, John Ferlan wrote: ...snip

Re: [libvirt] [PATCH v2 04/10] Add 'period' for Memballoon statistics gathering capability

2013-07-11 Thread Daniel P. Berrange
On Mon, Jul 08, 2013 at 03:20:30PM -0400, John Ferlan wrote: Add a period in seconds to allow/enable statistics gathering from the Balloon driver for 'virsh dommemstat domain'. --- docs/formatdomain.html.in | 10 ++ docs/schemas/domaincommon.rng | 7 +++

Re: [libvirt] [PATCH v2 05/10] Determine whether to start balloon memory stats gathering.

2013-07-11 Thread Daniel P. Berrange
On Mon, Jul 08, 2013 at 03:20:31PM -0400, John Ferlan wrote: At vm startup, reconnect, and attach - check for the presence of the balloon driver and save the path in the private area of the driver. This path will remain constant throughout the life of the domain and can then be used rather

Re: [libvirt] [PATCH v2 06/10] Add capability to fetch balloon stats

2013-07-11 Thread Daniel P. Berrange
On Mon, Jul 08, 2013 at 03:20:32PM -0400, John Ferlan wrote: This patch will add the QEMU_MONITOR_OBJECT_PROPERTY_BALLOON_STATS type and a mechanism in the qemuMonitorObjectProperty to fetch and store an opaque data array assuming that we are provided a count of current elements, a count of

Re: [libvirt] [PATCH v2 06/10] Add capability to fetch balloon stats

2013-07-11 Thread Daniel P. Berrange
On Mon, Jul 08, 2013 at 03:20:32PM -0400, John Ferlan wrote: This patch will add the QEMU_MONITOR_OBJECT_PROPERTY_BALLOON_STATS type and a mechanism in the qemuMonitorObjectProperty to fetch and store an opaque data array assuming that we are provided a count of current elements, a count of

Re: [libvirt] [PATCH v2 08/10] Specify remote protocol for virDomainSetMemoryStatsPeriodFlags

2013-07-11 Thread Daniel P. Berrange
On Mon, Jul 08, 2013 at 03:20:34PM -0400, John Ferlan wrote: Wire up the remote protocol --- src/remote/remote_driver.c | 1 + src/remote/remote_protocol.x | 15 ++- src/remote_protocol-structs | 6 ++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git

Re: [libvirt] [PATCH v2 07/10] Add new public API virDomainSetMemoryStatsPeriodFlags

2013-07-11 Thread Daniel P. Berrange
On Mon, Jul 08, 2013 at 03:20:33PM -0400, John Ferlan wrote: Add new API in order to set the balloon memory driver statistics collection period in order to allow dynamic period adjustment for the virsh dommemstats to display balloon stats data --- include/libvirt/libvirt.h.in | 3 ++

Re: [libvirt] [PATCH v2 10/10] Allow balloon driver collection to be adjusted dynamically

2013-07-11 Thread Daniel P. Berrange
On Mon, Jul 08, 2013 at 03:20:36PM -0400, John Ferlan wrote: Use the virDomainSetMemoryStatsPeriodFlags() to pass a period defined by usage of a new --period option in order to set the collection period for the balloon driver. This may enable or disable the collection based on the value. Add

Re: [libvirt] [PATCH v2 01/10] Add qemuMonitorJSONGetObjectListPaths() method for QMP qom-list command

2013-07-11 Thread Daniel P. Berrange
On Mon, Jul 08, 2013 at 03:20:27PM -0400, John Ferlan wrote: Add a new qemuMonitorJSONGetObjectListPaths() method to support invocation of the 'qom-list' JSON monitor command with a provided path. The returned list of paired data fields of name and type that can be used to peruse QOM

Re: [libvirt] [PATCH v2 02/10] Add qemuMonitorJSONGetObjectProperty() method for QMP qom-get command

2013-07-11 Thread Daniel P. Berrange
On Mon, Jul 08, 2013 at 03:20:28PM -0400, John Ferlan wrote: Add a new qemuMonitorJSONGetObjectProperty() method to support invocation of the 'qom-get' JSON monitor command with a provided path, property, and expected data type return. The qemuMonitorJSONObjectProperty is similar to

Re: [libvirt] [PATCH 6/7] storage_backend: Resolve Coverity issue

2013-07-11 Thread John Ferlan
On 07/11/2013 09:56 AM, Daniel P. Berrange wrote: On Thu, Jul 11, 2013 at 08:34:06AM -0400, John Ferlan wrote: The switch statement in 'virStorageBackendCreateQemuImgOpts' used the for loop end condition 'VIR_STORAGE_FILE_FEATURE_LAST' as a possible value, but since that cannot happen Coverity

Re: [libvirt] [PATCH 6/7] storage_backend: Resolve Coverity issue

2013-07-11 Thread Daniel P. Berrange
On Thu, Jul 11, 2013 at 10:48:50AM -0400, John Ferlan wrote: On 07/11/2013 09:56 AM, Daniel P. Berrange wrote: On Thu, Jul 11, 2013 at 08:34:06AM -0400, John Ferlan wrote: The switch statement in 'virStorageBackendCreateQemuImgOpts' used the for loop end condition

Re: [libvirt] [PATCH v2 03/10] Add qemuMonitorJSONSetObjectProperty() method for QMP qom-set command

2013-07-11 Thread Daniel P. Berrange
On Mon, Jul 08, 2013 at 03:20:29PM -0400, John Ferlan wrote: Add a new qemuMonitorJSONSetObjectProperty() method to support invocation of the 'qom-set' JSON monitor command with a provided path, property, and expected data type to set. The test code uses the same /machine/i440fx property as

Re: [libvirt] [PATCH 1/7] hellolibvirt: Resolve Coverity issues

2013-07-11 Thread Eric Blake
On 07/11/2013 06:34 AM, John Ferlan wrote: Recent changes uncovered a NEGATIVE_RETURNS when processing 'numNames' in 'showDomains' in the for loop after a possible -1 return. --- examples/hellolibvirt/hellolibvirt.c | 7 +++ 1 file changed, 7 insertions(+) diff --git

[libvirt] [PATCH v2 1/7] hellolibvirt: Resolve Coverity issues

2013-07-11 Thread John Ferlan
Recent changes uncovered a NEGATIVE_RETURNS when processing 'numNames' in 'showDomains' in the for loop after a possible -1 return. --- examples/hellolibvirt/hellolibvirt.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/examples/hellolibvirt/hellolibvirt.c

[libvirt] [PATCH v2 3/7] virsh-domain-monitor: Resolve Coverity issues

2013-07-11 Thread John Ferlan
Recent changes uncovered a pair of NEGATIVE_RETURNS when processing the 'nnames' in 'vshDomainListCollect' in the for loop due to possible -1 value. --- tools/virsh-domain-monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/virsh-domain-monitor.c

[libvirt] [PATCH v2 7/7] qemu_hostdev: Resolve Coverity issue

2013-07-11 Thread John Ferlan
Recent changes uncovered a possibility that 'last_processed_hostdev_vf' was set to -1 in 'qemuPrepareHostdevPCIDevices' and would cause problems in for loop end condition in the 'resetvfnetconfig' label if the variable was never set to 'i' due to 'qemuDomainHostdevNetConfigReplace' failure. ---

[libvirt] [PATCH v2 2/7] testutils: Resolve Coverity issues

2013-07-11 Thread John Ferlan
Recent changes uncovered a NEGATIVE_RETURNS in the return from sysconf() when processing a for loop in virtTestCaptureProgramExecChild() in testutils.c Code review uncovered 3 other code paths with the same condition that weren't found by Covirity, so fixed those as well. ---

[libvirt] [PATCH v2 0/7] Resolve Coverity issues

2013-07-11 Thread John Ferlan
v1: https://www.redhat.com/archives/libvir-list/2013-July/msg00691.html Changes over v1: * Add additional files to patch #2 to include other places were sysconf(_SC_OPEN_MAX) was used within libvirt sources. * Change for loop end conditions to use variable != -1 (should have looked

[libvirt] [PATCH v2 6/7] storage_backend: Resolve Coverity issue

2013-07-11 Thread John Ferlan
The switch statement in 'virStorageBackendCreateQemuImgOpts' used the for loop end condition 'VIR_STORAGE_FILE_FEATURE_LAST' as a possible value, but since that cannot happen Coverity spits out a DEADCODE message. Adding the Coverity tag just removes the Coverity message ---

[libvirt] [PATCH v2 4/7] virsh-interface: Resolve Coverity issues

2013-07-11 Thread John Ferlan
Recent changes uncovered FORWARD_NULL and NEGATIVE_RETURNS problems with the processing of the 'nActiveIfaces' and 'nInactiveIfaces' and their associated allocated arrays in 'vshInterfaceListCollect' due to the possibility of returning -1 in a call and using the return value as a for loop index

[libvirt] [PATCH v2 5/7] virsh-nodedev: Resolve Coverity issues

2013-07-11 Thread John Ferlan
Recent changes uncovered FORWARD_NULL and NEGATIVE_RETURNS problems with the processing of the 'ndevices' and its associated allocated arrays in 'vshNodeDeviceListCollect' due to the possibility of returning -1 in a call and using the returned value as a for loop index end condition. ---

Re: [libvirt] [PATCH v2 01/10] Add qemuMonitorJSONGetObjectListPaths() method for QMP qom-list command

2013-07-11 Thread John Ferlan
On 07/11/2013 10:06 AM, Michal Privoznik wrote: On 08.07.2013 21:20, John Ferlan wrote: ...snip... diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 3383c88..fc2b65f 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -4540,6 +4540,108

Re: [libvirt] [PATCH v2 02/10] Add qemuMonitorJSONGetObjectProperty() method for QMP qom-get command

2013-07-11 Thread John Ferlan
On 07/11/2013 10:05 AM, Michal Privoznik wrote: On 08.07.2013 21:20, John Ferlan wrote: Add a new qemuMonitorJSONGetObjectProperty() method to support invocation of the 'qom-get' JSON monitor command with a provided path, property, and expected data type return. The

Re: [libvirt] [PATCH v2 02/10] Add qemuMonitorJSONGetObjectProperty() method for QMP qom-get command

2013-07-11 Thread Eric Blake
On 07/11/2013 08:05 AM, Michal Privoznik wrote: On 08.07.2013 21:20, John Ferlan wrote: Add a new qemuMonitorJSONGetObjectProperty() method to support invocation of the 'qom-get' JSON monitor command with a provided path, property, and expected data type return. The

Re: [libvirt] [PATCH v2 0/7] Resolve Coverity issues

2013-07-11 Thread Daniel P. Berrange
On Thu, Jul 11, 2013 at 11:16:22AM -0400, John Ferlan wrote: v1: https://www.redhat.com/archives/libvir-list/2013-July/msg00691.html Changes over v1: * Add additional files to patch #2 to include other places were sysconf(_SC_OPEN_MAX) was used within libvirt sources. * Change for

Re: [libvirt] [PATCH v2 05/10] Determine whether to start balloon memory stats gathering.

2013-07-11 Thread John Ferlan
On 07/11/2013 10:33 AM, Daniel P. Berrange wrote: On Mon, Jul 08, 2013 at 03:20:31PM -0400, John Ferlan wrote: At vm startup, reconnect, and attach - check for the presence of the balloon driver and save the path in the private area of the driver. This path will remain constant throughout the

Re: [libvirt] [PATCH 1/3] virAuth: Don't require virConnectPtr to retrieve authentication creds

2013-07-11 Thread Daniel P. Berrange
On Wed, Jul 10, 2013 at 08:42:03AM +0200, Peter Krempa wrote: Previously a connection object was required to retrieve the auth credentials. This patch adds the option to call the retrieval functions only using the connection URI or path to the configuration file. This will allow to use this

Re: [libvirt] [PATCH] nodeinfo: Don't fail on non-contiguous NUMA topologies

2013-07-11 Thread Daniel P. Berrange
On Thu, Jul 11, 2013 at 04:09:47PM +0200, Peter Krempa wrote: From: hejia hejia jiaker...@gmail.com nodeGetFreeMemory and nodeGetCellsFreeMemory assumed that the NUMA nodes are contiguous and starting from 0. Unfortunately there are machines that don't match this assumption: available: 1

Re: [libvirt] [PATCH 3/3] remote: Improve libssh2 password authentication

2013-07-11 Thread Daniel P. Berrange
On Wed, Jul 10, 2013 at 08:42:05AM +0200, Peter Krempa wrote: This patch enables the password authentication in the libssh2 connection driver. There are a few benefits to this step: 1) Hosts with challenge response authentication will now be supported with the libssh2 connection driver.

Re: [libvirt] [PATCH 2/3] libssh2: Improve password based authentication

2013-07-11 Thread Daniel P. Berrange
On Wed, Jul 10, 2013 at 08:42:04AM +0200, Peter Krempa wrote: The password authentication method wasn't used as there wasn't a pleasant way to pass the password. This patch adds the option to use virAuth util functions to request the password either from a config file or uses the conf callback

Re: [libvirt] [PATCH v2 03/10] Add qemuMonitorJSONSetObjectProperty() method for QMP qom-set command

2013-07-11 Thread Eric Blake
On 07/11/2013 08:05 AM, Michal Privoznik wrote: On 08.07.2013 21:20, John Ferlan wrote: Add a new qemuMonitorJSONSetObjectProperty() method to support invocation of the 'qom-set' JSON monitor command with a provided path, property, and expected data type to set. The test code uses the same

Re: [libvirt] [PATCH v4 1/9] domain_conf: Introduce chardev hotplug helpers

2013-07-11 Thread Daniel P. Berrange
On Wed, Jul 10, 2013 at 07:02:51PM +0200, Michal Privoznik wrote: For now, only these three helpers are needed: virDomainChrFind - to find a duplicate chardev within VM def virDomainChrInsert - wrapper for inserting a new chardev into VM def virDomainChrRemove - wrapper for removing chardev

Re: [libvirt] [PATCH v4 2/9] qemu: Implement chardev hotplug on config level

2013-07-11 Thread Daniel P. Berrange
On Wed, Jul 10, 2013 at 07:02:52PM +0200, Michal Privoznik wrote: There are two levels on which a device may be hotplugged: config and live. The config level requires just an insert or remove from internal domain definition structure, which is exactly what this patch does. There is currently

Re: [libvirt] [PATCH v4 3/9] qemu_monitor_json: Move InetSocketAddress build to a separate function

2013-07-11 Thread Daniel P. Berrange
On Wed, Jul 10, 2013 at 07:02:53PM +0200, Michal Privoznik wrote: Currently, we are building InetSocketAddress qemu json type within the qemuMonitorJSONNBDServerStart function. However, other future functions may profit from the code as well. So it should be moved into a static function. ---

Re: [libvirt] [PATCH v4 6/9] qemu_command: Honour chardev alias assignment with a function

2013-07-11 Thread Daniel P. Berrange
On Wed, Jul 10, 2013 at 07:02:56PM +0200, Michal Privoznik wrote: The chardev alias assignment is going to be needed in a separate places, so it should be moved into a separate function rather than copying code randomly around. --- src/qemu/qemu_command.c | 38

Re: [libvirt] [PATCH v4 4/9] qemu_monitor: Introduce qemuMonitorAttachCharDev

2013-07-11 Thread Daniel P. Berrange
On Wed, Jul 10, 2013 at 07:02:54PM +0200, Michal Privoznik wrote: The function being introduced is responsible for preparing and executing 'chardev-add' qemu monitor command. Moreover, in case of PTY chardev, the corresponding pty path is updated. --- src/qemu/qemu_monitor.c | 21 +

Re: [libvirt] [PATCH v4 5/9] qemu_monitor: Introduce qemuMonitorDetachCharDev

2013-07-11 Thread Daniel P. Berrange
On Wed, Jul 10, 2013 at 07:02:55PM +0200, Michal Privoznik wrote: This function wraps 'chardev-remove' qemu monitor command around. It takes chardev alias as its single argument besides qemu monitor pointer. --- src/qemu/qemu_monitor.c | 20 src/qemu/qemu_monitor.h

Re: [libvirt] [PATCH v4 7/9] qemu: Introduce qemuBuildChrDeviceStr

2013-07-11 Thread Daniel P. Berrange
On Wed, Jul 10, 2013 at 07:02:57PM +0200, Michal Privoznik wrote: The function being introduced is responsible for creating command line argument for '-device' for given character device. Based on the chardev type, it calls appropriate qemuBuild.*ChrDeviceStr(), e.g.

Re: [libvirt] [PATCH v4 8/9] qemu: Implement chardev hotplug on live level

2013-07-11 Thread Daniel P. Berrange
On Wed, Jul 10, 2013 at 07:02:58PM +0200, Michal Privoznik wrote: Since previous patches has prepared everything for us, we may now implement live hotplug of a character device. --- src/qemu/qemu_command.c | 38 - src/qemu/qemu_driver.c | 26 ++--

[libvirt] [PATCH] maint: update to latest gnulib

2013-07-11 Thread Eric Blake
Future patches need LGPLv2+ versions of some modules that had recent license changes; but separating the gnulib update from the actual use of the modules makes it easier to backport to an older version while avoiding a submodule update (assuming, of course, that the backport is to a system where

Re: [libvirt] [PATCH v2 05/10] Determine whether to start balloon memory stats gathering.

2013-07-11 Thread John Ferlan
On 07/11/2013 10:05 AM, Michal Privoznik wrote: On 08.07.2013 21:20, John Ferlan wrote: At vm startup, reconnect, and attach - check for the presence of the balloon driver and save the path in the private area of the driver. This path will remain constant throughout the life of the domain and

Re: [libvirt] [PATCH] util: add rebase fix that was accidentally omitted from previous patch

2013-07-11 Thread Laine Stump
On 07/11/2013 09:22 AM, Eric Blake wrote: On 07/11/2013 07:12 AM, Eric Blake wrote: Yes, it can be reasonable to push a patch while the tree is still dirty for unrelated reasons. But I agree that it seems like an advanced option, and that most users would much rather be informed any time

[libvirt] [PATCH] Create directory for lease files if it's missing

2013-07-11 Thread Guido Günther
If we don't autostart a network it's not being created. Debian Bug http://bugs.debian.org/715200 --- src/nwfilter/nwfilter_dhcpsnoop.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/nwfilter/nwfilter_dhcpsnoop.c b/src/nwfilter/nwfilter_dhcpsnoop.c index

Re: [libvirt] [PATCH v2 0/7] Resolve Coverity issues

2013-07-11 Thread John Ferlan
On 07/11/2013 12:02 PM, Daniel P. Berrange wrote: On Thu, Jul 11, 2013 at 11:16:22AM -0400, John Ferlan wrote: v1: https://www.redhat.com/archives/libvir-list/2013-July/msg00691.html Changes over v1: * Add additional files to patch #2 to include other places were sysconf(_SC_OPEN_MAX)

[libvirt] invoking qemu with -readconfig

2013-07-11 Thread Jim Fehlig
Hi All, I was recently asked about the possibility of libvirt creating a config file and then invoking qemu with '-readconfig file' instead of passing all arguments on the command line. The primary reason for this request is a more readable ps output and the ability to inspect the arguments in a

  1   2   >