Re: [libvirt] [PATCHv1.5 04/27] qemuxml2argv: Add test for disk type='volume' with iSCSI pools

2013-11-27 Thread Osier Yang
On 27/11/13 00:48, Peter Krempa wrote: Tweak the existing file so that it can be tested for command line corectness. It's actually lots of change, should provide detailed commit log. --- src/conf/domain_conf.h | 1 + src/libvirt_private.syms

[libvirt] [PATCH] qemu: add support for -device pvpanic

2013-11-27 Thread Hu Tao
qemu removes the builtin pvpanic device for all qemu versions since 1.7, in order to support on_crash, '-device pvpanic' has to be added to qemu command line. Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- src/qemu/qemu_capabilities.c | 8 src/qemu/qemu_capabilities.h | 2 ++

Re: [libvirt] [PATCH] Memory Leak Fix: Check def-info-alias before assigning

2013-11-27 Thread Daniel P. Berrange
On Wed, Nov 27, 2013 at 04:01:45AM +0530, Nehal J Wani wrote: On running the command make -C tests valgrind, there used to be a bunch of memory leaks shown by valgrind. Specifically, one can check it by running: libtool --mode=execute valgrind --quiet --leak-check=full

Re: [libvirt] virDomain{Attach, Detach, Update}DeviceFlags filesystem support for qemu driver

2013-11-27 Thread Daniel P. Berrange
On Tue, Nov 26, 2013 at 07:08:07PM -0600, Jesse Cook wrote: It does not currently appear to be possible to attach/detach a filesystem with kvm through the C API or virsh. Looking at src/qemu/qemu_driver.c:qemuDomain{Attach,Detach,Update}Config, VIR_DOMAIN_DEVICE_FS is not a case within the

Re: [libvirt] [PATCH] libvirt-perl: Fix the wrong binding of virNodeDeviceLookupSCSIHostByWWN

2013-11-27 Thread Daniel P. Berrange
On Wed, Nov 27, 2013 at 03:04:26PM +0800, Osier Yang wrote: The second parameter for virNodeDeviceLookupSCSIHostByWWN is wwnn instead of wwpn, and the API supports flags. --- AUTHORS| 1 + lib/Sys/Virt/NodeDevice.pm | 5 +++-- 2 files changed, 4 insertions(+), 2

Re: [libvirt] [PATCH] Memory Leak Fix: Check def-info-alias before assigning

2013-11-27 Thread Nehal J Wani
The 'alias' attribute should *not* be parsed from the XML provided by the user. It should only be parsed in the live state XML. In the latter case no codepath should take us to qemuAssignDeviceAliases. So this is certainly not the right fix. It sounds like the test case is flawed to me. Does

Re: [libvirt] [PATCHv1.5 04/27] qemuxml2argv: Add test for disk type='volume' with iSCSI pools

2013-11-27 Thread Peter Krempa
On 11/27/13 09:29, Osier Yang wrote: On 27/11/13 00:48, Peter Krempa wrote: Tweak the existing file so that it can be tested for command line corectness. It's actually lots of change, should provide detailed commit log. Hmmm, this patch actually should only touch the test files, but I

Re: [libvirt] [PATCHv1.5 02/27] test: Implement fake storage pool driver in qemuxml2argv test

2013-11-27 Thread Peter Krempa
On 11/27/13 08:47, Osier Yang wrote: On 27/11/13 00:48, Peter Krempa wrote: To support testing of volume disk backing, we need to implement a few disk driver backend functions. The fake storage driver uses files in storagepoolxml2xmlout/POOLNAME.xml as XML files for pool definitions and

Re: [libvirt] [PATCH] Memory Leak Fix: Check def-info-alias before assigning

2013-11-27 Thread Daniel P. Berrange
On Wed, Nov 27, 2013 at 03:08:18PM +0530, Nehal J Wani wrote: The 'alias' attribute should *not* be parsed from the XML provided by the user. It should only be parsed in the live state XML. In the latter case no codepath should take us to qemuAssignDeviceAliases. So this is certainly not

