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

2014-03-19 Thread Ján Tomko
On 03/19/2014 04:17 AM, Chunyan Liu wrote: 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. s/to/from/ Signed-off-by: Chunyan Liu

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

2014-03-19 Thread Ján Tomko
On 03/18/2014 04:00 PM, Daniel P. Berrange wrote: 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.

Re: [libvirt] [PATCH V2 00/13] libxl: add basic support for migration

2014-03-19 Thread Michal Privoznik
On 13.03.2014 23:11, Jim Fehlig wrote: V2 of https://www.redhat.com/archives/libvir-list/2014-March/msg00156.html New in this version: not much. I rebased on the hostdev passthrough changes and added a few 'begin phase' checks to fail early if the domain is not migratable. See 13/13 for

Re: [libvirt] [PATCH V2 13/13] libxl: add migration support

2014-03-19 Thread Michal Privoznik
On 13.03.2014 23:11, Jim Fehlig wrote: This patch adds initial migration support to the libxl driver, using the VIR_DRV_FEATURE_MIGRATION_PARAMS family of migration functions. Signed-off-by: Jim Fehlig jfeh...@suse.com --- V2: - Now that the libxl driver supports hostdev passthrough, ensure

Re: [libvirt] specifying cirrus ram size

2014-03-19 Thread Daniel P. Berrange
On Wed, Mar 19, 2014 at 12:49:06AM -0500, Serge Hallyn wrote: 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

[libvirt] [PATCH] domiftune: Reword bandwidth clearing paragraph

2014-03-19 Thread Michal Privoznik
s/of value/value of/ Signed-off-by: Michal Privoznik mpriv...@redhat.com --- tools/virsh.pod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/virsh.pod b/tools/virsh.pod index 3e721e0..0fb8248 100644 --- a/tools/virsh.pod +++ b/tools/virsh.pod @@ -699,7 +699,7 @@ in a

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

2014-03-19 Thread Michal Privoznik
On 18.03.2014 16:59, Eric Blake wrote: 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.

Re: [libvirt] [PATCH] domiftune: Reword bandwidth clearing paragraph

2014-03-19 Thread Ján Tomko
On 03/19/2014 11:27 AM, Michal Privoznik wrote: s/of value/value of/ Signed-off-by: Michal Privoznik mpriv...@redhat.com --- tools/virsh.pod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ACK from me as well. Jan signature.asc Description: OpenPGP digital signature --

Re: [libvirt] [PATCH] domiftune: Reword bandwidth clearing paragraph

2014-03-19 Thread Jiri Denemark
On Wed, Mar 19, 2014 at 11:27:26 +0100, Michal Privoznik wrote: s/of value/value of/ Signed-off-by: Michal Privoznik mpriv...@redhat.com --- tools/virsh.pod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/virsh.pod b/tools/virsh.pod index 3e721e0..0fb8248

Re: [libvirt] specifying cirrus ram size

2014-03-19 Thread Gerd Hoffmann
On Mi, 2014-03-19 at 10:22 +, Daniel P. Berrange wrote: On Wed, Mar 19, 2014 at 12:49:06AM -0500, Serge Hallyn wrote: 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

Re: [libvirt] Zombie process after open libvirt connection

2014-03-19 Thread Carlos Rodrigues
Hello Michal, I am using libvirt 1.1.3 and perl-Sys-Virt 1.1.3 and perl-5.16 on Fedora 19 x86_64 The zombie process appears after open libvirt connection with qemu-tls, and perl module is binding for libvirt library XS. Here is my running example with zombie process: $ perl

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

2014-03-19 Thread Ian Campbell
On Tue, 2014-03-18 at 15:12 -0600, Jim Fehlig wrote: 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

[libvirt] [PATCH v2 13/16] Use KR style for curly braces in src/network/bridge_driver.c

2014-03-19 Thread Martin Kletzander
Signed-off-by: Martin Kletzander mklet...@redhat.com --- src/network/bridge_driver.c | 54 ++--- 1 file changed, 36 insertions(+), 18 deletions(-) diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index 59b6c09..20930f3 100644 ---

[libvirt] [PATCH v2 01/16] Use KR style for curly braces in tests/

2014-03-19 Thread Martin Kletzander
Signed-off-by: Martin Kletzander mklet...@redhat.com --- tests/commandhelper.c| 5 +++-- tests/qemuargv2xmltest.c | 3 ++- tests/shunloadhelper.c | 5 +++-- tests/testutils.c| 15 +- tests/testutilslxc.c | 3 ++- tests/testutilsqemu.c| 3 ++-

