Re: [libvirt] [PATCH] conf: Resolve Coverity FORWARD_NULL

2015-08-05 Thread Michal Privoznik
On 04.08.2015 17:54, John Ferlan wrote: On 08/04/2015 11:42 AM, Michal Privoznik wrote: On 04.08.2015 13:11, John Ferlan wrote: The recent changes to perform SCSI device address checks during the post parse callbacks ran afoul of the Coverity checker since the changes assumed that the

Re: [libvirt] [PATCH] virsh: fix domfsinfo wrong output in quiet mode

2015-08-05 Thread Ján Tomko
On Wed, Aug 05, 2015 at 11:17:22AM +0800, Luyao Huang wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1250287 When run domfsinfo in quiet mode, we cannot get any useful information (just get \n), this is because we didn't use vshPrint to print useful information. Signed-off-by: Luyao

Re: [libvirt] [PATCH] virsh: fix domfsinfo wrong output in quiet mode

2015-08-05 Thread lhuang
On 08/05/2015 04:05 PM, Ján Tomko wrote: On Wed, Aug 05, 2015 at 11:17:22AM +0800, Luyao Huang wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1250287 When run domfsinfo in quiet mode, we cannot get any useful information (just get \n), this is because we didn't use vshPrint to print

[libvirt] [PATCHv2 0/2] Added waiting for DAD to finish for bridge address.

2015-08-05 Thread Maxim Perevedentsev
This is a fix for commit db488c79173b240459c7754f38c3c6af9b432970 dnsmasq main process which is relied on when waiting for DAD to complete exits without actually waiting for DAD. This is dnsmasq daemon's task. It seems to be a race that DAD finished before dnsmasq main process exited. The above

[libvirt] [PATCHv2 1/2] network: added waiting for DAD to finish for bridge address.

2015-08-05 Thread Maxim Perevedentsev
This is a fix for commit db488c79173b240459c7754f38c3c6af9b432970 dnsmasq main process exits without waiting for DAD, this is dnsmasq daemon's task. So we periodically poll the kernel using netlink and check whether there are any IPv6 addresses assigned to bridge which have 'tentative' state.

[libvirt] [PATCHv2 2/2] Add support for multi-part netlink messages.

2015-08-05 Thread Maxim Perevedentsev
Such messages do not have NLMSG_ERROR or NLMSG_DONE type but they are valid responses. We test 'multi-partness' by looking for NLM_F_MULTI flag. --- Difference to v1: fixed comment style. src/util/virnetlink.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

[libvirt] [PATCH 0/5] domainRename API implementation

2015-08-05 Thread Tomas Meszaros
This is an effort to implement domain rename API. Presented patch series consists of the following: virDomainRename API implementation for qemu, implementation of the virsh command domrename and the additional support code. The idea behind this endeavor is to provide convenient and safe way to

[libvirt] [PATCH 5/5] qemu: Implement virDomainRename

2015-08-05 Thread Tomas Meszaros
Currently supports only renaming inactive domains without snapshots. Signed-off-by: Tomas Meszaros e...@tty.sk --- src/qemu/qemu_driver.c | 172 + 1 file changed, 172 insertions(+) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index

[libvirt] [PATCH 1/5] Introduce virDomainRename API

2015-08-05 Thread Tomas Meszaros
Also, among with this new API new ACL that restricts rename capability is invented too. Signed-off-by: Tomas Meszaros e...@tty.sk --- include/libvirt/libvirt-domain.h | 2 ++ src/access/viraccessperm.c | 3 ++- src/access/viraccessperm.h | 6 ++ src/driver-hypervisor.h

[libvirt] [PATCH 3/5] domain_conf: Introducde virDomainObjListRenameAddNew() virDomainObjListRenameRemove()

2015-08-05 Thread Tomas Meszaros
We just need to update the entry in the second hash table. Since commit 8728a56 we have two hash tables for the domain list so that we can do O(1) lookup regardless of looking up by UUID or name. Since with renaming a domain UUID does not change, we only need to update the second hash table, where

[libvirt] [PATCH 4/5] Introduce new VIR_DOMAIN_EVENT_DEFINED_RENAMED event

2015-08-05 Thread Tomas Meszaros
This should be emitted whenever a domain is renamed. Signed-off-by: Tomas Meszaros e...@tty.sk --- examples/object-events/event-test.c | 2 ++ include/libvirt/libvirt-domain.h| 1 + tools/virsh-domain.c| 3 ++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git

[libvirt] [PATCH 2/5] virsh: Implement domrename command

2015-08-05 Thread Tomas Meszaros
This patch implements new virsh command, domrename. Using domrename, it will be possible to rename domain from the virsh shell by calling virRenameDomain API. It takes two arguments, current domain name and new domain name. Example: virsh # list --all IdName

Re: [libvirt] [PATCH 1/5] Introduce virDomainRename API

2015-08-05 Thread Daniel P. Berrange
On Wed, Aug 05, 2015 at 01:59:07PM +0200, Tomas Meszaros wrote: Also, among with this new API new ACL that restricts rename capability is invented too. Signed-off-by: Tomas Meszaros e...@tty.sk --- include/libvirt/libvirt-domain.h | 2 ++ src/access/viraccessperm.c | 3 ++-

Re: [libvirt] [PATCH 01/18] cpu: Mark driver functions in ppc64 driver

2015-08-05 Thread Jiri Denemark
On Tue, Aug 04, 2015 at 11:37:52 +0200, Andrea Bolognani wrote: Use the ppc64Driver prefix for all functions that are used to fill in the cpuDriverPPC64 structure, ie. those that are going to be called by the generic CPU code. This makes it clear which functions are exported and which are

