[libvirt] [PATCH] network: fix problems with SRV

2014-03-18 Thread Laine Stump
A patch submitted by Steven Malin last week pointed out a problem with libvirt's DNS SRV record configuration: https://www.redhat.com/archives/libvir-list/2014-March/msg00536.html When searching for that message later, I found another series that had been posted by Guannan Ren back in 2012

Re: [libvirt] [PATCH v2 1/3] virsh: Add keepalive in new vshConnect function

2014-03-18 Thread Michal Privoznik
On 10.03.2014 12:26, Martin Kletzander wrote: Introducing keepalive similarly to Guannan around 2 years ago. Since we want to introduce keepalive for every connection, it makes sense to wrap the connecting function into new virsh one that can deal keepalive as well. Function vshConnect() is

Re: [libvirt] [PATCH v2 2/3] virsh: Prohibit virConnectOpen* functions in virsh

2014-03-18 Thread Michal Privoznik
On 10.03.2014 12:26, Martin Kletzander wrote: Addition of vshConnect() makes virConnectOpen() functions obsolete in virsh. Thus all virsh-*.[ch] files should be left only with vshConnect() in the case of need. Signed-off-by: Martin Kletzander mklet...@redhat.com --- cfg.mk | 8 +++- 1

Re: [libvirt] [PATCH] network: fix problems with SRV

2014-03-18 Thread Martin Kletzander
On Tue, Mar 18, 2014 at 12:07:17AM -0600, Laine Stump wrote: A patch submitted by Steven Malin last week pointed out a problem with libvirt's DNS SRV record configuration: https://www.redhat.com/archives/libvir-list/2014-March/msg00536.html When searching for that message later, I found

[libvirt] [PATCH v7 1/4] add new virDomainCoreDumpWithFormat API

2014-03-18 Thread qiaonuo...@cn.fujitsu.com
--memory-only option is introduced without compression supported. Now qemu has support dumping domain's memory in kdump-compressed format. This patch is adding new virDomainCoreDumpWithFormat API, so that the format in which qemu dumps domain's memory can be specified. Signed-off-by: Qiao Nuohan

[libvirt] [PATCH v7 0/4] support dumping guest memory in compressed format

2014-03-18 Thread qiaonuo...@cn.fujitsu.com
dumping guest's memory is introduced without compression supported, but now qemu can dump guest's memory in kdump-compressed format. This patchset is used to add support in libvirt side to let qemu do the dump in compressed format and please refer the following address to see implementation of the

[libvirt] [PATCH v7 2/4] qemu: add qemuMonitorGetDumpGuestMemoryCapability

2014-03-18 Thread qiaonuo...@cn.fujitsu.com
This patch adds qemuMonitorGetDumpGuestMemoryCapability, which is used to check whether the specified dump-guest-memory format is supported by qemu. Signed-off-by: Qiao Nuohan qiaonuo...@cn.fujitsu.com --- src/qemu/qemu_monitor.c | 21 ++ src/qemu/qemu_monitor.h | 3 ++

[libvirt] [PATCH v7 3/4] qemu: add support for virDomainCoreDumpWithFormat API

2014-03-18 Thread qiaonuo...@cn.fujitsu.com
This patch makes qemu driver support virDomainCoreDumpWithFormat API. Signed-off-by: Qiao Nuohan qiaonuo...@cn.fujitsu.com --- src/qemu/qemu_driver.c | 70 +--- src/qemu/qemu_monitor.c | 6 ++-- src/qemu/qemu_monitor.h | 3 +-

[libvirt] [PATCH v7 4/4] allow virsh dump --memory-only specify dump format

2014-03-18 Thread qiaonuo...@cn.fujitsu.com
This patch adds [--compression-format] string to virsh dump --memory-only, which is changed to use the new virDomainCoreDumpWithFormat API. And --compress is added as an alias for --compression-format zlib. Signed-off-by: Qiao Nuohan qiaonuo...@cn.fujitsu.com --- tools/virsh-domain.c | 45

[libvirt] [PATCH] Fix memory leak in virDomainChrSourceDefClear()