Re: [libvirt] [PATCH] qemu: add support for -device pvpanic

2013-11-27 Thread Peter Krempa
On 11/27/13 09:41, Hu Tao wrote: qemu removes the builtin pvpanic device for all qemu versions since 1.7, in order to support on_crash, '-device pvpanic' has to be added to qemu command line. Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- src/qemu/qemu_capabilities.c | 8

[libvirt] [PATCH] Make virsh command 'domxml-to-native' copy the MAC addr parsed from XML

2013-11-27 Thread mars
From: Bing Bu Cao m...@linux.vnet.ibm.com virsh command 'domxml-to-native' did not copy the MAC address which parsed from a domain xml, in the commandline the MAC addr of network device always was 00:00:00:00:00:00. This patch fix it. Signed-off-by: Bing Bu Cao m...@linux.vnet.ibm.com ---

Re: [libvirt] [PATCH python] Avoid generating the migrate methods in multiple classes

2013-11-27 Thread Daniel P. Berrange
On Tue, Nov 26, 2013 at 01:00:38PM -0700, Eric Blake wrote: On 11/26/2013 10:00 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The python code generator tries to figure out what class a method should be in by looking at the list of arguments for any which

Re: [libvirt] [PATCH python] Add missing binding of security model/label APIs

2013-11-27 Thread Daniel P. Berrange
On Tue, Nov 26, 2013 at 01:17:16PM -0700, Eric Blake wrote: On 11/26/2013 11:32 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The virNodeGetSecurityModel, virDomainGetSecurityLabel and virDomainGetSecurityLabelList methods were disabled in the python

Re: [libvirt] [PATCHv1.5 24/27] qemu: snapshots: Declare supported and unsupported snapshot configs

2013-11-27 Thread Michal Privoznik
On 26.11.2013 17:49, Peter Krempa wrote: Currently the snapshot code did not check if it actually supports snapshots on various disk backends for domains. To avoid future problems add checkers that whitelist the supported configurations. --- src/qemu/qemu_driver.c | 264

Re: [libvirt] [PATCHv1.5 20/27] conf: Add helper do clear disk source authentication struct

2013-11-27 Thread Michal Privoznik
On 26.11.2013 17:49, Peter Krempa wrote: Add virDomainDiskAuthClear to help cleaning out the struct in other places too. --- src/conf/domain_conf.c | 17 ++--- src/conf/domain_conf.h | 1 + src/libvirt_private.syms | 1 + 3 files changed, 16 insertions(+), 3 deletions(-)

Re: [libvirt] [PATCHv1.5 22/27] qemu: snapshot: Touch up error message

2013-11-27 Thread Michal Privoznik
On 26.11.2013 17:49, Peter Krempa wrote: --- src/qemu/qemu_driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index d2dbaf5..96bc87e 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -11858,8

Re: [libvirt] [PATCHv1.5 16/27] snapshot: conf: Use common parsing and formatting functions for source

2013-11-27 Thread Michal Privoznik
On 26.11.2013 17:48, Peter Krempa wrote: Disk source elements for snapshots were using separate code from our config parser. As snapshots can be stored on more than just regular files, we will need the universal parser to allow us to expose a variety of snapshot disk targets. This patch reuses

[libvirt] [PATCH python] Skip copying manually written python for C APIs which don't exist

2013-11-27 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com If the libvirt-override-vir.py file has methods which call C APIs that don't exist in the version of libvirt built against we need to skip copying their code. eg for 0.9.13 libvirt we should not copy the 'listAllDomains' method. The way this

Re: [libvirt] [PATCHv1.5 23/27] qemu: snapshot: Add functions similar to disk source pool translation