[libvirt] [PATCH v2 03/16] Use KR style for curly braces in src/util/

2014-03-19 Thread Martin Kletzander
Signed-off-by: Martin Kletzander mklet...@redhat.com --- src/util/vircgroup.c | 9 ++--- src/util/virconf.c | 5 +++-- src/util/virdbus.c | 8 +--- src/util/virerror.c | 3 ++- src/util/vireventpoll.c | 29

[libvirt] [PATCH v2 02/16] Use KR style for curly braces in src/xen*/

2014-03-19 Thread Martin Kletzander
Signed-off-by: Martin Kletzander mklet...@redhat.com --- src/xen/xen_driver.c | 6 -- src/xen/xen_hypervisor.c | 5 +++-- src/xen/xm_internal.c | 10 +++--- src/xenapi/xenapi_utils.c | 5 +++-- src/xenxs/xen_xm.c| 35 +++ 5 files

[libvirt] [PATCH v2 04/16] Use KR style for curly braces in src/rpc/

2014-03-19 Thread Martin Kletzander
Signed-off-by: Martin Kletzander mklet...@redhat.com --- src/rpc/virnetserver.c | 8 +--- src/rpc/virnetserverclient.c | 5 +++-- src/rpc/virnettlscontext.c | 5 +++-- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/rpc/virnetserver.c b/src/rpc/virnetserver.c index

[libvirt] [PATCH v2 11/16] Use KR style for curly braces in src/uml/

2014-03-19 Thread Martin Kletzander
Signed-off-by: Martin Kletzander mklet...@redhat.com --- src/uml/uml_conf.c | 5 ++-- src/uml/uml_driver.c | 78 ++-- 2 files changed, 55 insertions(+), 28 deletions(-) diff --git a/src/uml/uml_conf.c b/src/uml/uml_conf.c index 3567b03..53a880f

[libvirt] [PATCH v2 12/16] Use KR style for curly braces in src/lxc/lxc_driver.c

2014-03-19 Thread Martin Kletzander
Signed-off-by: Martin Kletzander mklet...@redhat.com --- src/lxc/lxc_driver.c | 30 -- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c index 1ae04c5..3104bf9 100644 --- a/src/lxc/lxc_driver.c +++

[libvirt] [PATCH v2 16/16] Require KR styled curly braces around function bodies

2014-03-19 Thread Martin Kletzander
Although not explicitly requested, we are using KR (or Kernel) indentation for curly braces around functions in HACKING file and most of the code. Using grep -P, this patch add the syntax-check rule for it (while skipping all the false positives with foreach constructs). Signed-off-by: Martin

[libvirt] [PATCH v2 06/16] Use KR style for curly braces in src/qemu/

2014-03-19 Thread Martin Kletzander
Signed-off-by: Martin Kletzander mklet...@redhat.com --- src/qemu/qemu_agent.c| 5 ++- src/qemu/qemu_command.c | 6 ++- src/qemu/qemu_driver.c | 94 +--- src/qemu/qemu_migration.c| 3 +- src/qemu/qemu_monitor.c | 3 +-

[libvirt] [PATCH v2 08/16] Use KR style for curly braces in src/openvz/

2014-03-19 Thread Martin Kletzander
Signed-off-by: Martin Kletzander mklet...@redhat.com --- src/openvz/openvz_conf.c | 15 ++- src/openvz/openvz_driver.c | 45 ++--- 2 files changed, 40 insertions(+), 20 deletions(-) diff --git a/src/openvz/openvz_conf.c

[libvirt] [PATCH v2 05/16] Use KR style for curly braces in src/conf/

2014-03-19 Thread Martin Kletzander
Signed-off-by: Martin Kletzander mklet...@redhat.com --- src/conf/domain_conf.c | 9 +--- src/conf/domain_nwfilter.c | 13 +++ src/conf/interface_conf.c | 54 ++ src/conf/nwfilter_conf.c | 30 +-

[libvirt] [PATCH v2 14/16] Use KR style for curly braces in src/vbox/

2014-03-19 Thread Martin Kletzander
Signed-off-by: Martin Kletzander mklet...@redhat.com --- src/vbox/vbox_driver.c | 5 +- src/vbox/vbox_tmpl.c | 188 + 2 files changed, 132 insertions(+), 61 deletions(-) diff --git a/src/vbox/vbox_driver.c b/src/vbox/vbox_driver.c index

[libvirt] [PATCH v2 09/16] Use KR style for curly braces in src/nwfilter/

