Re: [libvirt] [PATCH] storage_backend_rbd: continue searching when failing in rbd_diff_iterate

2016-09-12 Thread Chen Hanxiao
At 2016-09-06 11:45:06, "Chen Hanxiao" wrote: >From: Chen Hanxiao > >We try to find a snapshot that had no different between >the current state of RBD image. >If we failed in rbd_diff_iterate, just continue for the >next search iteration. >

Re: [libvirt] [PATCH] qemu_driver: pass path of compress prog directly

2016-09-12 Thread Chen Hanxiao
At 2016-09-05 10:01:47, "Chen Hanxiao" wrote: > >At 2016-08-27 15:13:01, "Chen Hanxiao" wrote: >>From: Chen Hanxiao >> >>We check compress prog in qemuCompressProgramAvailable, >>then check it again in virExec. >> >>This path

Re: [libvirt] [PATCH RFC] virhook: Adding inotify support to virhook.

2016-09-12 Thread Julio Faracco
Hi guys, As I mentioned, we are working in a project that introduces a hook for QEMU. And when someone installs the RPM/DEB package with this hook, we need to restart the libvirtd service everytime. It is really annoying for users. In my opinion, we can include an #if and #else to compile with

[libvirt] [PATCH RFC] virhook: Adding inotify support to virhook.

2016-09-12 Thread Julio Faracco
Libvirtd only support hooks when the daemon is started. Hooks cannot be loaded when the daemon is already running. So, to load a hook you need to restart the service everytime. Now, the inotify support enables the option of create a hook and run it even if libvirtd was started. Cc: Carlos

Re: [libvirt] [PATCH v2 5/5] tests: Introduce basic vhost-scsi test

2016-09-12 Thread John Ferlan
On 09/06/2016 08:58 AM, Eric Farman wrote: > The qemuxml2argv test was cloned from hostdev-scsi-virtio-scsi > > Signed-off-by: Eric Farman > Reviewed-by: Boris Fiuczynski > --- > .../qemuxml2argv-hostdev-scsi-vhost-scsi.args | 24

Re: [libvirt] [PATCH v2 4/5] qemu: Allow hotplug of vhost-scsi device

2016-09-12 Thread John Ferlan
On 09/06/2016 08:58 AM, Eric Farman wrote: > Adjust the device string that is built for vhost-scsi devices so that it > can be invoked from hotplug. > >>From the QEMU command line, the file descriptors are expect to be numeric >>only. > However, for hotplug, the file descriptors are expected

Re: [libvirt] [PATCH v2 3/5] qemu: Add vhost-scsi string for -device parameter

2016-09-12 Thread John Ferlan
On 09/06/2016 08:58 AM, Eric Farman wrote: > Open /dev/vhost-scsi, and record the resulting file descriptor, so that > the guest has access to the host device outside of the libvirt daemon. > Pass this information, along with data parsed from the XML file, to build > a device string for the qemu

Re: [libvirt] [PATCH v2 2/5] qemu: Introduce vhost-scsi capability

2016-09-12 Thread John Ferlan
On 09/06/2016 08:58 AM, Eric Farman wrote: > Do all the stuff for the vhost-scsi capability in QEMU, > so it's in place for our checks later. > > Signed-off-by: Eric Farman > Reviewed-by: Boris Fiuczynski > --- >

Re: [libvirt] [PATCH v2 1/5] Introduce a "scsi_host" hostdev type

2016-09-12 Thread John Ferlan
On 09/06/2016 08:58 AM, Eric Farman wrote: > We already have a "scsi" hostdev type, which refers to a single LUN > that is passed through to a guest. But what of things where multiple > LUNs are passed through via a single SCSI HBA, such as with the > vhost-scsi target? Create a new hostdev

Re: [libvirt] [PATCH 2/2] virDomainGetBlockJobInfo: Fix corner case when qemu reports no info

2016-09-12 Thread Eric Blake
On 09/09/2016 04:30 PM, John Ferlan wrote: >> >> +/* Fix job completeness reporting. If cur == end mgmt >> + * applications think job is completed. Except when both cur >> + * and end are zero, in which case qemu hasn't started the >> + * job yet. */ >> +if (!info->cur &&

Re: [libvirt] [PATCH] conf: allow hotplugging "legacy PCI" device to manually addressed PCIe slot

2016-09-12 Thread Laine Stump
On 09/12/2016 04:04 AM, Michal Privoznik wrote: ACK Thanks. I pushed it. -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH] audit: Audit information about shmem devices

