Re: [libvirt] [PATCH] nodeinfo: avoid uninitialized variable on error

2014-06-11 Thread Michal Privoznik
On 11.06.2014 00:27, Eric Blake wrote: Commit 8ba0a58 introduced a compiler warning that I hit during a run of ./autobuild.sh: ../../src/nodeinfo.c: In function 'nodeCapsInitNUMA': ../../src/nodeinfo.c:1853:43: error: 'nsiblings' may be used uninitialized in this function

Re: [libvirt] [PATCH v3 2/2] maint: prohibit empty first lines

2014-06-11 Thread Martin Kletzander
On Tue, Jun 10, 2014 at 01:21:49PM -0600, Eric Blake wrote: On 06/10/2014 12:18 PM, Roman Bogorodskiy wrote: +sc_prohibit_empty_first_line: + @awk 'BEGIN { fail=0; } \ + FNR == 1 { if ($$0 == ) { print FILENAME :1:; fail=1; } } \ +

Re: [libvirt] [PATCH v2 0/4] Expose link state speed

2014-06-11 Thread Laine Stump
On 06/10/2014 08:19 PM, Michal Privoznik wrote: On 05.06.2014 17:39, Michal Privoznik wrote: While the 1/4 was ACKed, I'm sending int for completeness. And I've made a tiny change: the link speed is no longer unsigned long but unsigned int instead. That'll do too and it consumes less memory.

Re: [libvirt] [PATCH v2 0/4] Expose link state speed

2014-06-11 Thread Michal Privoznik
On 11.06.2014 10:02, Laine Stump wrote: On 06/10/2014 08:19 PM, Michal Privoznik wrote: On 05.06.2014 17:39, Michal Privoznik wrote: While the 1/4 was ACKed, I'm sending int for completeness. And I've made a tiny change: the link speed is no longer unsigned long but unsigned int instead.

Re: [libvirt] [PATCH] maint: exempt graphic binaries from syntax check

2014-06-11 Thread Martin Kletzander
On Tue, Jun 10, 2014 at 01:39:03PM -0600, Eric Blake wrote: Roman Bogorodskiy reported a syntax-check failure when using FreeBSD; complaining that: prohibit_empty_first_line tools/libvirt_win_icon_16x16.ico:1: tools/libvirt_win_icon_32x32.ico:1: tools/libvirt_win_icon_48x48.ico:1:

[libvirt] [PATCH 2/3] build: remove ssp-buffer-size

2014-06-11 Thread Ján Tomko
This option only makes sense for -fstack-protector. With -fstack-protector-all or -fstack-protector-strong, functions are protected regardless of buffer size. https://bugzilla.redhat.com/show_bug.cgi?id=1105456 --- m4/virt-compile-warnings.m4 | 13 - 1 file changed, 4 insertions(+),

[libvirt] [PATCH 0/3] build: use -fstack-protector-strong

2014-06-11 Thread Ján Tomko
Tested with gcc-4.9.0 and clang-3.4.1. Ján Tomko (3): build: remove duplicit warning suppression build: remove ssp-buffer-size build: prefer -fstack-protector-strong to -all m4/virt-compile-warnings.m4 | 36 +--- 1 file changed, 21 insertions(+), 15

[libvirt] [PATCH 3/3] build: prefer -fstack-protector-strong to -all

2014-06-11 Thread Ján Tomko
Check upfront if it's supported, to avoid putting both of them on the command line. --- m4/virt-compile-warnings.m4 | 22 ++ 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/m4/virt-compile-warnings.m4 b/m4/virt-compile-warnings.m4 index 196afa7..6d632f9 100644

[libvirt] [PATCH 1/3] build: remove duplicit warning suppression

2014-06-11 Thread Ján Tomko
These warnings have alread been added to $dontwarn. --- m4/virt-compile-warnings.m4 | 3 --- 1 file changed, 3 deletions(-) diff --git a/m4/virt-compile-warnings.m4 b/m4/virt-compile-warnings.m4 index 574fbc4..fb82238 100644 --- a/m4/virt-compile-warnings.m4 +++ b/m4/virt-compile-warnings.m4 @@

Re: [libvirt] [PATCH v2 2/4] virnetdev: Introduce virNetDevGetLinkInfo

2014-06-11 Thread Michal Privoznik
On 11.06.2014 03:13, John Ferlan wrote: On 06/05/2014 11:39 AM, Michal Privoznik wrote: The purpose of this function is to fetch link state and link speed for given NIC name from the SYSFS. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- src/libvirt_private.syms | 1 +

Re: [libvirt] [PATCH v2 1/4] virInterface: Expose link state speed