2014-03-19 Thread Martin Kletzander
Signed-off-by: Martin Kletzander mklet...@redhat.com --- src/nwfilter/nwfilter_driver.c| 32 +++- src/nwfilter/nwfilter_ebiptables_driver.c | 3 ++- src/nwfilter/nwfilter_learnipaddr.c | 41 --- 3 files changed, 50 insertions(+),

[libvirt] [PATCH v2 10/16] Use KR style for curly braces in src/test/test_driver.c

2014-03-19 Thread Martin Kletzander
Signed-off-by: Martin Kletzander mklet...@redhat.com --- src/test/test_driver.c | 135 - 1 file changed, 90 insertions(+), 45 deletions(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 5716449..d88d3fc 100644 ---

[libvirt] [PATCH v2 07/16] Use KR style for curly braces in src/storage/

2014-03-19 Thread Martin Kletzander
Signed-off-by: Martin Kletzander mklet...@redhat.com --- src/storage/storage_backend_fs.c | 12 --- src/storage/storage_driver.c | 78 ++-- 2 files changed, 60 insertions(+), 30 deletions(-) diff --git a/src/storage/storage_backend_fs.c

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

2014-03-19 Thread Jiri Denemark
On Tue, Mar 18, 2014 at 09:44:43 -0600, Eric Blake wrote: 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

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

2014-03-19 Thread Martin Kletzander
On Tue, Mar 18, 2014 at 09:45:14PM -0400, Stefan Berger wrote: 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

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

2014-03-19 Thread Stefan Berger
Martin Kletzander mklet...@redhat.com wrote on 03/19/2014 09:13:51 AM: On Tue, Mar 18, 2014 at 09:45:14PM -0400, Stefan Berger wrote: 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

[libvirt] [PATCH] nwfilter: Fix double free of pointer

2014-03-19 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. Avoid putting of the virNWFilterSnoopReq once the thread has been started. It belongs to the thread and the

[libvirt] [PATCH] build: Fix make distcheck

2014-03-19 Thread Martin Kletzander
I forgot to delete the underscore in object_locking_SOURCES when changing the name in one of previous cleanups. Signed-off-by: Martin Kletzander mklet...@redhat.com --- Notes: Pushed as a build-breaker. tests/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[libvirt] [PATCH] tests: Set abs_*dir in a consistent way

2014-03-19 Thread Jiri Denemark
Use $(shell cd $(...) pwd) to set abs_*dir variables similarly to what src/Makefile.am does. Signed-off-by: Jiri Denemark jdene...@redhat.com --- tests/Makefile.am | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/tests/Makefile.am b/tests/Makefile.am index

[libvirt] [PATCH] build: Make sure src/util/virprobe.h is distributed

2014-03-19 Thread Jiri Denemark
Signed-off-by: Jiri Denemark jdene...@redhat.com --- src/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Makefile.am b/src/Makefile.am index 5ff178b..4fdd871 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -137,6 +137,7 @@ UTIL_SOURCES =

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

2014-03-19 Thread Michal Privoznik
On 19.03.2014 00:08, Nehal J Wani wrote: 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

Re: [libvirt] [PATCH] build: Make sure src/util/virprobe.h is distributed

2014-03-19 Thread Daniel P. Berrange
On Wed, Mar 19, 2014 at 02:48:33PM +0100, Jiri Denemark wrote: Signed-off-by: Jiri Denemark jdene...@redhat.com --- src/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Makefile.am b/src/Makefile.am index 5ff178b..4fdd871 100644 --- a/src/Makefile.am +++

[libvirt] [PATCH] conf: consistent comments about disk enum usage

2014-03-19 Thread Eric Blake
Before refactoring this struct, I found it helpful to track which 'int' fields really contain an enum value. * src/conf/domain_conf.h (_virDomainDiskDef): Add comments. Signed-off-by: Eric Blake ebl...@redhat.com --- Pushing under the trivial rule. src/conf/domain_conf.h | 36

[libvirt] [PATCH] qemuDomainAttachDeviceFlags: Parse device xml as inactive

2014-03-19 Thread Michal Privoznik
In all other drivers we are doing so. Moreover, we don't want to parse runtime information in attach (even if the attach is meant as live) because we are generating the runtime info ourselves. We can't trust users they supply sane values anyway. ==1140== 9 bytes in 1 blocks are definitely lost in

Re: [libvirt] [PATCH v2] daemon: Enhance documentation for changing NOFILE limit

2014-03-19 Thread Eric Blake
On 03/19/2014 09:32 AM, Jiri Denemark wrote: Signed-off-by: Jiri Denemark jdene...@redhat.com --- daemon/libvirtd.sysconf | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/daemon/libvirtd.sysconf b/daemon/libvirtd.sysconf index 3af1f03..8b3 100644 ---

[libvirt] [PATCH v2] daemon: Enhance documentation for changing NOFILE limit

2014-03-19 Thread Jiri Denemark
Signed-off-by: Jiri Denemark jdene...@redhat.com --- daemon/libvirtd.sysconf | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/daemon/libvirtd.sysconf b/daemon/libvirtd.sysconf index 3af1f03..8b3 100644 --- a/daemon/libvirtd.sysconf +++ b/daemon/libvirtd.sysconf @@

Re: [libvirt] [PATCH] nwfilter: Fix double free of pointer

2014-03-19 Thread Stefan Berger
On 03/19/2014 09:41 AM, Stefan Berger wrote: 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. Avoid putting of the virNWFilterSnoopReq once the thread has been

[libvirt] [PATCH v2] nwfilter: Fix double free of pointer

2014-03-19 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. Avoid putting of the virNWFilterSnoopReq once the thread has been started. It belongs to the thread and the

[libvirt] [PATCHv2 0/8] Test parsing of iscsiadm output

2014-03-19 Thread Ján Tomko
v1: https://www.redhat.com/archives/libvir-list/2014-March/msg00720.html v2: * instead of using cat, switch RunProgRegex to use a synchronous command and modify the output buffer via a virCommandDryRun callback * move the functions dealing with iscsiadm out of the iscsi backend to src/util

[libvirt] [PATCHv2 1/8] Sort includes in storage_backend_iscsi.c

2014-03-19 Thread Ján Tomko
--- src/storage/storage_backend_iscsi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/storage/storage_backend_iscsi.c b/src/storage/storage_backend_iscsi.c index 2a4e669..0feeb5f 100644 --- a/src/storage/storage_backend_iscsi.c +++

[libvirt] [PATCHv2 3/8] Switch virCommandRunRegex to use virStringSplit

2014-03-19 Thread Ján Tomko
Instead of running the command asynchronously and reading the output via fgets, let virCommand collect the output and split it with virStringSplit. --- src/util/vircommand.c | 41 +++-- 1 file changed, 19 insertions(+), 22 deletions(-) diff --git

Re: [libvirt] [PATCH] Give virNWFilterVarCombIterNext saner semantics

2014-03-19 Thread Stefan Berger
On 03/17/2014 08:34 AM, Daniel P. Berrange wrote: The virNWFilterVarCombIterNext method will free its parameter when it gets to the end of the iterator. This is somewhat misleading design, making it appear as if the caller has a memory leak. Remove the free'ing of the parameter and ensure that

Re: [libvirt] [PATCH] Fix leak on OOM when creating nwfilter rule instances

2014-03-19 Thread Stefan Berger
On 03/17/2014 07:59 AM, Daniel P. Berrange wrote: The ebiptablesAddRuleInst method would leak an instance of ebiptablesRuleInstPtr if it hit OOM when adding it to the list of instances. Remove the pointless helper method virNWFilterRuleInstAddData and just inline the call to VIR_APPEND_ELEMENT

Re: [libvirt] [PATCHv2 6/8] Move functions using iscsiadm to viriscsi.c

2014-03-19 Thread Daniel P. Berrange
On Wed, Mar 19, 2014 at 04:52:31PM +0100, Ján Tomko wrote: diff --git a/src/util/viriscsi.h b/src/util/viriscsi.h new file mode 100644 index 000..462e56a --- /dev/null +++ b/src/util/viriscsi.h @@ -0,0 +1,52 @@ +#ifndef __VIR_ISCSI_H__ +# define __VIR_ISCSI_H__ + +# include

[libvirt] [PATCH 12/18] conf: use disk source accessors in uml/

2014-03-19 Thread Eric Blake
Part of a series of cleanups to use new accessor methods. * src/uml/uml_conf.c (umlBuildCommandLine): Use accessors. * src/uml/uml_driver.c (umlDomainAttachUmlDisk): Likewise. Signed-off-by: Eric Blake ebl...@redhat.com --- src/uml/uml_conf.c | 4 ++-- src/uml/uml_driver.c | 5 +++-- 2 files

[libvirt] [PATCH 05/18] conf: use disk source accessors in libxl/

2014-03-19 Thread Eric Blake
Part of a series of cleanups to use new accessor methods. * src/libxl/libxl_conf.c (libxlMakeDisk): Use accessors. * src/libxl/libxl_driver.c (libxlDomainChangeEjectableMedia) (libxlDomainAttachDeviceDiskLive): Likewise. Signed-off-by: Eric Blake ebl...@redhat.com --- src/libxl/libxl_conf.c |

[libvirt] [PATCH 11/18] conf: use disk source accessors in security/

2014-03-19 Thread Eric Blake
Part of a series of cleanups to use new accessor methods. * src/security/security_dac.c (virSecurityDACSetSecurityImageLabel) (virSecurityDACRestoreSecurityImageLabelInt) (virSecurityDACSetSecurityAllLabel): Use accessors. * src/security/security_selinux.c

[libvirt] [PATCH 00/18] split virDomainDiskDef

2014-03-19 Thread Eric Blake
I still have quite a bit of work to consolidate util/virStorageFile, conf/snapshot_conf.c, and the new struct in this series to all share the same common struct (basically, moving the struct created in this series over to util). But by refactoring the most common accesses to go through functions

[libvirt] [PATCH 04/18] conf: use disk source accessors in esx/

2014-03-19 Thread Eric Blake
Part of a series of cleanups to use new accessor methods. * src/esx/esx_driver.c (esxAutodetectSCSIControllerModel) (esxDomainDefineXML): Use accessors. Signed-off-by: Eric Blake ebl...@redhat.com --- src/esx/esx_driver.c | 26 ++ 1 file changed, 14 insertions(+), 12

[libvirt] [PATCH 13/18] conf: use disk source accessors in vbox/

2014-03-19 Thread Eric Blake
Part of a series of cleanups to use new accessor methods. * src/vbox/vbox_tmpl.c (vboxDomainGetXMLDesc, vboxAttachDrives) (vboxDomainAttachDeviceImpl, vboxDomainDetachDevice): Use accessors. Signed-off-by: Eric Blake ebl...@redhat.com --- src/vbox/vbox_tmpl.c | 137

Re: [libvirt] [PATCH v2] nwfilter: Fix double free of pointer

2014-03-19 Thread Daniel P. Berrange
On Wed, Mar 19, 2014 at 11:47:09AM -0400, Stefan Berger wrote: 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. Avoid putting of the virNWFilterSnoopReq

[libvirt] [PATCH 02/18] conf: use disk source accessors in conf/

2014-03-19 Thread Eric Blake
Part of a series of cleanups to use new accessor methods. Several places in domain_conf.c still open-code raw field access, but that code will be touched later with the diskDef struct split so I'm avoiding churn here. * src/conf/domain_audit.c (virDomainAuditStart): Use accessors. *

[libvirt] [PATCH 06/18] conf: use disk source accessors in locking/

2014-03-19 Thread Eric Blake
Part of a series of cleanups to use new accessor methods. * src/locking/domain_lock.c (virDomainLockManagerAddDisk): Use accessors. Signed-off-by: Eric Blake ebl...@redhat.com --- src/locking/domain_lock.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git

Re: [libvirt] Zombie process after open libvirt connection

2014-03-19 Thread Michal Privoznik
On 19.03.2014 12:10, Carlos Rodrigues wrote: Hello Michal, I am using libvirt 1.1.3 and perl-Sys-Virt 1.1.3 and perl-5.16 on Fedora 19 x86_64 The zombie process appears after open libvirt connection with qemu-tls, and perl module is binding for libvirt library XS. Here is my running example

[libvirt] [PATCH 10/18] conf: use disk source accessors in qemu/

2014-03-19 Thread Eric Blake
Part of a series of cleanups to use new accessor methods. * src/qemu/qemu_conf.c (qemuCheckSharedDevice) (qemuAddSharedDevice, qemuRemoveSharedDevice, qemuSetUnprivSGIO): Use accessors. * src/qemu/qemu_domain.c (qemuDomainDeviceDefPostParse) (qemuDomainObjCheckDiskTaint,

[libvirt] [PATCH 17/18] conf: use disk source accessors in xenxs/

2014-03-19 Thread Eric Blake
Part of a series of cleanups to use new accessor methods. * src/xenxs/xen_sxpr.c (xenParseSxprDisks, xenParseSxpr) (xenFormatSxprDisk, xenFormatSxpr): Use accessors. * src/xenxs/xen_xm.c (xenParseXM, xenFormatXMDisk, xenFormatXM): Likewise. Signed-off-by: Eric Blake ebl...@redhat.com --- This

[libvirt] [PATCH 07/18] conf: use disk source accessors in lxc/

2014-03-19 Thread Eric Blake
Part of a series of cleanups to use new accessor methods. * src/lxc/lxc_cgroup.c (virLXCCgroupSetupDeviceACL): Use accessors. * src/lxc/lxc_controller.c (virLXCControllerSetupLoopDeviceDisk) (virLXCControllerSetupNBDDeviceDisk) (virLXCControllerSetupLoopDevices, virLXCControllerSetupDisk):

[libvirt] [PATCH 09/18] conf: use disk source accessors in phyp/

2014-03-19 Thread Eric Blake
Part of a series of cleanups to use new accessor methods. * src/phyp/phyp_driver.c (phypDomainAttachDevice, phypBuildLpar): Use accessors. Signed-off-by: Eric Blake ebl...@redhat.com --- src/phyp/phyp_driver.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git

[libvirt] [PATCH 15/18] conf: use disk source accessors in vmx/

2014-03-19 Thread Eric Blake
Part of a series of cleanups to use new accessor methods. * src/vmx/vmx.c (virVMXHandleLegacySCSIDiskDriverName) (virVMXParseDisk, virVMXFormatDisk, virVMXFormatFloppy): Use accessors. Signed-off-by: Eric Blake ebl...@redhat.com --- src/vmx/vmx.c | 113

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

2014-03-19 Thread Martin Kletzander
On Wed, Mar 19, 2014 at 10:17:20AM -0600, Laine Stump wrote: On 03/18/2014 01:09 AM, Martin Kletzander wrote: 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:

[libvirt] [PATCH] virNetClientSetTLSSession: Restore original signal mask

2014-03-19 Thread Michal Privoznik
Currently, we use pthread_sigmask(SIG_BLOCK, ...) prior to calling poll(). This is okay, as we don't want poll() to be interrupted. However, then - immediately as we fall out from the poll() - we try to restore the original sigmask - again using SIG_BLOCK. But as the man page says, SIG_BLOCK adds

[libvirt] [PATCH 08/18] conf: use disk source accessors in parallels/

2014-03-19 Thread Eric Blake
Part of a series of cleanups to use new accessor methods. * src/parallels/parallels_driver.c (parallelsGetHddInfo) (parallelsAddHdd, parallelsApplyDisksParams, parallelsCreateVm): Likewise. Signed-off-by: Eric Blake ebl...@redhat.com --- src/parallels/parallels_driver.c | 31

[libvirt] [PATCH 16/18] conf: use disk source accessors in xen/

2014-03-19 Thread Eric Blake
Part of a series of cleanups to use new accessor methods. * src/xen/xend_internal.c (virDomainXMLDevID): Use accessors. Signed-off-by: Eric Blake ebl...@redhat.com --- src/xen/xend_internal.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/xen/xend_internal.c

Re: [libvirt] [PATCH] Fix virQEMUCapsLoadCache leaks

2014-03-19 Thread Martin Kletzander
On Wed, Mar 19, 2014 at 05:17:40PM +0100, Ján Tomko wrote: Valgrind reported leaking of maxCpus and arch strings from virXPathString, as well as the leak of the machineMaxCpus array. Use 'tmp' for the strings we don't want to free, to allow freeing of 'str' in the cleanup label and free

Re: [libvirt] [PATCH V2 13/13] libxl: add migration support

2014-03-19 Thread Jim Fehlig
Michal Privoznik wrote: On 13.03.2014 23:11, Jim Fehlig wrote: This patch adds initial migration support to the libxl driver, using the VIR_DRV_FEATURE_MIGRATION_PARAMS family of migration functions. Signed-off-by: Jim Fehlig jfeh...@suse.com --- V2: - Now that the libxl driver supports

Re: [libvirt] [PATCH] virNetClientSetTLSSession: Restore original signal mask

2014-03-19 Thread Martin Kletzander
On Wed, Mar 19, 2014 at 06:29:01PM +0100, Michal Privoznik wrote: Currently, we use pthread_sigmask(SIG_BLOCK, ...) prior to calling poll(). This is okay, as we don't want poll() to be interrupted. However, then - immediately as we fall out from the poll() - we try to restore the original

Re: [libvirt] [PATCH v2] nwfilter: Fix double free of pointer

2014-03-19 Thread Stefan Berger
Daniel P. Berrange berra...@redhat.com wrote on 03/19/2014 01:24:52 PM: On Wed, Mar 19, 2014 at 11:47:09AM -0400, Stefan Berger wrote: From: Stefan Berger stef...@linux.vnet.ibm.com https://bugzilla.redhat.com/show_bug.cgi?id=1071181 Commit 49b59a15 fixed one problem but masks

Re: [libvirt] [PATCH] virNetClientSetTLSSession: Restore original signal mask

2014-03-19 Thread Eric Blake
On 03/19/2014 11:29 AM, Michal Privoznik wrote: Currently, we use pthread_sigmask(SIG_BLOCK, ...) prior to calling poll(). This is okay, as we don't want poll() to be interrupted. However, then - immediately as we fall out from the poll() - we try to restore the original sigmask - again using

Re: [libvirt] [PATCH] virNetClientSetTLSSession: Restore original signal mask

2014-03-19 Thread Daniel P. Berrange
On Wed, Mar 19, 2014 at 06:29:01PM +0100, Michal Privoznik wrote: Currently, we use pthread_sigmask(SIG_BLOCK, ...) prior to calling poll(). This is okay, as we don't want poll() to be interrupted. However, then - immediately as we fall out from the poll() - we try to restore the original

[libvirt] [PATCHv2] network: fix problems with SRV records

2014-03-19 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] network: fix problems with SRV

2014-03-19 Thread Laine Stump
On 03/18/2014 01:09 AM, Martin Kletzander wrote: 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

Re: [libvirt] Zombie process after open libvirt connection

2014-03-19 Thread Carlos Rodrigues
Thank you Michal, this is good news for me. I'll wait for this patch. Regards, -- Carlos Rodrigues Engenheiro de Software Sénior Eurotux Informática, S.A. | www.eurotux.com (t) +351 253 680 300 (m) +351 911 926 110 On Qua, 2014-03-19 at 18:27 +0100, Michal Privoznik wrote: On 19.03.2014

[libvirt] [PATCH 01/18] conf: accessors for common source information

2014-03-19 Thread Eric Blake
A future patch will split virDomainDiskDef, in order to track multiple host resources per guest disk. To reduce the size of that patch, I've factored out the four most common accesses into functions, so that I can incrementally upgrade the code base to use the accessors, and so that code that

[libvirt] [PATCH 03/18] conf: use disk source accessors in bhyve/

2014-03-19 Thread Eric Blake
Part of a series of cleanups to use new accessor methods. * src/bhyve/bhyve_command.c (bhyveBuildDiskArgStr) (virBhyveProcessBuildLoadCmd): Use accessors. Signed-off-by: Eric Blake ebl...@redhat.com --- I haven't actually compile-tested this one yet, but unless my grep was off, I think I got it

[libvirt] [PATCH 14/18] conf: use disk source accessors in vmware/

2014-03-19 Thread Eric Blake
Part of a series of cleanups to use new accessor methods. While writing this, I also discovered that conversion from XML to vmware modified the disk source in place; if the same code is reached twice, the second call behaves differently because the first call didn't clean up its mess. *

Re: [libvirt] Zombie process after open libvirt connection

2014-03-19 Thread Michal Privoznik
On 19.03.2014 18:55, Carlos Rodrigues wrote: Thank you Michal, this is good news for me. I'll wait for this patch. Regards, I've just pushed it to the repository: commit 3d4b4f5ac634c123af1981084add29d3a2ca6ab0 Author: Michal Privoznik mpriv...@redhat.com AuthorDate: Wed Mar 19

[libvirt] [PATCHv2 4/8] Don't create iscsiadm command line in ISCSIPool{Start, Stop}

2014-03-19 Thread Ján Tomko
Create ISCSIConnection{Login,Logout} wrappers for that. --- src/storage/storage_backend_iscsi.c | 34 -- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/src/storage/storage_backend_iscsi.c b/src/storage/storage_backend_iscsi.c index

[libvirt] [PATCH] Fix virQEMUCapsLoadCache leaks

2014-03-19 Thread Ján Tomko
Valgrind reported leaking of maxCpus and arch strings from virXPathString, as well as the leak of the machineMaxCpus array. Use 'tmp' for the strings we don't want to free, to allow freeing of 'str' in the cleanup label and free machineMaxCpus in virCapsReset too. ---

[libvirt] [PATCHv2 8/8] Add test for virISCSIScanTargets

2014-03-19 Thread Ján Tomko
--- tests/viriscsitest.c | 82 1 file changed, 82 insertions(+) diff --git a/tests/viriscsitest.c b/tests/viriscsitest.c index 0b09834..16a40c7 100644 --- a/tests/viriscsitest.c +++ b/tests/viriscsitest.c @@ -51,6 +51,14 @@ static const char

[libvirt] [PATCHv2 5/8] Remove storage pool from the arguments of a few functions

2014-03-19 Thread Ján Tomko
virStorageBackendISCSISession only needs the path of the source device and virStorageBackendISCSIRescanLUNs doesn't need the pool at all. This will allow the functions to be moved to src/util. --- src/storage/storage_backend_iscsi.c | 18 -- 1 file changed, 12 insertions(+), 6

[libvirt] [PATCHv2 7/8] Add test for virISCSIGetSession

2014-03-19 Thread Ján Tomko
Parse iscsiadm output with and without the recently introduced flashnode info. [1] This should check that commits like 57e17a7 (fixing [2]) do not break iscsiadm output parsing. [1] https://github.com/mikechristie/open-iscsi/commit/181af9a [2] https://bugzilla.redhat.com/show_bug.cgi?id=1067173

[libvirt] Adding support to limit client connections for vnc/spice display driver

2014-03-19 Thread Patil, Tushar
Hello, Greeting!!! We are using KVM hypervisor driver for running OpenStack IaaS. Couple of months back we have reported one security issue [1] in OS. Basically we want to limit on the number of vnc client connections that can be opened by users for a given VM. I know that there is share

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

2014-03-19 Thread Scott Sullivan
On 03/18/2014 01:02 PM, Scott Sullivan wrote: 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] LSN-2013-0021: libvirtd crash during seamless SPICE migration