2013-11-27 Thread Michal Privoznik
On 26.11.2013 17:49, Peter Krempa wrote: To avoid future pain, add placeholder functions to get the actual snapshot disk type. --- src/qemu/qemu_conf.c | 23 +++ src/qemu/qemu_conf.h | 6 ++ 2 files changed, 29 insertions(+) diff --git a/src/qemu/qemu_conf.c

Re: [libvirt] [PATCHv1.5 18/27] conf: Add functions to copy and free network disk source definitions

2013-11-27 Thread Michal Privoznik
On 26.11.2013 17:49, Peter Krempa wrote: To simplify operations on virDomainDiskHostDef arrays we will need deep copy and freeing functions. Add and properly export them. --- src/conf/domain_conf.c | 55 +--- src/conf/domain_conf.h | 3 +++

Re: [libvirt] [PATCHv1.5 14/27] conf: Split out seclabel formating code for disk source

2013-11-27 Thread Michal Privoznik
On 26.11.2013 17:48, Peter Krempa wrote: The code is common for all the various disk types. Split it out to a common function. --- src/conf/domain_conf.c | 62 -- 1 file changed, 30 insertions(+), 32 deletions(-) ACK Michal --

Re: [libvirt] [PATCHv1.5 12/27] conf: Support disk source formatting without needing a virDomainDiskDefPtr

2013-11-27 Thread Michal Privoznik
On 26.11.2013 17:48, Peter Krempa wrote: The source element formatting function was expecting a virDomainDiskDefPtr to store the data. As snapshots are not using this data structure to hold the data, we need to add an internal function which splits out individual fields separately. ---

[libvirt] [PATCH python] Deal with old filenames for events/error functions

2013-11-27 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Older libvirt has files named 'events' and 'virterror' rather than 'virevent' and 'virerror'. This is visible in the API XML files. We must look for both names to ensure we don't loose generation of methods with older versions of libvirt.

Re: [libvirt] [PATCHv1.5 21/27] qemu: Clear old translated pool source

2013-11-27 Thread Michal Privoznik
On 26.11.2013 17:49, Peter Krempa wrote: Clear the old data to avoid leaking it when attempting to re-translate a pool on the same domain object. --- src/qemu/qemu_conf.c | 4 1 file changed, 4 insertions(+) diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index

Re: [libvirt] [PATCHv1.5 15/27] conf: Export disk source formatter and parser

2013-11-27 Thread Michal Privoznik
On 26.11.2013 17:48, Peter Krempa wrote: This code will be reused in the snapshot disk definition parser. --- src/conf/domain_conf.c | 4 ++-- src/conf/domain_conf.h | 20 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/src/conf/domain_conf.c

Re: [libvirt] [PATCHv1.5 17/27] snapshot: conf: Fix NULL dereference when driver element is empty

2013-11-27 Thread Michal Privoznik
On 26.11.2013 17:48, Peter Krempa wrote: Consider the following valid snapshot XML as the driver element is allowed to be empty in the domainsnapshot.rng schema: $ cat snap.xml domainsnapshot disks disk name='vda' snapshot='external' source file='/tmp/foo'/ driver/

Re: [libvirt] [PATCHv1.5 09/27] qemu: Split out NBD command generation

2013-11-27 Thread Michal Privoznik
On 26.11.2013 17:48, Peter Krempa wrote: --- src/qemu/qemu_command.c | 117 +--- 1 file changed, 61 insertions(+), 56 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 6ba8df9..15a6e9b 100644 ---

Re: [libvirt] [PATCHv1.5 10/27] qemu: Unify formatting of RBD sources

2013-11-27 Thread Michal Privoznik
On 26.11.2013 17:48, Peter Krempa wrote: --- src/qemu/qemu_command.c | 155 +++- 1 file changed, 61 insertions(+), 94 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 15a6e9b..799209d 100644 ---

Re: [libvirt] [PATCHv1.5 19/27] qemu: snapshot: Detect internal snapshots also for sheepdog and RBD