2014-03-18 Thread Nehal J Wani
While running qemuxml2xmltest, it was found that valgrind pointed out the following memory leak: ==21905== 26 bytes in 1 blocks are definitely lost in loss record 23 of 69 ==21905==at 0x4A069EE: malloc (vg_replace_malloc.c:270) ==21905==by 0x3E782A754D: xmlStrndup (in

Re: [libvirt] [PATCH v2 2/3] virsh: Prohibit virConnectOpen* functions in virsh

2014-03-18 Thread Martin Kletzander
On Tue, Mar 18, 2014 at 08:05:51AM +0100, Michal Privoznik wrote: On 10.03.2014 12:26, Martin Kletzander wrote: Addition of vshConnect() makes virConnectOpen() functions obsolete in virsh. Thus all virsh-*.[ch] files should be left only with vshConnect() in the case of need.

Re: [libvirt] [PATCH v2 1/3] virsh: Add keepalive in new vshConnect function

2014-03-18 Thread Martin Kletzander
On Tue, Mar 18, 2014 at 08:05:54AM +0100, Michal Privoznik wrote: On 10.03.2014 12:26, Martin Kletzander wrote: Introducing keepalive similarly to Guannan around 2 years ago. Since we want to introduce keepalive for every connection, it makes sense to wrap the connecting function into new

[libvirt] [RFC] VM which uses macvtap will not respond ping request when being migrated

2014-03-18 Thread Wangrui (K)
A vm which uses macvtap will not respond ping request, when the vm is being migrated. I found that on the destination side the macvtap will send a IPv6 packet at the begin of migration to update the route table in switch, however VM is still on the src. In this case , what can I do to avoid

[libvirt] [PATCH libvirt-python 2/2] setPyVirTypedParameter: free whole return variable on error

2014-03-18 Thread Michal Privoznik
The @ret value is built in a loop. However, if in one iteration there's an error, we should free all the fields built so far. For instance, if there's an error and the previous item was type of VIR_TYPED_PARAM_STRING we definitely must free it. Signed-off-by: Michal Privoznik mpriv...@redhat.com

[libvirt] [PATCH libvirt-python 1/2] setPyVirTypedParameter: Copy full field name

2014-03-18 Thread Michal Privoznik
In the setPyVirTypedParameter we try to produce virTypedParameter array from a pyhthon dictionary. However, when copying field name into item in returned array, we use strncpy() as the field name is fixed length array. To determine its size we use sizeof() but mistakenly dereference it resulting

Re: [libvirt] Python setInterfaceParameters function broken

2014-03-18 Thread Michal Privoznik
On 17.03.2014 20:31, Brian Rak wrote: I've been trying to use domain.setInterfaceParameters, and I'm finding it's throwing the mysterious error: libvirt.libvirtError: argument unsupported: parameter '' not supported Enabling debug mode in libvirt reveals this: 2014-03-17 18:41:33.780+:

Re: [libvirt] uses of /etc/libvirt/driver/

2014-03-18 Thread Michal Privoznik
On 18.03.2014 02:20, Eric Blake wrote: On 03/17/2014 05:46 PM, Jim Fehlig wrote: I received a report about an odd use case of /etc/libvirt/driver/ config files, and would like to hear some opinions about it. The user preps a host by mounting a remote fs containing VM images and config, creates

Re: [libvirt] [PATCH] Fix memory leak in virDomainChrSourceDefClear()

2014-03-18 Thread Martin Kletzander
On Tue, Mar 18, 2014 at 01:02:24PM +0530, Nehal J Wani wrote: While running qemuxml2xmltest, it was found that valgrind pointed out the following memory leak: ==21905== 26 bytes in 1 blocks are definitely lost in loss record 23 of 69 ==21905==at 0x4A069EE: malloc

Re: [libvirt] [PATCH 3/7] Fix inconsistency in using curly braces around functions

2014-03-18 Thread Martin Kletzander
On Mon, Mar 17, 2014 at 09:25:13AM -0600, Eric Blake wrote: On 03/17/2014 08:39 AM, Martin Kletzander wrote: Although not explicitly requested, we are using KR (or Kernel) indentation for curly braces around functions in HACKING file and most of the code. The rest is inconsistent and this

Re: [libvirt] [PATCH libvirt-python 1/2] setPyVirTypedParameter: Copy full field name

2014-03-18 Thread Martin Kletzander
On Tue, Mar 18, 2014 at 09:26:08AM +0100, Michal Privoznik wrote: In the setPyVirTypedParameter we try to produce virTypedParameter array from a pyhthon dictionary. However, when copying field name into s/pyhthon/python/ item in returned array, we use strncpy() as the field name is fixed

Re: [libvirt] [PATCH libvirt-python 2/2] setPyVirTypedParameter: free whole return variable on error

2014-03-18 Thread Martin Kletzander
On Tue, Mar 18, 2014 at 09:26:09AM +0100, Michal Privoznik wrote: The @ret value is built in a loop. However, if in one iteration there's an error, we should free all the fields built so far. For instance, if there's an error and the previous item was type of VIR_TYPED_PARAM_STRING we

[libvirt] [PATCH] bhyve: add domainCreateWithFlags support

2014-03-18 Thread Roman Bogorodskiy
The only supported flag for now is 'autodestroy'. In order to support 'autodestroy', add support for close callbacks. --- src/bhyve/bhyve_driver.c | 28 +--- src/bhyve/bhyve_process.c | 29 - src/bhyve/bhyve_process.h | 7 ++-

Re: [libvirt] uses of /etc/libvirt/driver/

2014-03-18 Thread Daniel P. Berrange
On Mon, Mar 17, 2014 at 05:46:04PM -0600, Jim Fehlig wrote: I received a report about an odd use case of /etc/libvirt/driver/ config files, and would like to hear some opinions about it. The user preps a host by mounting a remote fs containing VM images and config, creates links in

[libvirt] [PATCH] qemuDomainSetInterfaceParameters: Allow bandwidth clear out

2014-03-18 Thread Michal Privoznik
We allow translation from no_bandwidth to has_bandwidth for a vnic. However, going in the opposite direction is not implemented. It's not limitation of the API rather than internal implementation. The problem is, we correctly detect that user hasn't specified any outbound (say he wants to clear

[libvirt] [PATCH] virNetServerNewPostExecRestart: Initialize @max_anonymous_clients

2014-03-18 Thread Michal Privoznik
Coverity spotted a use of possibly undefined variable. If a server is restarting as an result of update, the JSON file that keeps current value of some variables will not contain the new variables. This is the case of @max_anonymous_clients too. We are correctly querying if there's

Re: [libvirt] [PATCH 5/7] Explicitly cast some switch parameters to enum

2014-03-18 Thread Pavel Hrdina
On 17.3.2014 16:38, Eric Blake wrote: On 03/17/2014 08:39 AM, Martin Kletzander wrote: This patch is not trying to fix every switch, just the ones I worked with last time, because some of these were especially unreadable. Covers enums virDomainGraphicsType and virDomainChrType (where

Re: [libvirt] [PATCH] virNetServerNewPostExecRestart: Initialize @max_anonymous_clients

2014-03-18 Thread Daniel P. Berrange
On Tue, Mar 18, 2014 at 11:10:58AM +0100, Michal Privoznik wrote: Coverity spotted a use of possibly undefined variable. If a server is restarting as an result of update, the JSON file that keeps current value of some variables will not contain the new variables. This is the case of

Re: [libvirt] [PATCH] build: Fix build with old automake

2014-03-18 Thread Jiri Denemark
On Mon, Mar 17, 2014 at 09:33:11 -0600, Eric Blake wrote: On 03/14/2014 12:55 PM, Jiri Denemark wrote: On Fri, Mar 14, 2014 at 07:54:58 -0600, Eric Blake wrote: On 03/14/2014 04:43 AM, Jiri Denemark wrote: Ancient automake (such as from RHEL5) does not provide abs_srcdir and abs_builddir

Re: [libvirt] [PATCH] build: Fix build with old automake

2014-03-18 Thread Daniel P. Berrange
On Tue, Mar 18, 2014 at 11:36:51AM +0100, Jiri Denemark wrote: On Mon, Mar 17, 2014 at 09:33:11 -0600, Eric Blake wrote: On 03/14/2014 12:55 PM, Jiri Denemark wrote: On Fri, Mar 14, 2014 at 07:54:58 -0600, Eric Blake wrote: On 03/14/2014 04:43 AM, Jiri Denemark wrote: Ancient automake

Re: [libvirt] [PATCH] build: Fix build with old automake

2014-03-18 Thread Jiri Denemark
On Tue, Mar 18, 2014 at 10:42:01 +, Daniel Berrange wrote: On Tue, Mar 18, 2014 at 11:36:51AM +0100, Jiri Denemark wrote: On Mon, Mar 17, 2014 at 09:33:11 -0600, Eric Blake wrote: On 03/14/2014 12:55 PM, Jiri Denemark wrote: On Fri, Mar 14, 2014 at 07:54:58 -0600, Eric Blake wrote:

[libvirt] [PATCH python 1/2] Add support for running unit tests with nose

2014-03-18 Thread Daniel P. Berrange
Make the 'python setup.py test' able to run unit tests found under tests/ through the 'nosetests' command Signed-off-by: Daniel P. Berrange berra...@redhat.com --- setup.py | 5 + tests/test_conn.py | 16 2 files changed, 21 insertions(+) create mode 100644

[libvirt] [PATCH python 2/2] Add test for setting scheduler parameters

2014-03-18 Thread Daniel P. Berrange
Add a test setting scheduler parameters to validate the previous bugfix to strncpy of field names. Signed-off-by: Daniel P. Berrange berra...@redhat.com --- tests/test_domain.py | 19 +++ 1 file changed, 19 insertions(+) create mode 100644 tests/test_domain.py diff --git

[libvirt] [PATCH python 0/2] Add unit test framework

2014-03-18 Thread Daniel P. Berrange
The bug fix of Michal's to handling of typed parameters demonstrated a clear need for a unit test framework for python bindings. By using the test:///default driver we can easily test a great many python APIs. Once the test driver has full API coverage, we can in fact unit test all the python

Re: [libvirt] [PATCH 1/7] qemu: agent availability cleanup

2014-03-18 Thread Martin Kletzander
On Mon, Mar 17, 2014 at 09:16:07AM -0600, Eric Blake wrote: On 03/17/2014 08:39 AM, Martin Kletzander wrote: Eliminate all the code re-use which checks for priv-agentError or priv-agent. Signed-off-by: Martin Kletzander mklet...@redhat.com --- src/qemu/qemu_domain.c | 22 +

Re: [libvirt] [PATCH 2/7] tests: cleanup object-locking test

2014-03-18 Thread Martin Kletzander
On Mon, Mar 17, 2014 at 09:19:02AM -0600, Eric Blake wrote: On 03/17/2014 08:39 AM, Martin Kletzander wrote: When ran, cil is throwing out some errors and warnings for obsolete 'or' unused variables and wrong module name (it should not contain a hyphen; hence the rename).

Re: [libvirt] [PATCH 4/7] Don't leave empty first line in C source files

2014-03-18 Thread Martin Kletzander
On Mon, Mar 17, 2014 at 09:27:14AM -0600, Eric Blake wrote: On 03/17/2014 08:39 AM, Martin Kletzander wrote: If there should be some sort of separator it is better to use comment with the filename, copyright, description, license information and authors. Found by: git grep -nH

Re: [libvirt] [PATCH 6/7] Remove duplicate network model characters

2014-03-18 Thread Martin Kletzander
On Mon, Mar 17, 2014 at 09:40:46AM -0600, Eric Blake wrote: On 03/17/2014 08:39 AM, Martin Kletzander wrote: Signed-off-by: Martin Kletzander mklet...@redhat.com --- src/conf/domain_conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ACK Pushed, thanks. Martin diff

Re: [libvirt] [PATCH 5/7] Explicitly cast some switch parameters to enum

2014-03-18 Thread Martin Kletzander
On Tue, Mar 18, 2014 at 11:15:01AM +0100, Pavel Hrdina wrote: On 17.3.2014 16:38, Eric Blake wrote: On 03/17/2014 08:39 AM, Martin Kletzander wrote: This patch is not trying to fix every switch, just the ones I worked with last time, because some of these were especially unreadable.

Re: [libvirt] [PATCH 7/7] Require spaces around equality comparisons

2014-03-18 Thread Martin Kletzander
On Mon, Mar 17, 2014 at 09:44:45AM -0600, Eric Blake wrote: On 03/17/2014 08:39 AM, Martin Kletzander wrote: Commit a1cbe4b5 added a check for spaces around assignments and this patch extends it to checks for spaces around '=='. One exception is virAssertCmpInt where comma after '==' is

[libvirt] [PATCH] Remove double space in file name comment check

2014-03-18 Thread Ján Tomko
Reported by Martin Kletzander --- Pushed as trivial. cfg.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cfg.mk b/cfg.mk index a2fed11..e75323e 100644 --- a/cfg.mk +++ b/cfg.mk @@ -888,7 +888,7 @@ sc_prohibit_wrong_filename_in_comment: }

Re: [libvirt] [PATCH] build: Fix build with old automake

2014-03-18 Thread Eric Blake
On 03/18/2014 05:00 AM, Jiri Denemark wrote: Why don't we just avoid the whole issue by removing use of abs_srcdir and abs_builddir. Can this rule: $(abs_builddir)/cpu/cpu_map.xml: $(AM_V_GEN)ln -s $(abs_srcdir)/cpu/cpu_map.xml $@ be just changed to cpu/cpu_map.xml:

[libvirt] [PATCH] cfg.mk: Fix whitespaces

2014-03-18 Thread Martin Kletzander
Just to align the backslashes with most of the file. Signed-off-by: Martin Kletzander mklet...@redhat.com --- Notes: Pushed as 'trivial'. cfg.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cfg.mk b/cfg.mk index e75323e..319210b 100644 --- a/cfg.mk +++ b/cfg.mk

[libvirt] [PATCH 3/6] Remove 'int stopOnError' parameters in nwfilter methods

2014-03-18 Thread Daniel P. Berrange
Many nwfilter methods have an 'int stopOnError' parameter but with 1 exception, the callers always pass '1'. The parameter can therefore be removed from all except one method. That method will be changed to 'bool stopOnError' Signed-off-by: Daniel P. Berrange berra...@redhat.com ---

[libvirt] [PATCH 2/6] Remove pointless brackets around boolean

2014-03-18 Thread Daniel P. Berrange
A lot of methods have a 'bool incoming' parameter but then do (incoming) ? ... : The round brackets here add nothing to the code so can be removed. Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/nwfilter/nwfilter_ebiptables_driver.c | 92 +++ 1

[libvirt] [PATCH 0/6] Misc cleanups to nwfilter code

2014-03-18 Thread Daniel P. Berrange
This mini-series performs a few style cleanups on the nwfilter code. There should be no functional change in any of these patches. Daniel P. Berrange (6): Change 'int incoming' to 'bool incoming' in nwfilter code Remove pointless brackets around boolean Remove 'int stopOnError' parameters

[libvirt] [PATCH 6/6] Change CMD_STOPONERR(1) to use true

2014-03-18 Thread Daniel P. Berrange
The CMD_STOPONERR macro uses its parameter as a boolean, so should be passed true rather than 1. Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/nwfilter/nwfilter_ebiptables_driver.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git

[libvirt] [PATCH 5/6] Change 'int isTempChain' to bool in nwfilter

2014-03-18 Thread Daniel P. Berrange
The 'int isTempChain' parameter to various nwfilter methods only takes two values so should be a bool type. Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/nwfilter/nwfilter_ebiptables_driver.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff

[libvirt] [PATCH 1/6] Change 'int incoming' to 'bool incoming' in nwfilter code

2014-03-18 Thread Daniel P. Berrange
Many methods in the nwfilter code have an 'int incoming' parameter that only takes 0 or 1, so should use a bool instead. Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/nwfilter/nwfilter_ebiptables_driver.c | 187 +++--- 1 file changed, 94 insertions(+), 93

[libvirt] [PATCH 4/6] Remove pointless return values in nwfilter methods

2014-03-18 Thread Daniel P. Berrange
Many nwfilter methods have an int return value but only ever return 0 and their callers never check the return value either. These methods can all be void. Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/nwfilter/nwfilter_ebiptables_driver.c | 157 -- 1

Re: [libvirt] uses of /etc/libvirt/driver/

2014-03-18 Thread Jim Fehlig
Michal Privoznik wrote: On 18.03.2014 02:20, Eric Blake wrote: On 03/17/2014 05:46 PM, Jim Fehlig wrote: I received a report about an odd use case of /etc/libvirt/driver/ config files, and would like to hear some opinions about it. The user preps a host by mounting a remote fs containing VM

Re: [libvirt] [PATCH 00/13] Add multiple trace backend function and add new ftrace backend for libvirt

2014-03-18 Thread Frank Ch. Eigler
Hi - On Tue, Mar 18, 2014 at 05:14:38AM +, yangzy.f...@cn.fujitsu.com wrote: [...] (For what it's worth, there are several different ways of executing systemtap scripts automatically at startup. There is an initscript. With the next version, its docs will move into 'man 8

Re: [libvirt] [PATCH 1/6] Change 'int incoming' to 'bool incoming' in nwfilter code

2014-03-18 Thread Eric Blake
On 03/18/2014 07:36 AM, Daniel P. Berrange wrote: Many methods in the nwfilter code have an 'int incoming' parameter that only takes 0 or 1, so should use a bool instead. Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/nwfilter/nwfilter_ebiptables_driver.c | 187

Re: [libvirt] [PATCH 2/6] Remove pointless brackets around boolean

2014-03-18 Thread Eric Blake
On 03/18/2014 07:36 AM, Daniel P. Berrange wrote: A lot of methods have a 'bool incoming' parameter but then do (incoming) ? ... : The round brackets here add nothing to the code so can be removed. Signed-off-by: Daniel P. Berrange berra...@redhat.com ---

Re: [libvirt] [PATCH 5/6] Change 'int isTempChain' to bool in nwfilter

2014-03-18 Thread Eric Blake
On 03/18/2014 07:36 AM, Daniel P. Berrange wrote: The 'int isTempChain' parameter to various nwfilter methods only takes two values so should be a bool type. Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/nwfilter/nwfilter_ebiptables_driver.c | 24

Re: [libvirt] [PATCH 6/6] Change CMD_STOPONERR(1) to use true

2014-03-18 Thread Eric Blake
On 03/18/2014 07:36 AM, Daniel P. Berrange wrote: The CMD_STOPONERR macro uses its parameter as a boolean, so should be passed true rather than 1. Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/nwfilter/nwfilter_ebiptables_driver.c | 30 +++--- 1

Re: [libvirt] [PATCH] build: Fix build with old automake

2014-03-18 Thread Jiri Denemark
On Tue, Mar 18, 2014 at 06:27:48 -0600, Eric Blake wrote: On 03/18/2014 05:00 AM, Jiri Denemark wrote: Why don't we just avoid the whole issue by removing use of abs_srcdir and abs_builddir. Can this rule: $(abs_builddir)/cpu/cpu_map.xml: $(AM_V_GEN)ln -s

Re: [libvirt] [PATCH 6/6] Change CMD_STOPONERR(1) to use true

2014-03-18 Thread Eric Blake
On 03/18/2014 09:25 AM, Eric Blake wrote: On 03/18/2014 07:36 AM, Daniel P. Berrange wrote: The CMD_STOPONERR macro uses its parameter as a boolean, so should be passed true rather than 1. Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/nwfilter/nwfilter_ebiptables_driver.c |

Re: [libvirt] [PATCH 0/6] Misc cleanups to nwfilter code

2014-03-18 Thread Eric Blake
On 03/18/2014 07:36 AM, Daniel P. Berrange wrote: This mini-series performs a few style cleanups on the nwfilter code. There should be no functional change in any of these patches. Daniel P. Berrange (6): Change 'int incoming' to 'bool incoming' in nwfilter code Remove pointless

Re: [libvirt] [PATCH] build: Fix build with old automake

2014-03-18 Thread Eric Blake
On 03/18/2014 09:32 AM, Jiri Denemark wrote: On Tue, Mar 18, 2014 at 06:27:48 -0600, Eric Blake wrote: On 03/18/2014 05:00 AM, Jiri Denemark wrote: Why don't we just avoid the whole issue by removing use of abs_srcdir and abs_builddir. Can this rule: $(abs_builddir)/cpu/cpu_map.xml:

Re: [libvirt] [PATCH 5/6] Change 'int isTempChain' to bool in nwfilter

2014-03-18 Thread Daniel P. Berrange
On Tue, Mar 18, 2014 at 09:21:14AM -0600, Eric Blake wrote: On 03/18/2014 07:36 AM, Daniel P. Berrange wrote: The 'int isTempChain' parameter to various nwfilter methods only takes two values so should be a bool type. Signed-off-by: Daniel P. Berrange berra...@redhat.com ---

Re: [libvirt] [PATCH 5/6] Change 'int isTempChain' to bool in nwfilter

2014-03-18 Thread Eric Blake
On 03/18/2014 09:47 AM, Daniel P. Berrange wrote: On Tue, Mar 18, 2014 at 09:21:14AM -0600, Eric Blake wrote: On 03/18/2014 07:36 AM, Daniel P. Berrange wrote: The 'int isTempChain' parameter to various nwfilter methods only takes two values so should be a bool type. Signed-off-by: Daniel P.

Re: [libvirt] [PATCH] qemuDomainSetInterfaceParameters: Allow bandwidth clear out

2014-03-18 Thread Eric Blake
On 03/18/2014 04:01 AM, Michal Privoznik wrote: We allow translation from no_bandwidth to has_bandwidth for a vnic. However, going in the opposite direction is not implemented. It's not limitation of the API rather than internal implementation. Awkward. How about: It's not a limitation of

Re: [libvirt] [PATCH 4/6] Remove pointless return values in nwfilter methods

2014-03-18 Thread Eric Blake
On 03/18/2014 07:36 AM, Daniel P. Berrange wrote: Many nwfilter methods have an int return value but only ever return 0 and their callers never check the return value either. These methods can all be void. Signed-off-by: Daniel P. Berrange berra...@redhat.com ---

Re: [libvirt] [PATCH python 0/2] Add unit test framework

2014-03-18 Thread Michal Privoznik
On 18.03.2014 12:27, Daniel P. Berrange wrote: The bug fix of Michal's to handling of typed parameters demonstrated a clear need for a unit test framework for python bindings. By using the test:///default driver we can easily test a great many python APIs. Once the test driver has full API

[libvirt] [PATCH] is_selinux_enabled returns -1 on error, account for this.

2014-03-18 Thread Scott Sullivan
Per the documentation, is_selinux_enabled() returns -1 on error. Account for this. Previously when -1 was being returned the condition would still be true. I was noticing this because on my system that has selinux disabled I was getting this in the libvirt.log every 5 seconds: error :

[libvirt] [PATCH v2] Add ability to register callback for virCommand dry run

2014-03-18 Thread Daniel P. Berrange
To allow for fault injection of the virCommand dry run, add the ability to register a callback. The callback will be passed the argv, env and stdin buffer and is expected to return the exit status and optionally fill stdout and stderr buffers. Signed-off-by: Daniel P. Berrange berra...@redhat.com

[libvirt] [PATCH] libxl: fix framebuffer port setting for HVM domains

2014-03-18 Thread Jim Fehlig
libxl uses the libxl_vnc_info and libxl_sdl_info fields from the hvm union in libxl_domain_build_info struct when generating QEMU args for VNC or SDL. These fields were left unset by the libxl driver, causing libxl to ignore any user settings. E.g. with graphics type='vnc' port='5950'/ port

Re: [libvirt] [PATCH] libxl: fix framebuffer port setting for HVM domains

2014-03-18 Thread Daniel P. Berrange
On Tue, Mar 18, 2014 at 12:19:47PM -0600, Jim Fehlig wrote: libxl uses the libxl_vnc_info and libxl_sdl_info fields from the hvm union in libxl_domain_build_info struct when generating QEMU args for VNC or SDL. These fields were left unset by the libxl driver, causing libxl to ignore any user

[libvirt] [PATCH] maint: avoid unbalanced {} across vbox #ifdef

2014-03-18 Thread Eric Blake
Emacs is fairly good about navigating across function and scope boundaries, provided that the code has balanced {}. The vbox code, however, violated that premise, by splitting 'if () {' across several #ifdef branches, but sharing the '} else {...}' outside of the branches. The extra lines of

Re: [libvirt] [PATCH] libxl: fix framebuffer port setting for HVM domains

2014-03-18 Thread Jim Fehlig
Daniel P. Berrange wrote: On Tue, Mar 18, 2014 at 12:19:47PM -0600, Jim Fehlig wrote: libxl uses the libxl_vnc_info and libxl_sdl_info fields from the hvm union in libxl_domain_build_info struct when generating QEMU args for VNC or SDL. These fields were left unset by the libxl driver,

[libvirt] specifying cirrus ram size

2014-03-18 Thread Serge Hallyn
Hi, In order to migrate a VM from an older system with qemu-kvm to a newer one with qemu, the newer qemu needs to be told to use the same vga ram size as qemu-kvm used, 8M. virsh domxml-from-native suggests that the way to specify a 8mb cirrus vga ram size would be to add qemu:commandline

Re: [libvirt] specifying cirrus ram size

2014-03-18 Thread Eric Blake
On 03/18/2014 03:59 PM, Serge Hallyn wrote: Hi, In order to migrate a VM from an older system with qemu-kvm to a newer one with qemu, the newer qemu needs to be told to use the same vga ram size as qemu-kvm used, 8M. virsh domxml-from-native suggests that the way to specify a 8mb cirrus

[libvirt] [RFC] [PATCH] Fix flawed testcases in qemuhotplugtest.c

2014-03-18 Thread Nehal J Wani
While running qemuhotplugtest, it was found that valgrind pointed out the following memory leak: ==7906== 5 bytes in 1 blocks are definitely lost in loss record 7 of 121 ==7906==at 0x4A069EE: malloc (vg_replace_malloc.c:270) ==7906==by 0x3E782A754D: xmlStrndup (in

[libvirt] [PATCH] nwfilter: Fix the test for the result of atomic dec and test

2014-03-18 Thread Stefan Berger
From: Stefan Berger stef...@linux.vnet.ibm.com https://bugzilla.redhat.com/show_bug.cgi?id=1071181 Commit 49b59a15 fixed one problem but masks another one related to pointer freeing. Use virAtomicIntGet() to test for 0 rather than trying to test for 'true' after virAtomicIntDecAndTest().

[libvirt] [PATCH] libxl_driver.c: cleanup code

2014-03-18 Thread Chunyan Liu
Following Jim's comments about add pci passthrough to libxl patch: https://www.redhat.com/archives/libvir-list/2014-March/msg00170.html Signed-off-by: Chunyan Liu cy...@suse.com --- src/libxl/libxl_driver.c | 47 +++ 1 file changed, 19 insertions(+),

[libvirt] [PATCH] virhostdev.h: remove ATTRIBUTE_NONNULL to oldStateDir

2014-03-18 Thread Chunyan Liu
For libxl driver usage, it didn't support hostdev passthrough before, oldStateDir is NULL when calling virHostdevReAttachDomainHostdevs. That is allowed. Remove ATTRIBUTE_NONNULL setting to oldStateDir. Signed-off-by: Chunyan Liu cy...@suse.com --- src/util/virhostdev.h | 2 +- 1 file changed, 1

Re: [libvirt] specifying cirrus ram size

2014-03-18 Thread Serge Hallyn
Quoting Eric Blake (ebl...@redhat.com): On 03/18/2014 03:59 PM, Serge Hallyn wrote: Hi, In order to migrate a VM from an older system with qemu-kvm to a newer one with qemu, the newer qemu needs to be told to use the same vga ram size as qemu-kvm used, 8M. virsh domxml-from-native