2014-06-11 Thread Michal Privoznik
On 11.06.2014 03:13, John Ferlan wrote: On 06/05/2014 11:39 AM, Michal Privoznik wrote: Currently it is not possible to determine the speed of an interface and whether a link is actually detected from the API. Orchestrating platforms want to be able to determine when the link has failed and

Re: [libvirt] [PATCH v2 0/4] Expose link state speed

2014-06-11 Thread Michal Privoznik
On 05.06.2014 17:39, Michal Privoznik wrote: While the 1/4 was ACKed, I'm sending int for completeness. And I've made a tiny change: the link speed is no longer unsigned long but unsigned int instead. That'll do too and it consumes less memory. Michal Privoznik (4): virInterface: Expose link

Re: [libvirt] [PATCH v2 1/4] virInterface: Expose link state speed

2014-06-11 Thread Daniel P. Berrange
On Wed, Jun 11, 2014 at 11:19:14AM +0200, Michal Privoznik wrote: On 11.06.2014 03:13, John Ferlan wrote: On 06/05/2014 11:39 AM, Michal Privoznik wrote: Currently it is not possible to determine the speed of an interface and whether a link is actually detected from the API. Orchestrating

Re: [libvirt] [PATCH 6/8] Add unique_id to nodedev output

2014-06-11 Thread Daniel P. Berrange
On Tue, Jun 10, 2014 at 03:03:55PM -0400, John Ferlan wrote: Add an optional unique_id parameter to nodedev. Allows for easier lookup and display of the unique_id value in order to document for use with scsi_host code. Signed-off-by: John Ferlan jfer...@redhat.com ---

Re: [libvirt] [PATCH 3/3] build: prefer -fstack-protector-strong to -all

2014-06-11 Thread Daniel P. Berrange
On Wed, Jun 11, 2014 at 11:00:22AM +0200, Ján Tomko wrote: Check upfront if it's supported, to avoid putting both of them on the command line. --- m4/virt-compile-warnings.m4 | 22 ++ 1 file changed, 18 insertions(+), 4 deletions(-) diff --git

Re: [libvirt] [PATCH v2 1/4] virInterface: Expose link state speed

2014-06-11 Thread Laine Stump
On 06/11/2014 12:28 PM, Daniel P. Berrange wrote: On Wed, Jun 11, 2014 at 11:19:14AM +0200, Michal Privoznik wrote: On 11.06.2014 03:13, John Ferlan wrote: On 06/05/2014 11:39 AM, Michal Privoznik wrote: Currently it is not possible to determine the speed of an interface and whether a link

Re: [libvirt] [PATCH v2 1/4] virInterface: Expose link state speed

2014-06-11 Thread Daniel P. Berrange
On Wed, Jun 11, 2014 at 01:04:02PM +0300, Laine Stump wrote: On 06/11/2014 12:28 PM, Daniel P. Berrange wrote: On Wed, Jun 11, 2014 at 11:19:14AM +0200, Michal Privoznik wrote: On 11.06.2014 03:13, John Ferlan wrote: On 06/05/2014 11:39 AM, Michal Privoznik wrote: Currently it is not

Re: [libvirt] [PATCH] vmware: make version parsing more robust

2014-06-11 Thread Ján Tomko
On 06/09/2014 10:12 AM, Jean-Baptiste Rouault wrote: On Monday 28 April 2014 13:46:54 Ján Tomko wrote: On 04/09/2014 11:59 AM, Jean-Baptiste Rouault wrote: Since commit d69415d4, vmware version is parsed from both stdout and stderr. This patch makes version parsing work even if there is

Re: [libvirt] [PATCH v2 1/4] virInterface: Expose link state speed

2014-06-11 Thread John Ferlan
On 06/11/2014 05:19 AM, Michal Privoznik wrote: On 11.06.2014 03:13, John Ferlan wrote: On 06/05/2014 11:39 AM, Michal Privoznik wrote: Currently it is not possible to determine the speed of an interface and whether a link is actually detected from the API. Orchestrating platforms want to

Re: [libvirt] [PATCH v2 1/4] virInterface: Expose link state speed

2014-06-11 Thread Laine Stump
On 06/11/2014 01:11 PM, Daniel P. Berrange wrote: On Wed, Jun 11, 2014 at 01:04:02PM +0300, Laine Stump wrote: I had thought that what was required was the ability to roundtrip the *inactive* xml back into a define, not the status XML. If it's really a requirement that we be able to feed back

Re: [libvirt] [PATCH v2 1/4] virInterface: Expose link state speed