2013-11-27 Thread Michal Privoznik
On 26.11.2013 17:49, Peter Krempa wrote: When doing an internal snapshot on a VM with sheepdog or RBD disks we would not set a flag to mark the domain is using internal snapshots and might end up creating a mixed snapshot. Move the setting of the variable to avoid this problem. ---

[libvirt] [PATCH python] Fix code for avoiding overrides of non-existant functions

2013-11-27 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com When reading/writing a global variable from inside a method it must be declared as a global, otherwise a local variable by the same name will be used. Special case the virConnectListDomainsID method which is bizarrely renamed for no obvious reason.

Re: [libvirt] [PATCHv1.5 13/27] conf: Clean up virDomainDiskSourceDefFormatInternal

2013-11-27 Thread Michal Privoznik
On 26.11.2013 17:48, Peter Krempa wrote: Avoid if statements when used with virBufferEscapeString which automaticaly omits the whole string. Also add some line breaks to visualy separate the code. --- src/conf/domain_conf.c | 48 1 file

Re: [libvirt] [PATCHv1.5 11/27] qemu: Refactor disk source string formatting

2013-11-27 Thread Michal Privoznik
On 26.11.2013 17:48, Peter Krempa wrote: --- src/qemu/qemu_command.c | 128 1 file changed, 86 insertions(+), 42 deletions(-) ACK Michal -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] [PATCHv1.5 08/27] qemu: Migrate sheepdog source generation into common function

2013-11-27 Thread Michal Privoznik
On 26.11.2013 17:48, Peter Krempa wrote: --- src/qemu/qemu_command.c | 37 - 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 09ebd00..6ba8df9 100644 --- a/src/qemu/qemu_command.c

Re: [libvirt] [PATCH python] Improve quality of sanitytest check

2013-11-27 Thread Daniel P. Berrange
On Tue, Nov 26, 2013 at 01:16:24PM -0600, Doug Goldstein wrote: On Tue, Nov 26, 2013 at 12:32 PM, Daniel P. Berrange berra...@redhat.com wrote: From: Daniel P. Berrange berra...@redhat.com Validate that every public API method is mapped into the python and that every python method has a

[libvirt] [PATCH python] Fix misc RPM specfile flaws

2013-11-27 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Fix the RPM summary line, add placeholder %changelog tag, make %setup quiet, add Url: tag and filter out bogus provides and add example programs as docs. Signed-off-by: Daniel P. Berrange berra...@redhat.com --- libvirt-python.spec.in | 13

Re: [libvirt] [PATCH] Make virsh command 'domxml-to-native' copy the MAC addr parsed from XML

2013-11-27 Thread Laine Stump
On 11/27/2013 12:52 PM, m...@linux.vnet.ibm.com wrote: From: Bing Bu Cao m...@linux.vnet.ibm.com virsh command 'domxml-to-native' did not copy the MAC address which parsed from a domain xml, in the commandline the MAC addr of network device always was 00:00:00:00:00:00. This patch fix it.

[libvirt] What to do about the qemu -boot strict option

2013-11-27 Thread Laine Stump
Awhile back a bug was filed against libvirt about the inability to completely exclude a disk from the boot order: https://bugzilla.redhat.com/show_bug.cgi?id=888635 In short, you can't have a domain that used PXE to boot, but also has an un-bootable disk device *even if that disk isn't listed

Re: [libvirt] [PATCH] qemu: add support for -device pvpanic

2013-11-27 Thread Eric Blake
On 11/27/2013 03:39 AM, Peter Krempa wrote: On 11/27/13 09:41, Hu Tao wrote: qemu removes the builtin pvpanic device for all qemu versions since 1.7, in order to support on_crash, '-device pvpanic' has to be added to qemu command line. Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- I

Re: [libvirt] [PATCH python] Deal with old filenames for events/error functions