2014-03-19 Thread Eric Blake
[this is an older issue, but it was just barely assigned a CVE this week] Libvirt Security Notice: LSN-2013-0021 == Summary: libvirtd crash during seamless SPICE migration Reported on: 20130919 Published on: 20130919 Fixed on:

[libvirt] Why using AC_PATH_PROG to detect the location of run-time external programs

2014-03-19 Thread Howard Tsai
Hello, I am wondering why AC_PATH_PROG is used to detect the location of run-time external programs (such as dnsmasq, ovs-vsctl, etc.), and hardcoded the locations in binary. It seems wrong to me. At compile-time, configure script should only determine whether the resulting binary should support

[libvirt] [PATCHv2 6/8] Move functions using iscsiadm to viriscsi.c

2014-03-19 Thread Ján Tomko
Remove the 'StorageBackend' from names of the functions and fix indentation. --- po/POTFILES.in | 1 + src/Makefile.am | 1 + src/libvirt_private.syms| 9 + src/storage/storage_backend_iscsi.c | 498 ++--

[libvirt] [PATCHv2 2/8] Move virStorageBackendRun to vircommand

2014-03-19 Thread Ján Tomko
The only storage-specific parameter is the pool object, which is only used for passing to the callback function. --- src/libvirt_private.syms | 2 + src/storage/storage_backend.c | 249 -- src/storage/storage_backend.h | 22 ---