2014-06-11 Thread Daniel P. Berrange
On Wed, Jun 11, 2014 at 06:46:25AM -0400, John Ferlan wrote: On 06/11/2014 05:19 AM, Michal Privoznik wrote: On 11.06.2014 03:13, John Ferlan wrote: On 06/05/2014 11:39 AM, Michal Privoznik wrote: Currently it is not possible to determine the speed of an interface and whether a

Re: [libvirt] [PATCH V8 2/2] libxl: add migration support

2014-06-11 Thread John Ferlan
This patch has resulted in a new Coverity warnings (looking at them was just lower on my list of things to do lately)... Anyway - see libxlDoMigrateReceive() and libxlDomainMigrationFinish() for the details... John On 06/04/2014 04:35 PM, Jim Fehlig wrote: This patch adds initial migration

[libvirt] [PATCH] virnetdev: Use ifname in virNetDevGetLinkInfo

2014-06-11 Thread Michal Privoznik
If we're compiling on non-Linux platform, the virNetDevGetLinkInfo() is a dummy function which barely logs debug message that getting link info is not supported. However, while the debug message was prepared for printing the interface name too, I actually forgot to pass the variable which resulted

[libvirt] [PATCHv4 06/21] tests: virstoragetest: Remove expBackingStore field

2014-06-11 Thread Peter Krempa
Now that we changed ordering of the stored metadata so that the backing store is described by the child element the test should reflect this change too. Remove the expected backing store field as it's actually described by the next element in the backing chain, so there's no need for duplication.

[libvirt] [PATCHv4 19/21] lib: Introduce flag VIR_DOMAIN_BLOCK_REBASE_RELATIVE

2014-06-11 Thread Peter Krempa
Introduce flag for the block rebase API to allow the rebase operation to leave the chain relatively addressed. Also adds a virsh switch to enable this behavior. --- include/libvirt/libvirt.h.in | 2 ++ src/libvirt.c| 5 + tools/virsh-domain.c | 22

[libvirt] [PATCHv4 01/21] security: Don't skip labelling for network disks

2014-06-11 Thread Peter Krempa
A network disk might actually be backed by local storage. Also the path iterator actually handles networked disks well now so remove the code that skips the labelling in dac and selinux security driver. --- src/security/security_dac.c | 3 --- src/security/security_selinux.c | 3 --- 2 files

[libvirt] [PATCHv4 05/21] util: storage: Add helper to resolve relative path difference

2014-06-11 Thread Peter Krempa
This patch introduces a function that will allow us to resolve a relative difference between two elements of a disk backing chain. This fucntion will be used to allow relative block commit and block pull where we need to specify the new relative name of the image to qemu. This patch also adds

[libvirt] [PATCHv4 00/21] block pull/commit on gluster volumes with relative backing

2014-06-11 Thread Peter Krempa
Peter Krempa (21): security: Don't skip labelling for network disks util: string: Add helper to free non-NULL terminated string arrays util: storagefile: Introduce universal function to canonicalize paths storage: gluster: Add backend to return unique storage file path util: storage: Add

[libvirt] [PATCHv4 15/21] qemu: caps: Add capability for change-backing-file command

2014-06-11 Thread Peter Krempa
This command allows to change the backing file name recorded in the metadata of a qcow (or other) image. The capability also notifies that the block-stream and block-commit commands understand the backing-file attribute. --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 +

[libvirt] [PATCHv4 07/21] tests: virstoragetest: Fix output when hitting errors

2014-06-11 Thread Peter Krempa
When the test is failing but the debug output isn't enabled the resulting line would look ugly like and would not contain the actual difference. TEST: virstoragetest .chain member 1!chain member 1!chain member 1! Store the member index in the actual checked string to hide

[libvirt] [PATCHv4 13/21] storage: Don't canonicalize paths unnecessarily

2014-06-11 Thread Peter Krempa
Store backing chain paths as non-canonical. The canonicalization step will be already taken. This will allow to avoid storing unnecessary amounts of data. --- src/util/virstoragefile.c | 33 ++--- tests/virstoragetest.c| 10 +- 2 files changed, 11

[libvirt] [PATCHv4 02/21] util: string: Add helper to free non-NULL terminated string arrays

2014-06-11 Thread Peter Krempa
Sometimes the length of the string list is known but the array isn't NULL terminated. Add helper to free the array in such cases. --- src/libvirt_private.syms | 1 + src/util/virstring.c | 20 src/util/virstring.h | 1 + 3 files changed, 22 insertions(+) diff --git

[libvirt] [PATCHv4 16/21] qemu: monitor: Add argument for specifying backing name for block commit