2016-09-12 Thread Martin Kletzander
On Mon, Sep 12, 2016 at 02:16:34PM +0200, Michal Privoznik wrote: On 07.09.2016 15:37, Martin Kletzander wrote: Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1218603 Signed-off-by: Martin Kletzander --- docs/auditlog.html.in| 19 +++

Re: [libvirt] [PATCH 2/2] virDomainGetBlockJobInfo: Fix corner case when qemu reports no info

2016-09-12 Thread John Ferlan
[...] >> >> Can info->ready == 0 ? w/ info->cur = info->end = 0 >> >> If so, then we're in the same mess or some other weird condition. >> >> Seems like "ready" will be set in qemu during block_job_event_ready, so >> that would say to me that as long as the structure is allocated, ready >> will

Re: [libvirt] [PATCH] qemu: fix improper initialization of cgroupControllers bitmap

2016-09-12 Thread Daniel P. Berrange
On Mon, Sep 12, 2016 at 01:50:44PM -0400, Laine Stump wrote: > virQEMUDriverConfigNew() always initializes the bitmap in its > cgroupControllers member to -1 (i.e. all 1's). > > Prior to commit a9331394, if qemu.conf had a line with > "cgroup_controllers", cgroupControllers would get reset to 0

[libvirt] [PATCH] qemu: fix improper initialization of cgroupControllers bitmap

2016-09-12 Thread Laine Stump
virQEMUDriverConfigNew() always initializes the bitmap in its cgroupControllers member to -1 (i.e. all 1's). Prior to commit a9331394, if qemu.conf had a line with "cgroup_controllers", cgroupControllers would get reset to 0 before going through a loop setting a bit for each named cgroup

Re: [libvirt] [PATCH 0/3] add option to keep nvram file on undefine

2016-09-12 Thread Daniel P. Berrange
On Mon, Sep 12, 2016 at 07:01:38PM +0200, Andrea Bolognani wrote: > On Mon, 2016-09-12 at 10:20 +0200, Michal Privoznik wrote: > > On 27.05.2016 10:05, Nikolay Shirokovskiy wrote: > > >   There is already a patch [1] on this topic with a different approach - > > >keep > > > nvram file by default.

Re: [libvirt] [PATCH 0/3] add option to keep nvram file on undefine

2016-09-12 Thread Andrea Bolognani
On Mon, 2016-09-12 at 10:20 +0200, Michal Privoznik wrote: > On 27.05.2016 10:05, Nikolay Shirokovskiy wrote: > >   There is already a patch [1] on this topic with a different approach - > >keep > > nvram file by default. There is also some discussion there. To sum up > > keeping > > nvram on

Re: [libvirt] [PATCH] Make sure sys/types.h is included after sys/sysmacros.h

2016-09-12 Thread Michal Privoznik
On 12.09.2016 16:54, Daniel P. Berrange wrote: > On Tue, Sep 06, 2016 at 03:46:59PM +0200, Michal Privoznik wrote: >> In the latest glibc, major() and minor() functions are marked as >> deprecated (glibc commit dbab6577): >> >> CC util/libvirt_util_la-vircgroup.lo >> util/vircgroup.c: In

Re: [libvirt] [PATCH 2/2] virDomainGetBlockJobInfo: Fix corner case when qemu reports no info

2016-09-12 Thread Michal Privoznik
On 09.09.2016 23:30, John Ferlan wrote: > > > On 09/05/2016 07:48 AM, Michal Privoznik wrote: >> https://bugzilla.redhat.com/show_bug.cgi?id=1372613 >> >> Apparently, some management applications use the following code >> pattern when waiting for a block job to finish: >> >> while (1) { >>

Re: [libvirt] [PATCH] Make sure sys/types.h is included after sys/sysmacros.h

2016-09-12 Thread Daniel P. Berrange
On Tue, Sep 06, 2016 at 03:46:59PM +0200, Michal Privoznik wrote: > In the latest glibc, major() and minor() functions are marked as > deprecated (glibc commit dbab6577): > > CC util/libvirt_util_la-vircgroup.lo > util/vircgroup.c: In function 'virCgroupGetBlockDevString': >

[libvirt] [PATCH] qemu: avoid parameter named 'listen'

2016-09-12 Thread Daniel P. Berrange
previous commit: commit 2c3223785c121eafbdd503f11549d7964461934f Author: John Ferlan Date: Mon Jun 13 12:30:34 2016 -0400 qemu: Add the ability to hotplug the TLS X.509 environment added a parameter "bool listen" in some methods. This unfortunately clashes with

[libvirt] [[PATCH v2] 2/4] virtlogd: stop reading on EOF instead of hangup

2016-09-12 Thread Nikolay Shirokovskiy
Otherwise we can miss log tail. Handling hangup in a special way in not nessessary. --- src/logging/log_handler.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/logging/log_handler.c b/src/logging/log_handler.c index cd0ba6e..ca294a0 100644 ---

[libvirt] [[PATCH v2] 4/4] qemu: if virtlogd is used then read log tail correctly

2016-09-12 Thread Nikolay Shirokovskiy
First we need to specify flag to wait while qemu finishes its logging. Second virtlogd will not receive EOF as both qemu and libvirtd keep logging pipe fd. Thus let's close it after qemu process startup is finished as it will not be used anymore. All following logging on behalf of qemu by libvirt

[libvirt] [[PATCH v2] 3/4] virtlogd: add flag to wait for log end on read

2016-09-12 Thread Nikolay Shirokovskiy
--- src/logging/log_handler.c | 38 -- src/logging/log_protocol.x | 5 + 2 files changed, 41 insertions(+), 2 deletions(-) diff --git a/src/logging/log_handler.c b/src/logging/log_handler.c index ca294a0..93b893b 100644 --- a/src/logging/log_handler.c

[libvirt] [[PATCH v2] 0/4] try harder to get dest qemu errors on migation

2016-09-12 Thread Nikolay Shirokovskiy
Hi, all. In case migration fails due to destination qemu exits unexpectedly user recevies the qemu log in the error message. Unfortunately log is truncated and the most interesting part is missed (below is the example of such a log [1]). Actually for the most cases the first patch will be

[libvirt] [[PATCH v2] 1/4] util: remove 1k limit for error messages

2016-09-12 Thread Nikolay Shirokovskiy
This limit is the issue for example when we want to return in the error message the log of the abnormally exited qemu process of the destination side in the process of migration. virVasprintf is already used in the process of logging in the callers down the stack. --- src/util/virerror.c | 9

Re: [libvirt] [PATCH] log: fix false oom error message

2016-09-12 Thread Erik Skultety
On 12/09/16 12:56, Nikolay Shirokovskiy wrote: > In case filter is new one an oom error message is reported. > This bug is introduced in 51b2606f. oops However this error does > not get into the log in the default configuration. To trigger > it one need to specify log outputs in

Re: [libvirt] [PATCH] qemu: Don't use query-migrate on destination

2016-09-12 Thread Pavel Hrdina
On Mon, Sep 12, 2016 at 12:48:28PM +0200, Jiri Denemark wrote: > When migration fails, we need to poke QEMU monitor to check for a reason > of the failure. We did this using query-migrate QMP command, which is > not supposed to return any meaningful result on the destination side. > Thus if the

Re: [libvirt] [PATCH] audit: Audit information about shmem devices

2016-09-12 Thread Michal Privoznik
On 07.09.2016 15:37, Martin Kletzander wrote: > Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1218603 > > Signed-off-by: Martin Kletzander > --- > docs/auditlog.html.in| 19 +++ > src/conf/domain_audit.c | 43

Re: [libvirt] [PATCH RESEND v2 0/5] Implementation of QEMU vhost-scsi

2016-09-12 Thread Eric Farman
On 09/06/2016 08:58 AM, Eric Farman wrote: [Resending after the release of 2.2.0; no changes other than a rebase to current master and the associated tweaking to the capabilities patch] Ping? -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] [PATCH 0/2] A couple of volume encryption patches

2016-09-12 Thread Michal Privoznik
On 06.09.2016 23:16, John Ferlan wrote: > I'm assume there will be a couple of bz's on these... > > Patch 1 fixes a problem where the vol-dumpxml would not list the > element from a volume in a pool after the initial creation and a pool > refresh (or libvirtd restart). This issue was missed due

Re: [libvirt] [PATCH 2/2] log: drain log of exiting qemu process carefully

2016-09-12 Thread Daniel P. Berrange
On Mon, Sep 12, 2016 at 02:12:10PM +0300, Nikolay Shirokovskiy wrote: > Read API call of logger daemon is used to get extra > information from terminated qemu process. For this purpose > we need to wait until qemu process finishes its writing to log. > We need to: > > 1. Read until EOF. > 2.

Re: [libvirt] [PATCH v6 1/5] domain: Add optional 'disableTLS' attribute for TCP chardev

2016-09-12 Thread John Ferlan
On 09/12/2016 04:26 AM, Daniel P. Berrange wrote: > On Fri, Sep 09, 2016 at 04:49:04PM -0400, John Ferlan wrote: >> Add an optional "disableTLS='yes'" option for a TCP chardev for the >> express purpose to not enable setting up TLS for the chardev > > Can we just call this "tls=yes|no" -

[libvirt] [PATCH] log: fix false oom error message

2016-09-12 Thread Nikolay Shirokovskiy
In case filter is new one an oom error message is reported. This bug is introduced in 51b2606f. However this error does not get into the log in the default configuration. To trigger it one need to specify log outputs in LIBVIRT_LOG_OUTPUTS variable. --- src/util/virlog.c | 3 ++- 1 file changed,

[libvirt] [PATCH 1/2] log: remove 1k limit for error messages

2016-09-12 Thread Nikolay Shirokovskiy
This limit is the issue for example when we want to return in the error message the log of the abnormally exited qemu process of the destination side in the process of migration. virVasprintf is already used in the process of logging in the callers down the stack. --- src/util/virerror.c | 9

[libvirt] [PATCH 0/2] try harder to get dest qemu errors on migation

2016-09-12 Thread Nikolay Shirokovskiy
Hi, all. In case migration fails due to destination qemu exits unexpectedly user recevies the qemu log in the error message. Unfortunately log is truncated and the most interesting part is missed (below is the example of such a log [1]). Actually for the most cases the first patch will be

[libvirt] [PATCH 2/2] log: drain log of exiting qemu process carefully

2016-09-12 Thread Nikolay Shirokovskiy
Read API call of logger daemon is used to get extra information from terminated qemu process. For this purpose we need to wait until qemu process finishes its writing to log. We need to: 1. Read until EOF. 2. Don't stop reading on hangup. virtlogd will not receive EOF as both qemu and libvirtd

[libvirt] [PATCH 0/2] try harder to get dest qemu errors on migation

2016-09-12 Thread Nikolay Shirokovskiy
Hi, all. In case migration fails due to destination qemu exits unexpectedly user recevies the qemu log in the error message. Unfortunately log is truncated and the most interesting part is missed (below is the example of such a log [1]). Actually for the most cases the first patch will be

Re: [libvirt] [PATCH v1 0/4] libxl: host cpu element in capabilities

2016-09-12 Thread Michal Privoznik
On 20.07.2016 21:08, Joao Martins wrote: > Hey, > > This small series implements host cpu description in caps, by getting > topology and xen hwcaps parsing done, followed by having > cpu-{compare,baseline} APIs implemented. Last thing missing I think it > would be to libxl_cpuid_set the features

Re: [libvirt] [PATCH v1 3/4] libxl: implement virConnectCompareCPU

2016-09-12 Thread Michal Privoznik
On 20.07.2016 21:08, Joao Martins wrote: > Implement support for "virsh cpu-compare" so that we can calculate > common cpu element between a pool of hosts, which had a requirement > of providing host cpu description. > > Signed-off-by: Joao Martins > --- >

[libvirt] [PATCH] qemu: Don't use query-migrate on destination

2016-09-12 Thread Jiri Denemark
When migration fails, we need to poke QEMU monitor to check for a reason of the failure. We did this using query-migrate QMP command, which is not supposed to return any meaningful result on the destination side. Thus if the monitor was still functional when we detected the migration failure,

[libvirt] [PATCH][RFC] enable modification of xml in case of a restore forthe combination of xen/libvirt

2016-09-12 Thread Guido.Rossmueller
Hello everybody, the modification of the xml-decription of an vm is disabled in libvirt for the combination of xen/libvirt. The following patches will enabled it. a possible use case is the restore of a vm , whose virtuell disk is on an LVM, and it should use for the restore a snapshot of this

Re: [libvirt] [gconfig v2 4/6] config: Add vnc listen getter/setter

2016-09-12 Thread Christophe Fergeau
Hey, On Mon, Sep 12, 2016 at 01:10:28AM +0300, Visarion-Mingopol Alexandru-Viorel wrote: > Hi! Sorry for the delay, I had some exams. > > _set_listen_list () is the only other name that comes into my mind. > > I also think _set_listens () is a bit odd, but _set_listen_nodes () > doesn't sound

Re: [libvirt] [PATCH] util: Quiet the logging if perf file doesn't exist

2016-09-12 Thread Michal Privoznik
On 07.09.2016 00:00, John Ferlan wrote: > Commit id 'b00d7f29' shifted the opening of the /sys/devices/intel_cqm/type > file from event enable to perf event initialization. If the file did not > exist, then an error would be written to the domain log: > > 2016-09-06 20:51:21.677+: 7310: error

Re: [libvirt] [PATCH 0/2] qemu: hotplug: Fix two issues with drives made empty by using starup policy

2016-09-12 Thread Michal Privoznik
On 05.09.2016 18:41, Peter Krempa wrote: > If a cdrom drive is emptied by 'requisite' startup policy the policy setting > would > not be cleared and due to a bug in qemu the cdrom image could not be changed. > > The first patch clears the startup policy setting and the second one fixes >

Re: [libvirt] [PATCH v6 1/5] domain: Add optional 'disableTLS' attribute for TCP chardev

2016-09-12 Thread Daniel P. Berrange
On Fri, Sep 09, 2016 at 04:49:04PM -0400, John Ferlan wrote: > Add an optional "disableTLS='yes'" option for a TCP chardev for the > express purpose to not enable setting up TLS for the chardev Can we just call this "tls=yes|no" - negative attributes (disableFOO) are kind of ugly IMHO, as they

[libvirt] [PATCH 4/4] virt-admin: Replace the (now) aliases with new command names in the man page

2016-09-12 Thread Erik Skultety
Since the old command names are being shadowed by the new ones in the code as well as in the help messages, update the man page accordingly. Signed-off-by: Erik Skultety --- tools/virt-admin.pod | 30 +++--- 1 file changed, 15 insertions(+), 15

[libvirt] [PATCH 3/4] virt-admin: Add some command aliases to provide syntax sugar over ugly commands

2016-09-12 Thread Erik Skultety
Make use of the new recently introduced alias handling for virt-admin srv-* commands. Signed-off-by: Erik Skultety --- tools/virt-admin.c | 24 1 file changed, 24 insertions(+) diff --git a/tools/virt-admin.c b/tools/virt-admin.c index

Re: [libvirt] [PATCH 0/3] add option to keep nvram file on undefine

2016-09-12 Thread Michal Privoznik
On 27.05.2016 10:05, Nikolay Shirokovskiy wrote: > There is already a patch [1] on this topic with a different approach - keep > nvram file by default. There is also some discussion there. To sum up keeping > nvram on undefine could be useful in some usecases so there should be an > option > to

[libvirt] [PATCH 0/4] Introduce aliases for virt-admin's srv-* commands

2016-09-12 Thread Erik Skultety
So, as suggested by Martin in [1], this series tweaks the command alias handling logic, so that when creating alias, it is not necessary to duplicate the original command's structure, thus creating a bit more noise. Instead, the new format for an alias structure hints very clearly that it's just

[libvirt] [PATCH 1/4] tests: fix incorrect status handling by virsh-self-test

2016-09-12 Thread Erik Skultety
The virsh-self-test script compared the test's return code with 1 and only if the return code matched this value then the test was marked as failed. Problem is that SIGSEGV returns 139 (or 11 to be precise, since shell reserves the MSB for abnormal exit signaling) which passes the check just fine

[libvirt] [PATCH 2/4] virt-admin: Tweak command parsing logic so that aliases point to new commands

2016-09-12 Thread Erik Skultety
Change the logic in a way, so that VSH_CMD_FLAG_ALIAS behaves similarly to how VSH_OT_ALIAS for command options, i.e. there is no need for code duplication for the alias and the aliased command structures. Along with that change, switch any existing VSH_CMD_FLAG_ALIAS occurrences to this new

Re: [libvirt] [PATCH] conf: allow hotplugging "legacy PCI" device to manually addressed PCIe slot

2016-09-12 Thread Michal Privoznik
On 09.09.2016 21:26, Laine Stump wrote: > In a full domain config, libvirt allows overriding the normal PCI > vs. PCI Express rules when a device address is explicitly provided > (so, e.g., you can force a legacy PCI device to plug into a PCIe port, > although libvirt would never do that on its