Re: [libvirt] [PATCH 02/18] cpu: Simplify NULL handling in ppc64 driver

2015-08-05 Thread Jiri Denemark
On Tue, Aug 04, 2015 at 11:37:53 +0200, Andrea Bolognani wrote: Use briefer checks, eg. (!model) instead of (model == NULL), and avoid initializing to NULL a pointer that would be assigned in the first line of the function anyway. Also remove a pointless NULL assignment. No functional

Re: [libvirt] [PATCH 5/5] qemu: Implement virDomainRename

2015-08-05 Thread Daniel P. Berrange
On Wed, Aug 05, 2015 at 01:59:11PM +0200, Tomas Meszaros wrote: Currently supports only renaming inactive domains without snapshots. Signed-off-by: Tomas Meszaros e...@tty.sk --- src/qemu/qemu_driver.c | 172 + 1 file changed, 172

Re: [libvirt] [PATCH 4/5] Introduce new VIR_DOMAIN_EVENT_DEFINED_RENAMED event

2015-08-05 Thread Daniel P. Berrange
On Wed, Aug 05, 2015 at 01:59:10PM +0200, Tomas Meszaros wrote: This should be emitted whenever a domain is renamed. Signed-off-by: Tomas Meszaros e...@tty.sk --- examples/object-events/event-test.c | 2 ++ include/libvirt/libvirt-domain.h| 1 + tools/virsh-domain.c| 3

Re: [libvirt] [PATCH 03/18] cpu: Add NULL check in ppc64ModelCopy()

2015-08-05 Thread Jiri Denemark
On Tue, Aug 04, 2015 at 11:37:54 +0200, Andrea Bolognani wrote: --- src/cpu/cpu_ppc64.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/cpu/cpu_ppc64.c b/src/cpu/cpu_ppc64.c index 05ff8f2..dd02a3f 100644 --- a/src/cpu/cpu_ppc64.c +++ b/src/cpu/cpu_ppc64.c @@ -115,6 +115,9 @@

Re: [libvirt] [PATCH 04/18] cpu: Use a different name for the copy in ppc64ModelFromCPU()

2015-08-05 Thread Jiri Denemark
On Tue, Aug 04, 2015 at 11:37:55 +0200, Andrea Bolognani wrote: While the previous code was correct, it looked wrong at first sight because the same variable used to store the result of a map lookup is later used to store a copy of said result. The copy is deallocated on error, but due to the

Re: [libvirt] [PATCH] qemu: Forbid image pre-creation for non-shared storage migration

2015-08-05 Thread Ján Tomko
On Tue, Aug 04, 2015 at 10:21:32AM +0200, Peter Krempa wrote: Libvirt doesn't reliably know the location of the backing chain when pre-creating images for non-shared migration. This isn't a problem for full copy, but incremental copy requires the information. Forbid pre-creating the image in

Re: [libvirt] [PATCH] qemu: Forbid image pre-creation for non-shared storage migration

2015-08-05 Thread Peter Krempa
On Wed, Aug 05, 2015 at 17:04:28 +0200, Ján Tomko wrote: On Tue, Aug 04, 2015 at 10:21:32AM +0200, Peter Krempa wrote: Libvirt doesn't reliably know the location of the backing chain when pre-creating images for non-shared migration. This isn't a problem for full copy, but incremental copy

Re: [libvirt] [PATCH 04/18] cpu: Use a different name for the copy in ppc64ModelFromCPU()

2015-08-05 Thread Andrea Bolognani
On Wed, 2015-08-05 at 14:28 +0200, Jiri Denemark wrote: You forgot to initialize copy to NULL, but why not just return ppc64ModelCopy(model); and removing copy end the error label completely since it will never do anything anyway? You're right! Done :) Cheers. -- Andrea

[libvirt] 'stack smashing detected' in 1.2.18 (caused by virNetDevGFeatureAvailable)

2015-08-05 Thread Brian Rak
I recently compiled 1.2.18 to start testing with it, and was getting this error on startup: *** stack smashing detected ***: libvirtd terminated === Backtrace: = /lib64/libc.so.6(__fortify_fail+0x37)[0x7fe1ac631527] /lib64/libc.so.6(__fortify_fail+0x0)[0x7fe1ac6314f0]

[libvirt] 'stack smashing detected' in 1.2.18 (caused by virNetDevGFeatureAvailable)

2015-08-05 Thread Brian Rak
I recently compiled 1.2.18 to start testing with it, and was getting this error on startup: *** stack smashing detected ***: libvirtd terminated === Backtrace: = /lib64/libc.so.6(__fortify_fail+0x37)[0x7fe1ac631527] /lib64/libc.so.6(__fortify_fail+0x0)[0x7fe1ac6314f0]

Re: [libvirt] [PATCH 03/18] cpu: Add NULL check in ppc64ModelCopy()

2015-08-05 Thread Andrea Bolognani
On Wed, 2015-08-05 at 14:19 +0200, Jiri Denemark wrote: On Tue, Aug 04, 2015 at 11:37:54 +0200, Andrea Bolognani wrote: --- src/cpu/cpu_ppc64.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/cpu/cpu_ppc64.c b/src/cpu/cpu_ppc64.c index 05ff8f2..dd02a3f 100644 ---

Re: [libvirt] 'stack smashing detected' in 1.2.18 (caused by virNetDevGFeatureAvailable)

2015-08-05 Thread Laine Stump
On 08/05/2015 12:09 PM, Brian Rak wrote: I recently compiled 1.2.18 to start testing with it, and was getting this error on startup: *** stack smashing detected ***: libvirtd terminated === Backtrace: = /lib64/libc.so.6(__fortify_fail+0x37)[0x7fe1ac631527]