2014-06-11 Thread Peter Krempa
To allow changing the name that is recorded in the overlay of the TOP image used in a block commit operation, we need to specify the backing name to qemu. This is done via the backing-file attribute to the block-commit command. --- src/qemu/qemu_driver.c | 1 + src/qemu/qemu_monitor.c

[libvirt] [PATCHv4 11/21] tests: virstoragetest: Don't test relative start of backing chains

2014-06-11 Thread Peter Krempa
libvirt always uses an absolute path to address the top image of an image chain. Our storage test tests also the relative path which won't ever be used. Additionally it makes the test more complicated. --- tests/virstoragetest.c | 79 +- 1 file

[libvirt] [PATCHv4 14/21] storage: Don't store parent directory of an image explicitly

2014-06-11 Thread Peter Krempa
The parent directory doesn't necessarily need to be stored after we don't mangle the path stored in the image. Remove it and tweak the code to avoid using it. --- src/storage/storage_driver.c | 11 ++- src/util/virstoragefile.c| 68 ++--

[libvirt] [PATCHv4 03/21] util: storagefile: Introduce universal function to canonicalize paths

2014-06-11 Thread Peter Krempa
Introduce a common function that will take a callback to resolve links that will be used to canonicalize paths on various storage systems and add extensive tests. --- src/libvirt_private.syms | 1 + src/util/virstoragefile.c | 195 ++

[libvirt] [PATCHv4 18/21] lib: Introduce flag VIR_DOMAIN_BLOCK_COMMIT_RELATIVE

2014-06-11 Thread Peter Krempa
Introduce flag for the block commit API to allow the commit operation to leave the chain relatively addressed. Also adds a virsh switch to enable this behavior. --- include/libvirt/libvirt.h.in | 4 src/libvirt.c| 5 + tools/virsh-domain.c | 7 +++

[libvirt] [PATCHv4 09/21] tests: virstoragetest: Remove now unused pathAbs

2014-06-11 Thread Peter Krempa
Separately remove the now unused variable. --- tests/virstoragetest.c | 15 --- 1 file changed, 15 deletions(-) diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c index dd25069..11bc4dd 100644 --- a/tests/virstoragetest.c +++ b/tests/virstoragetest.c @@ -283,7 +283,6 @@

[libvirt] [PATCHv4 21/21] qemu: Add support for networked disks for block pull/block rebase

2014-06-11 Thread Peter Krempa
Now that we are able to select images from the backing chain via indexed access we should also convert possible network sources to qemu-compatible strings before passing them to qemu. --- src/qemu/qemu_driver.c | 45 + 1 file changed, 41 insertions(+),

[libvirt] [PATCHv4 17/21] qemu: monitor: Add support for backing name specification for block-stream

2014-06-11 Thread Peter Krempa
To allow changing the name that is recorded in the top of the current image chain used in a block pull/rebase operation, we need to specify the backing name to qemu. This is done via the backing-file attribute to the block-stream commad. --- src/qemu/qemu_driver.c | 8

[libvirt] [PATCHv4 10/21] util: storage: Remove now redundant backingRelative from virStorageSource

2014-06-11 Thread Peter Krempa
Now that we store only relative names in virStorageSource's member relPath the backingRelative member is obsolete. Remove it and adapt the code to the removal. --- src/util/virstoragefile.c | 4 +--- src/util/virstoragefile.h | 2 -- tests/virstoragetest.c| 8 +--- 3 files changed, 2

[libvirt] [PATCHv4 08/21] storage: Store relative path only for relatively backed storage

2014-06-11 Thread Peter Krempa
Due to various refactors and compatibility with the virstoragetest the relPath field of the virStorageSource structure was always filled either with the relative name or the full path in case of abslutely backed storage. Return it's original purpose to store only the relative name of the disk if

[libvirt] [PATCHv4 04/21] storage: gluster: Add backend to return unique storage file path

2014-06-11 Thread Peter Krempa
Use virStorageFileSimplifyPathInternal to canonicalize gluster paths via a callback and use it for the unique volume path retrieval API. --- src/storage/storage_backend_gluster.c | 80 +++ 1 file changed, 80 insertions(+) diff --git

[libvirt] [PATCHv4 12/21] tests: virstoragetest: Remove unneeded relative test plumbing

2014-06-11 Thread Peter Krempa
After we don't test relative paths, remove even more unnecessary cruft from the test code. --- tests/virstoragetest.c | 61 +++--- 1 file changed, 18 insertions(+), 43 deletions(-) diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c index

[libvirt] [PATCHv4 20/21] qemu: Add support for networked disks for block commit