2013-11-27 Thread Eric Blake
On 11/27/2013 04:14 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Older libvirt has files named 'events' and 'virterror' rather than 'virevent' and 'virerror'. This is visible in the API XML files. We must look for both names to ensure we don't loose generation

Re: [libvirt] [PATCH python] Fix code for avoiding overrides of non-existant functions

2013-11-27 Thread Eric Blake
On 11/27/2013 04:14 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com When reading/writing a global variable from inside a method it must be declared as a global, otherwise a local variable by the same name will be used. Special case the virConnectListDomainsID

Re: [libvirt] What to do about the qemu -boot strict option

2013-11-27 Thread Jiri Denemark
On Wed, Nov 27, 2013 at 14:37:02 +0200, Laine Stump wrote: Awhile back a bug was filed against libvirt about the inability to completely exclude a disk from the boot order: https://bugzilla.redhat.com/show_bug.cgi?id=888635 In short, you can't have a domain that used PXE to boot, but

Re: [libvirt] [PATCH python] Fix misc RPM specfile flaws

2013-11-27 Thread Eric Blake
On 11/27/2013 04:58 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Fix the RPM summary line, add placeholder %changelog tag, make %setup quiet, add Url: tag and filter out bogus provides and add example programs as docs. Signed-off-by: Daniel P. Berrange

Re: [libvirt] What to do about the qemu -boot strict option

2013-11-27 Thread Daniel P. Berrange
On Wed, Nov 27, 2013 at 02:37:02PM +0200, Laine Stump wrote: Awhile back a bug was filed against libvirt about the inability to completely exclude a disk from the boot order: https://bugzilla.redhat.com/show_bug.cgi?id=888635 In short, you can't have a domain that used PXE to boot, but

Re: [libvirt] [PATCH] storage: skip selinux cleanup when fd not available

2013-11-27 Thread Eric Blake
On 11/26/2013 11:43 PM, Osier Yang wrote: On 27/11/13 12:00, Eric Blake wrote: When attempting to backport gluster pools to an older version where there is no VIR_STRDUP, I got a crash from calling strdup(,NULL). Rather than relying on the current else branch safely doing nothing when there

Re: [libvirt] [PATCHv1.5 01/27] conf: Export virStorageVolType enum helper functions

2013-11-27 Thread Peter Krempa
On 11/26/13 19:31, Michal Privoznik wrote: On 26.11.2013 17:48, Peter Krempa wrote: Export string conversion from and to the virStorageVolType enum. --- src/libvirt_private.syms | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index

[libvirt] [PATCHv2 0/4] Refactor pool source formatting

2013-11-27 Thread Peter Krempa
A subset of the big gluster snapshot series. I accidentaly squashed two patches together so I'm reposting the subset that was broken for re-review. Peter Krempa (4): test: Implement fake storage pool driver in qemuxml2argv test qemuxml2argv: Add test to verify correct usage of disk

[libvirt] [PATCHv2 4/4] qemu: Refactor qemuTranslatePool source

2013-11-27 Thread Peter Krempa
Before this patch, the translation function still needs a second ugly helper function to actually format the command line for qemu. But if we do the right stuff in the translation functio, we don't have to bother with the second function any more. This patch removes the messy

[libvirt] [PATCHv2 1/4] test: Implement fake storage pool driver in qemuxml2argv test