Re: [libvirt] Why using AC_PATH_PROG to detect the location of run-time external programs

2014-03-19 Thread Eric Blake
On 03/19/2014 03:15 PM, Howard Tsai wrote: Hello, I am wondering why AC_PATH_PROG is used to detect the location of run-time external programs (such as dnsmasq, ovs-vsctl, etc.), and hardcoded the locations in binary. It seems wrong to me. It is only hard-coding the default location of the

Re: [libvirt] [PATCH V2 00/13] libxl: add basic support for migration

2014-03-19 Thread Jim Fehlig
Michal Privoznik wrote: On 13.03.2014 23:11, Jim Fehlig wrote: V2 of https://www.redhat.com/archives/libvir-list/2014-March/msg00156.html New in this version: not much. I rebased on the hostdev passthrough changes and added a few 'begin phase' checks to fail early if the domain is not

Re: [libvirt] [PATCH V2 13/13] libxl: add migration support

2014-03-19 Thread Jim Fehlig
Michal Privoznik wrote: On 13.03.2014 23:11, Jim Fehlig wrote: This patch adds initial migration support to the libxl driver, using the VIR_DRV_FEATURE_MIGRATION_PARAMS family of migration functions. Signed-off-by: Jim Fehlig jfeh...@suse.com --- V2: - Now that the libxl driver supports

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

2014-03-19 Thread qiaonuo...@cn.fujitsu.com
Hello, Do you have some comments? On 03/18/2014 03:12 PM, Qiao, Nuohan/乔 诺涵 wrote: 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

Re: [libvirt] [PATCH 03/18] conf: use disk source accessors in bhyve/

2014-03-19 Thread Roman Bogorodskiy
Eric Blake wrote: Part of a series of cleanups to use new accessor methods. * src/bhyve/bhyve_command.c (bhyveBuildDiskArgStr) (virBhyveProcessBuildLoadCmd): Use accessors. Signed-off-by: Eric Blake ebl...@redhat.com This patch builds fine for me. I also did a basic testing and didn't