2014-06-11 Thread Peter Krempa
Now that we are able to select images from the backing chain via indexed access we should also convert possible network sources to qemu-compatible strings before passing them to qemu. --- src/qemu/qemu_driver.c | 37 + 1 file changed, 33 insertions(+), 4

Re: [libvirt] [PATCHv3 07/36] storage: Switch metadata crawler to use storage driver to get unique path

2014-06-11 Thread Peter Krempa
On 06/09/14 16:07, Roman Bogorodskiy wrote: Peter Krempa wrote: On 06/07/14 20:35, Roman Bogorodskiy wrote: Peter Krempa wrote: Use the virStorageFileGetUniqueIdentifier() function to get a unique identifier regardless of the target storage type instead of relying on

[libvirt] [PATCHv2] build: prefer -fstack-protector-strong to -all

2014-06-11 Thread Ján Tomko
Try -fstack-protector-strong first on Linux. If that fails, fall back to -fstack-protector-all. --- m4/virt-compile-warnings.m4 | 22 ++ 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/m4/virt-compile-warnings.m4 b/m4/virt-compile-warnings.m4 index

Re: [libvirt] [PATCHv2] build: prefer -fstack-protector-strong to -all

2014-06-11 Thread Daniel P. Berrange
On Wed, Jun 11, 2014 at 02:11:46PM +0200, Ján Tomko wrote: Try -fstack-protector-strong first on Linux. If that fails, fall back to -fstack-protector-all. --- m4/virt-compile-warnings.m4 | 22 ++ 1 file changed, 18 insertions(+), 4 deletions(-) diff --git

Re: [libvirt] [PATCH v8 2/4] Add vbox_snapshot_conf struct

2014-06-11 Thread John Ferlan
One more here too - missed it in my last pass... On 05/19/2014 08:47 AM, Yohan BELLEGUIC wrote: ...snip... + +/* + *isCurrentSnapshot: Return 1 if 'snapshotName' corresponds to the + *vboxSnapshotXmlMachinePtr's current snapshot, return 0 otherwise. + */ +int

Re: [libvirt] [PATCH v8 3/4] vbox_tmpl.c: Patch for redefining snapshots

2014-06-11 Thread John Ferlan
Another coverity error as listed in-line below in vboxSnapshotRedefine() John On 05/19/2014 08:47 AM, Yohan BELLEGUIC wrote: The machine is unregistered and its vbox XML file is changed in order to add snapshot information. The machine is then registered with the snapshot to redefine. ---

Re: [libvirt] [PATCH v8 4/4] vbox_tmpl.c: Add function for undefining snapshot

2014-06-11 Thread John Ferlan
Another module where Coverity was less than enthusiastic about the changes - although less issues than the snapshot code... This one's a bit easier - add a VIR_FREE(disk); to the two places shown below and you're good. John On 05/19/2014 08:47 AM, Yohan BELLEGUIC wrote: All snapshots

Re: [libvirt] [PATCH v8 2/4] Add vbox_snapshot_conf struct

2014-06-11 Thread John Ferlan
Ug... and trying to locally fix the RW/RO discovered two more issues... On 06/11/2014 08:21 AM, John Ferlan wrote: This patch has resulted in many new Coverity errors - mostly resource leaks as a result of the virVBoxSnapshotConfAllChildren() recursive function. I would clean them up, but

[libvirt] [PATCH 2/3] vbox_snapshot_conf: Resolve Coverity warnings

2014-06-11 Thread John Ferlan
Clean up some Coverity warnings from commit id '4dc5d8f1' Signed-off-by: John Ferlan jfer...@redhat.com --- src/vbox/vbox_snapshot_conf.c | 27 ++- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/src/vbox/vbox_snapshot_conf.c b/src/vbox/vbox_snapshot_conf.c

[libvirt] [PATCH 3/3] libxl: Resolve Coverity warnings

2014-06-11 Thread John Ferlan
Resolve two Coverity issues introduced by commit id '9b8d6e1e' Signed-off-by: John Ferlan jfer...@redhat.com --- src/libxl/libxl_migration.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/libxl/libxl_migration.c b/src/libxl/libxl_migration.c index 9fe904e..a25edf0

[libvirt] [PATCH 0/3] Resolve Coverity warnings

2014-06-11 Thread John Ferlan
Resolve the lower hanging fruit Coverity issues from recent commits. Still left outstanding is rework of virVBoxSnapshotConfAllChildren() code and callers. John Ferlan (3): vbox_temp: Resolve Coverity warnings vbox_snapshot_conf: Resolve Coverity warnings libxl: Resolve Coverity warnings

[libvirt] [PATCH 1/3] vbox_temp: Resolve Coverity warnings