2013-11-27 Thread Peter Krempa
To support testing of volume disk backing, we need to implement a few disk driver backend functions. The fake storage driver uses files in storagepoolxml2xmlout/POOLNAME.xml as XML files for pool definitions and volume names are in format VOL_TYPE+VOL_PATH. By default type block is assumed (for

[libvirt] [PATCHv2 2/4] qemuxml2argv: Add test to verify correct usage of disk type=volume

2013-11-27 Thread Peter Krempa
Tweak the existing file to test command line generator too. --- tests/qemuxml2argvdata/qemuxml2argv-disk-source-pool.args | 8 tests/qemuxml2argvdata/qemuxml2argv-disk-source-pool.xml | 2 +- tests/qemuxml2argvtest.c | 2 ++ 3 files changed, 11

Re: [libvirt] [PATCH python] Deal with old filenames for events/error functions

2013-11-27 Thread Doug Goldstein
On Nov 27, 2013, at 6:14 AM, Daniel P. Berrange berra...@redhat.com wrote: From: Daniel P. Berrange berra...@redhat.com Older libvirt has files named 'events' and 'virterror' rather than 'virevent' and 'virerror'. This is visible in the API XML files. We must look for both names to

[libvirt] [PATCHv2 3/4] qemuxml2argv: Add test for disk type='volume' with iSCSI pools

2013-11-27 Thread Peter Krempa
Tweak the existing file so that it can be tested for command line corectness. --- tests/qemuxml2argvdata/qemuxml2argv-disk-source-pool-mode.args | 10 ++ tests/qemuxml2argvdata/qemuxml2argv-disk-source-pool-mode.xml | 4 ++-- tests/qemuxml2argvtest.c

Re: [libvirt] [PATCH python] Improve quality of sanitytest check

2013-11-27 Thread Doug Goldstein
On Nov 27, 2013, at 6:19 AM, Daniel P. Berrange berra...@redhat.com wrote: On Tue, Nov 26, 2013 at 01:16:24PM -0600, Doug Goldstein wrote: On Tue, Nov 26, 2013 at 12:32 PM, Daniel P. Berrange berra...@redhat.com wrote: From: Daniel P. Berrange berra...@redhat.com Validate that every

Re: [libvirt] [PATCH] Memory Leak Fix: Check def-info-alias before assigning

2013-11-27 Thread Eric Blake
On 11/27/2013 08:34 AM, Nehal J Wani wrote: The 'alias' attribute should *not* be parsed from the XML provided by the user. It should only be parsed in the live state XML. In the latter case no codepath should take us to qemuAssignDeviceAliases. So this is certainly not the right fix. It

Re: [libvirt] [PATCH] Memory Leak Fix: Check def-info-alias before assigning

2013-11-27 Thread Daniel P. Berrange
On Wed, Nov 27, 2013 at 09:04:17PM +0530, Nehal J Wani wrote: The 'alias' attribute should *not* be parsed from the XML provided by the user. It should only be parsed in the live state XML. In the latter case no codepath should take us to qemuAssignDeviceAliases. So this is certainly not

Re: [libvirt] [PATCHv1.5 06/27] qemu: Simplify call pattern of qemuBuildDriveURIString

2013-11-27 Thread Peter Krempa
On 11/26/13 19:30, Michal Privoznik wrote: On 26.11.2013 17:48, Peter Krempa wrote: Automatically assign secret type from the disk source definition and pull in adding of the comma. Then update callers to keep generated output the same. --- src/qemu/qemu_command.c | 34

[libvirt] [PATCH 2/3] Pull lxcContainerGetSubtree out into shared virfile module

2013-11-27 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Move the code for lxcContainerGetSubtree into the virfile module creating 2 new functions int virFileGetMountSubtree(const char *mtabpath, const char *prefix, char ***mountsret,

[libvirt] [PATCH 1/3] Remove 'abs_srcdir' variable from test files

2013-11-27 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Define 'abs_srcdir' in AM_CFLAGS, just as we do for 'abs_builddir'. This lets test files write code like abs_srcdir /some/file and thus avoid the tedium of virAsprintf() to build paths in some places. Signed-off-by: Daniel P. Berrange

[libvirt] [PATCH 0/3] Fix unmounting of dirs in LXC code

2013-11-27 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Dan Walsh identified that if you ask LXC to mount both /etc/aliases and /etc/aliases.db in the container you only end up with one of them mounted. This was due to a bogus subpath check. It is a one line fix which turned into a much bigger series so

[libvirt] [PATCH 3/3] Fix bug in identifying sub-mounts

2013-11-27 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com The code for extracting sub-mounts would just do a STRPREFIX check on the mount. This was flawed because if there were the following mounts /etc/aliases /etc/aliases.db and '/etc/aliases' was asked for, it would return both even though the latter

[libvirt] [PATCH] network: properly update iptables rules during net-update

2013-11-27 Thread Laine Stump
This patch resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1035336 The basic problem is that during a network update, the required iptables rules sometimes change, and this was being handled by simply removing and re-adding the rules. However, the removal of the old rules was done based

[libvirt] [PATCH] Remove invalid parsing of pty path from XML for PTY type chardevs

2013-11-27 Thread Nehal J Wani
While running valgrind on the qemuhotplugtest, one of the many memory leaks detected are: ==3915== 12 bytes in 1 blocks are definitely lost in loss record 36 of 129 ==3915==at 0x4A0887C: malloc (vg_replace_malloc.c:270) ==3915==by 0x34268AF275: xmlStrndup (in /usr/lib64/libxml2.so.2.9.1)

Re: [libvirt] [PATCH] Remove invalid parsing of pty path from XML for PTY type chardevs

2013-11-27 Thread Daniel P. Berrange
On Thu, Nov 28, 2013 at 12:17:31AM +0530, Nehal J Wani wrote: While running valgrind on the qemuhotplugtest, one of the many memory leaks detected are: ==3915== 12 bytes in 1 blocks are definitely lost in loss record 36 of 129 ==3915==at 0x4A0887C: malloc (vg_replace_malloc.c:270)

Re: [libvirt] [PATCH] Remove invalid parsing of pty path from XML for PTY type chardevs

2013-11-27 Thread Nehal J Wani
NACK, this is completely wrong. I said the *XML parsing* was likely to be wrong. This is the QEMU monitor code you've deleted. Oh! Apologies for misunderstanding. If I am not wrong (again :'() , is this the code you are talking about? (inside virDomainChrSourceDefParseXML())

[libvirt] [PATCH] tests: guarantee abs_srcdir in all C tests

2013-11-27 Thread Eric Blake
While trying to debug a failure of virpcitest during 'make distcheck', I noticed that with a VPATH build, 'cd tests; ./virpcitest' fails for an entirely different reason. To reproduce the distcheck failure, I had to run 'cd tests; abs_srcdir=/path/to/src ./virpcitest'. But we document in HACKING

Re: [libvirt] [PATCH] tests: guarantee abs_srcdir in all C tests

2013-11-27 Thread Eric Blake
On 11/27/2013 02:39 PM, Eric Blake wrote: While trying to debug a failure of virpcitest during 'make distcheck', I noticed that with a VPATH build, 'cd tests; ./virpcitest' fails for an entirely different reason. To reproduce the distcheck failure, I had to run 'cd tests;

[libvirt] [PATCH] tests: fix virpcitest with read-only srcdir

2013-11-27 Thread Eric Blake
'make distcheck' has been broken since commit 21685c9; basically, it emulates the case of a read-only $(srcdir) (such as building from a tarball exploded onto a CD-ROM), but we were creating our fake pci device as a symlink into $(srcdir) and failing when that requires opening the config file for

Re: [libvirt] [PATCH] network: properly update iptables rules during net-update

2013-11-27 Thread Eric Blake
On 11/27/2013 11:03 AM, Laine Stump wrote: This patch resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1035336 The basic problem is that during a network update, the required iptables rules sometimes change, and this was being handled by simply removing and re-adding the rules.

Re: [libvirt] [PATCH 1/3] Remove 'abs_srcdir' variable from test files

2013-11-27 Thread Eric Blake
On 11/27/2013 09:31 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Define 'abs_srcdir' in AM_CFLAGS, just as we do for 'abs_builddir'. This lets test files write code like abs_srcdir /some/file and thus avoid the tedium of virAsprintf() to build paths in

Re: [libvirt] [PATCH 2/3] Pull lxcContainerGetSubtree out into shared virfile module

2013-11-27 Thread Eric Blake
On 11/27/2013 09:31 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Move the code for lxcContainerGetSubtree into the virfile module creating 2 new functions int virFileGetMountSubtree(const char *mtabpath, const char *prefix,

Re: [libvirt] [PATCH] tests: Make pci config files writable

2013-11-27 Thread Eric Blake
On 11/25/2013 08:20 AM, Eric Blake wrote: On 11/25/2013 07:24 AM, Daniel P. Berrange wrote: object-locking-files.txt + +# Some tests tend to write into files. Notably, the virpcitest, which detach +# and reset a pci device (achieved byt writing into a pci config file). +check-local:

Re: [libvirt] [PATCH 3/3] Fix bug in identifying sub-mounts

2013-11-27 Thread Eric Blake
On 11/27/2013 09:31 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The code for extracting sub-mounts would just do a STRPREFIX check on the mount. This was flawed because if there were the following mounts /etc/aliases /etc/aliases.db and '/etc/aliases'

Re: [libvirt] What to do about the qemu -boot strict option

2013-11-27 Thread Amos Kong
On Wed, Nov 27, 2013 at 02:37:02PM +0200, Laine Stump wrote: Awhile back a bug was filed against libvirt about the inability to completely exclude a disk from the boot order:    https://bugzilla.redhat.com/show_bug.cgi?id=888635 In short, you can't have a domain that used PXE to boot, but

[libvirt] Release candidate 2 for 1.2.0 is available

2013-11-27 Thread Daniel Veillard
I have tagged rc2 in gits and pushed the tarballs and rpms to ftp://libvirt.org/libvirt/ Seems to build and work fine for me, but please continue testing. I'm very likely to make 1.2.0 final early on Monday. Beside the usual testing it would be good if people who asked to separate

Re: [libvirt] [test-API][PATCH V2] Add blockjob related test functions and cases

2013-11-27 Thread Guannan Ren
On 2013年11月27日 10:56, Jincheng Miao wrote: * repos/domain/blkstatsflags.py * repos/domain/block_iotune.py * repos/domain/block_peek.py * repos/domain/block_resize.py * repos/domain/domain_blkio.py * cases/basic_blockjob.conf V1-V2: Removed diskpath params for

Re: [libvirt] [test-API][PATCH V2] Add blockjob related test functions and cases

2013-11-27 Thread Guannan Ren
On 2013年11月28日 13:25, Guannan Ren wrote: On 2013年11月27日 10:56, Jincheng Miao wrote: * repos/domain/blkstatsflags.py * repos/domain/block_iotune.py * repos/domain/block_peek.py * repos/domain/block_resize.py * repos/domain/domain_blkio.py * cases/basic_blockjob.conf V1-V2:

Re: [libvirt] [test-API][PATCH V2] Add blockjob related test functions and cases

2013-11-27 Thread Jincheng Miao
- Original Message - I know the reason, the fix to the issue can be found in another patch. One thing you should notice, every patch should not break the running of existed testcases. If this patch is based on other patch. you should send the two patches in a set. OK, I will send a

Re: [libvirt] [PATCH] libvirt-perl: Fix the wrong binding of virNodeDeviceLookupSCSIHostByWWN

2013-11-27 Thread Osier Yang
On 27/11/13 17:29, Daniel P. Berrange wrote: On Wed, Nov 27, 2013 at 03:04:26PM +0800, Osier Yang wrote: The second parameter for virNodeDeviceLookupSCSIHostByWWN is wwnn instead of wwpn, and the API supports flags. --- AUTHORS| 1 + lib/Sys/Virt/NodeDevice.pm | 5 +++--