2014-06-11 Thread John Ferlan
Clean up code to resolve Coverity RESOURCE_LEAK's from commit id's '632b9600' and 'b739f807'. Signed-off-by: John Ferlan jfer...@redhat.com --- src/vbox/vbox_tmpl.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c index

[libvirt] [PATCH v4] qemu: Properly label FDs when restoring domain with static label

2014-06-11 Thread Shivaprasad G Bhat
When saving domain with relabel=no, the file that gets created must have the context set anyway. That way restore can be successful without the need of relabeling the file. Signed-off-by: Shivaprasad G Bhat sb...@linux.vnet.ibm.com --- src/qemu/qemu_driver.c |3 +++ 1 file changed, 3

Re: [libvirt] [PATCH 6/8] Add unique_id to nodedev output

2014-06-11 Thread John Ferlan
On 06/11/2014 05:31 AM, Daniel P. Berrange wrote: On Tue, Jun 10, 2014 at 03:03:55PM -0400, John Ferlan wrote: Add an optional unique_id parameter to nodedev. Allows for easier lookup and display of the unique_id value in order to document for use with scsi_host code. Signed-off-by: John

Re: [libvirt] [PATCH 6/8] Add unique_id to nodedev output

2014-06-11 Thread Daniel P. Berrange
On Wed, Jun 11, 2014 at 10:00:24AM -0400, John Ferlan wrote: On 06/11/2014 05:31 AM, Daniel P. Berrange wrote: On Tue, Jun 10, 2014 at 03:03:55PM -0400, John Ferlan wrote: Add an optional unique_id parameter to nodedev. Allows for easier lookup and display of the unique_id value in

Re: [libvirt] [PATCH v4] qemu: Properly label FDs when restoring domain with static label

2014-06-11 Thread Martin Kletzander
On Wed, Jun 11, 2014 at 09:48:34AM -0400, Shivaprasad G Bhat wrote: When saving domain with relabel=no, the file that gets created must have the context set anyway. That way restore can be successful without the need of relabeling the file. Signed-off-by: Shivaprasad G Bhat

Re: [libvirt] [PATCH] maint: exempt graphic binaries from syntax check

2014-06-11 Thread Eric Blake
On 06/11/2014 02:56 AM, Martin Kletzander wrote: On Tue, Jun 10, 2014 at 01:39:03PM -0600, Eric Blake wrote: Roman Bogorodskiy reported a syntax-check failure when using FreeBSD; complaining that: prohibit_empty_first_line tools/libvirt_win_icon_16x16.ico:1:

Re: [libvirt] [PATCH 6/8] Add unique_id to nodedev output

2014-06-11 Thread John Ferlan
On 06/11/2014 10:10 AM, Daniel P. Berrange wrote: On Wed, Jun 11, 2014 at 10:00:24AM -0400, John Ferlan wrote: On 06/11/2014 05:31 AM, Daniel P. Berrange wrote: On Tue, Jun 10, 2014 at 03:03:55PM -0400, John Ferlan wrote: Where is the data from the 'unique_id' coming from ? Is this since

Re: [libvirt] [PATCH 3/3] libxl: Resolve Coverity warnings

2014-06-11 Thread Jim Fehlig
John Ferlan wrote: Resolve two Coverity issues introduced by commit id '9b8d6e1e' Signed-off-by: John Ferlan jfer...@redhat.com --- src/libxl/libxl_migration.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/libxl/libxl_migration.c

Re: [libvirt] [PATCH V8 2/2] libxl: add migration support

2014-06-11 Thread Jim Fehlig
John Ferlan wrote: This patch has resulted in a new Coverity warnings (looking at them was just lower on my list of things to do lately)... Anyway - see libxlDoMigrateReceive() and libxlDomainMigrationFinish() for the details... Should have looked at this before responding to your patch

Re: [libvirt] [PATCH v3 2/2] maint: prohibit empty first lines

2014-06-11 Thread Eric Blake
On 06/11/2014 12:54 AM, Martin Kletzander wrote: It started to fail for me with this change: prohibit_empty_first_line tools/libvirt_win_icon_16x16.ico:1: Hmm, it might be simpler just to globally exclude all image formats, rather than repeating lists of image files in affected rules.

Re: [libvirt] [PATCH 2/2] storage: volume: Rework lookup of volume objects

2014-06-11 Thread Ján Tomko
On 06/05/2014 01:52 PM, Peter Krempa wrote: Add a helper to do all the lookup steps and remove a ton of duplicated code. --- src/storage/storage_driver.c | 292 ++- 1 file changed, 69 insertions(+), 223 deletions(-) ACK diff --git

Re: [libvirt] [PATCH 1/2] storage: pool: Fix handling of errors on pool lookup failure

2014-06-11 Thread Ján Tomko
On 06/05/2014 01:52 PM, Peter Krempa wrote: Rework internal pool lookup code to avoid printing the raw UUID buffer in the case a storage pool can't be found: $ virsh pool-name e012ace0-0460-5810-39ef-1bce5fa5a4dd error: failed to get pool 'e012ace0-0460-5810-39ef-1bce5fa5a4dd' error:

[libvirt] [PATCH] leaseshelper: fix crash

2014-06-11 Thread Pavel Hrdina
Commit baafe668 introduced new leaseshelper with a crash of freeing env string. Calling 'getenv()' inside 'virGetEnvAllowSUID()' may return a static string and we definitely should not free it. The author probably want to free the copy of that string. Signed-off-by: Pavel Hrdina

Re: [libvirt] [PATCH v2 2/4] virnetdev: Introduce virNetDevGetLinkInfo

2014-06-11 Thread Michal Privoznik
On 11.06.2014 11:19, Michal Privoznik wrote: snip/ Seems we should be able to set up a dummy /sys/class/net environment in order to test the new API's... Something I attempted with my recently posted scsi_host changes. Yeah, unit testing is certainly in place. But honestly, I thought it would

Re: [libvirt] [PATCH v2 2/4] virnetdev: Introduce virNetDevGetLinkInfo

2014-06-11 Thread Daniel P. Berrange
On Wed, Jun 11, 2014 at 05:41:11PM +0200, Michal Privoznik wrote: On 11.06.2014 11:19, Michal Privoznik wrote: snip/ Seems we should be able to set up a dummy /sys/class/net environment in order to test the new API's... Something I attempted with my recently posted scsi_host changes.

[libvirt] [PATCH v3 1/5] virsh: improve blockcopy UI

2014-06-11 Thread Eric Blake
Peter's review of my addition of active block commit pointed out some issues that I had copied from block copy. It makes sense to allow the shorter command-line of 'blockcopy $dom $disk --pivot' without having to explicitly specify --wait. And my use of embedded ?: ternaries bordered on

[libvirt] [PATCH v3 2/5] virsh: expose new active commit controls

2014-06-11 Thread Eric Blake
Add knobs to virsh to manage a 2-phase active commit of the top layer, similar to knobs already present on blockcopy. While this code will fail until later patches actually implement the new knobs in the qemu driver, doing it now proves that the API is usable and also makes it easier for testing

[libvirt] [PATCH v3 0/5] Active commit

2014-06-11 Thread Eric Blake
I still don't have qemu capability detection working reliably, but want to post this series right now so that it can be built into a scratch build containing Peter's and my changes. (Or put another way, I was testing what conflict resolutions are required - patch 2/5 (virsh) and 5/5 (qemu_driver)

[libvirt] [PATCH v3 4/5] blockcommit: track job type in xml

2014-06-11 Thread Eric Blake
A future patch is going to wire up qemu active block commit jobs; but as they have similar events and are canceled/pivoted in the same way as block copy jobs, it is easiest to track all bookkeeping for the commit job by reusing the mirror element. This patch adds domain XML to track which job was

[libvirt] [PATCH v3 3/5] blockcommit: update error messages related to block jobs

2014-06-11 Thread Eric Blake
A future patch will add two-phase block commit jobs; as the mechanism for managing them is similar to managing a block copy job, existing errors should be made generic enough to occur for either job type. * src/conf/domain_conf.c (virDomainHasDiskMirror): Update comment. * src/qemu/qemu_driver.c

[libvirt] [PATCH v3 5/5] blockcommit: turn on active commit

2014-06-11 Thread Eric Blake
With this in place, I can (finally!) now do: virsh blockcommit $dom vda --shallow --wait --verbose --pivot and watch qemu shorten the backing chain by one, followed by libvirt automatically updating the dumpxml output, effectively undoing the work of virsh snapshot-commit --no-metadata

Re: [libvirt] [PATCH v3 0/5] Active commit

2014-06-11 Thread Eric Blake
On 06/11/2014 10:27 AM, Eric Blake wrote: I still don't have qemu capability detection working reliably, but want to post this series right now so that it can be built into a scratch build containing Peter's and my changes. (Or put another way, I was testing what conflict resolutions are

Re: [libvirt] [PATCH v2 2/4] virnetdev: Introduce virNetDevGetLinkInfo

2014-06-11 Thread Eric Blake
On 06/11/2014 03:19 AM, Michal Privoznik wrote: +{ +int ret = -1; +char *path = NULL; +char *buf = NULL; +char *tmp; +int tmp_state; s/int/virInterfaceState/ In fact this is intentional. Remember Eric's TypeFromString() patches? The problem is, one can't be sure

Re: [libvirt] [PATCH V8 2/2] libxl: add migration support

2014-06-11 Thread John Ferlan
On 06/11/2014 11:13 AM, Jim Fehlig wrote: John Ferlan wrote: This patch has resulted in a new Coverity warnings (looking at them was just lower on my list of things to do lately)... Anyway - see libxlDoMigrateReceive() and libxlDomainMigrationFinish() for the details... Should have

Re: [libvirt] [PATCH 1/3] build: remove duplicit warning suppression

2014-06-11 Thread Eric Blake
On 06/11/2014 03:00 AM, Ján Tomko wrote: These warnings have alread been added to $dontwarn. s/alread/already/ --- m4/virt-compile-warnings.m4 | 3 --- 1 file changed, 3 deletions(-) ACK diff --git a/m4/virt-compile-warnings.m4 b/m4/virt-compile-warnings.m4 index 574fbc4..fb82238

Re: [libvirt] [PATCH 2/3] build: remove ssp-buffer-size

2014-06-11 Thread Eric Blake
On 06/11/2014 03:00 AM, Ján Tomko wrote: This option only makes sense for -fstack-protector. With -fstack-protector-all or -fstack-protector-strong, functions are protected regardless of buffer size. https://bugzilla.redhat.com/show_bug.cgi?id=1105456 --- m4/virt-compile-warnings.m4 | 13

Re: [libvirt] [PATCHv4 01/21] security: Don't skip labelling for network disks

2014-06-11 Thread Eric Blake
On 06/11/2014 05:45 AM, Peter Krempa wrote: A network disk might actually be backed by local storage. Also the path iterator actually handles networked disks well now so remove the code that skips the labelling in dac and selinux security driver. --- src/security/security_dac.c | 3 ---

Re: [libvirt] [PATCH] maint: exempt graphic binaries from syntax check

2014-06-11 Thread Roman Bogorodskiy
Eric Blake wrote: On 06/11/2014 02:56 AM, Martin Kletzander wrote: On Tue, Jun 10, 2014 at 01:39:03PM -0600, Eric Blake wrote: Roman Bogorodskiy reported a syntax-check failure when using FreeBSD; complaining that: prohibit_empty_first_line tools/libvirt_win_icon_16x16.ico:1:

Re: [libvirt] [PATCHv3 07/36] storage: Switch metadata crawler to use storage driver to get unique path

2014-06-11 Thread Roman Bogorodskiy
Peter Krempa wrote: On 06/09/14 16:07, Roman Bogorodskiy wrote: Peter Krempa wrote: On 06/07/14 20:35, Roman Bogorodskiy wrote: Peter Krempa wrote: Use the virStorageFileGetUniqueIdentifier() function to get a unique identifier regardless of the target storage type instead

Re: [libvirt] [PATCH] virsh: include bhyve in virsh -V output

2014-06-11 Thread Roman Bogorodskiy
Eric Blake wrote: On 06/10/2014 12:26 PM, Roman Bogorodskiy wrote: Add 'Bhyve' in hypervisor list reported by 'virsh -V' if it's compiled it. --- tools/virsh.c | 3 +++ 1 file changed, 3 insertions(+) ACK Pushed, thanks! Roman Bogorodskiy pgpVB8oonTwzn.pgp Description: PGP

Re: [libvirt] [PATCH 3/3] libxl: Resolve Coverity warnings

2014-06-11 Thread John Ferlan
On 06/11/2014 11:08 AM, Jim Fehlig wrote: John Ferlan wrote: Resolve two Coverity issues introduced by commit id '9b8d6e1e' Signed-off-by: John Ferlan jfer...@redhat.com --- src/libxl/libxl_migration.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) ACK. Regards, Jim

Re: [libvirt] [PATCH v3 0/5] Active commit

2014-06-11 Thread Adam Litke
On 11/06/14 10:27 -0600, Eric Blake wrote: I still don't have qemu capability detection working reliably, but want to post this series right now so that it can be built into a scratch build containing Peter's and my changes. (Or put another way, I was testing what conflict resolutions are

Re: [libvirt] [PATCH v3 0/5] Active commit

2014-06-11 Thread Eric Blake
On 06/11/2014 01:53 PM, Adam Litke wrote: I've tested this with the following script and it seems that specifying base and top explicitly does not work. Using --shallow does work for me though. Running the included script yields the following output: $ sudo bash /home/alitke/test/test.sh