Re: [libvirt] [PATCH v3] Add support for Veritas HyperScale (VxHS) block device protocol

2017-04-11 Thread ashish mittal
Thanks for the information. I'll work with this and get back if I get stuck somewhere. My immediate objective is to figure out how to pass the TLS x509 certificate information to the vxhs block device on the qemu command line. I guess I expected some other block device (i.e. NBD) to call the qemuB

Re: [libvirt] [PATCH v3] Add support for Veritas HyperScale (VxHS) block device protocol

2017-04-11 Thread John Ferlan
On 04/10/2017 07:32 PM, ashish mittal wrote: > Hi, > > I'm trying to figure out what changes are needed in the libvirt vxhs > patch to support passing TLS X509 arguments to qemu, similar to the > following - > > Sample QEMU command line passing TLS credentials to the VxHS block > device (run in

[libvirt] [PATCH v2] hyperv: recognize array property as distinct type.

2017-04-11 Thread Dawid Zamirski
When hyperv code generator for WMI classes identifies common properties, it needs to take into account array type as a distinct type, i.e string != string[]. This is the case where v1 of the Msvm_VirtualSystemSettingData has Notes property as string whereas v2 uses Notes[], therefore they have to b

Re: [libvirt] [PATCH] hyperv: recognize array property as distinct type.

2017-04-11 Thread Matthias Bolte
2017-04-11 17:02 GMT+02:00 Dawid Zamirski : > When hyperv code generator for WMI classes identifies common > properties, it needs to take into account array type as a distinct > type, i.e string != string[]. This is the case where v1 of the > Msvm_VirtualSystemSettingData has Notes property as stri

[libvirt] virsh manpage bug: wrong argument order for virsh vol-resize

2017-04-11 Thread Feiko Nanninga
According to the manpage the arguments for virsh vol-resize are: vol-resize [--pool pool-or-uuid] vol-name-or-path pool-or-uuid capacity […] But actually only vol-resize --pool pool-or-uuid vol-name-or-path capacity or vol-resize vol-name-or-path capacity pool-or-uuid are accepted. So and ar

[libvirt] [PATCH 9/9] virsh-domain: Refactor cmdTTYConsole

2017-04-11 Thread Peter Krempa
Use the new XML helpers and use virXPathString rather than hand-rolling the code. --- tools/virsh-domain.c | 24 +--- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index d64a2dca0..d6f33b1ee 100644 --- a/tools/virsh-d

[libvirt] [PATCH 5/9] vsh: Add helper for safe remembering of libvirt errors

2017-04-11 Thread Peter Krempa
Avoid the annoying issue where the public object freeing APIs overwrite the error set by helper functions, since they don't invoke the callback. The new helper remembers the error only if no previous error was set. --- tools/virsh-util.c | 2 ++ tools/vsh.c| 15 +++ tools/vsh

[libvirt] [PATCH 8/9] virsh-domain: Use the virsh wrappers for getting XML to simplify code

2017-04-11 Thread Peter Krempa
Reuse virshDomainGetXML and virshDomainGetXMLFromDom. --- tools/virsh-domain.c | 62 ++-- 1 file changed, 12 insertions(+), 50 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index ba179c89c..d64a2dca0 100644 --- a/tools/virsh-

[libvirt] [PATCH 4/9] virsh: Add wrapper for virDomainSnapshotFree

2017-04-11 Thread Peter Krempa
Similarly to virshDomainFree add a wrapper for the snapshot object freeing function. --- tools/virsh-snapshot.c | 48 ++-- tools/virsh-util.c | 10 ++ tools/virsh-util.h | 3 +++ 3 files changed, 31 insertions(+), 30 deletions(-) diff -

[libvirt] [PATCH 6/9] virsh: add helpers for getting domain XML for XPath purposes

2017-04-11 Thread Peter Krempa
In virsh we quite often get the domain XML just to initialize the XPath parser so that we can extract information. Add helpers which will simplify this by wrapping the getting of the XML and parsing it along with error reporting. Additionally a second helper also gets the domain object from the p

[libvirt] [PATCH 7/9] virsh-domain-monitor: Use the virsh wrappers for getting XML to simplify code

2017-04-11 Thread Peter Krempa
Reuse virshDomainGetXML and virshDomainGetXMLFromDom. --- tools/virsh-domain-monitor.c | 57 1 file changed, 5 insertions(+), 52 deletions(-) diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain-monitor.c index 92995ad7d..3db4795d2 100644 ---

[libvirt] [PATCH 3/9] virsh-util: Add wrapper for virDomainFree

2017-04-11 Thread Peter Krempa
virDomainFree has it's quirks (does not like NULL pointers, resets libvirt errors). Replace it by a virsh helper which will allow us to centrally fix issues with it. The syntax-check rule will prohibit new uses of virDomainFree. --- cfg.mk | 8 ++ tools/virsh-domain-monito

[libvirt] [PATCH 2/9] virsh-util: Move domain lookup helpers into virsh-util

2017-04-11 Thread Peter Krempa
Move virshLookupDomainBy, virshCommandOptDomainBy and virshCommandOptDomainBy to the helper file. Additionally turn the virshCommandOptDomainBy macro into a function. --- po/POTFILES.in | 1 + tools/virsh-domain-monitor.c | 1 - tools/virsh-domain.c | 71 ---

[libvirt] [PATCH 0/9] virsh: don't overwrite errors in virDomain(Snapshot)Free functions and other refactors

2017-04-11 Thread Peter Krempa
Avoid the annoying problem that virDomainFree and virDomainSnapshotFree reset libvirt errors and thus errors from helper functions don't get reported. This seriesl also contains other refactors which I noticed along. Peter Krempa (9): virsh: Add new file for utility functions and move a few v

[libvirt] [PATCH 1/9] virsh: Add new file for utility functions and move a few

2017-04-11 Thread Peter Krempa
Don't accumulate helpers in virsh.c --- tools/Makefile.am| 1 + tools/virsh-domain-monitor.c | 1 + tools/virsh-domain.c | 1 + tools/virsh-util.c | 66 tools/virsh-util.h | 35 +++ tools/vi

Re: [libvirt] [PATCH v4 09/14] hostdev: Maintain a driver list of active mediated devices

2017-04-11 Thread Daniel P. Berrange
On Wed, Mar 22, 2017 at 04:27:37PM +0100, Erik Skultety wrote: > Keep track of the assigned mediated devices the same way we do it for > the rest of hostdevs. Methods like 'Prepare', 'Update', and 'ReAttach' > are introduced by this patch. > > Signed-off-by: Erik Skultety > --- > src/libvirt_pri

[libvirt] [PATCH] hyperv: recognize array property as distinct type.

2017-04-11 Thread Dawid Zamirski
When hyperv code generator for WMI classes identifies common properties, it needs to take into account array type as a distinct type, i.e string != string[]. This is the case where v1 of the Msvm_VirtualSystemSettingData has Notes property as string whereas v2 uses Notes[], therefore they have to b

Re: [libvirt] Question about virsh domifaddr

2017-04-11 Thread Daniel P. Berrange
On Tue, Apr 11, 2017 at 06:48:05AM -0700, Vinod Chegu wrote: > Hi, > > In one of our test env. the virsh domifaddr --full doesn't > provide any info about the interfaces of a live VM when the interfaces were > configured on linux bridges (DHCP is being used to IPs). This command does > return in

[libvirt] Question about virsh domifaddr

2017-04-11 Thread Vinod Chegu
Hi, In one of our test env. the virsh domifaddr --full doesn't provide any info about the interfaces of a live VM when the interfaces were configured on linux bridges (DHCP is being used to IPs). This command does return information when interfaces were using NAT. Is this expected behavior ? T

Re: [libvirt] [PATCH] tests: link virpcimock with utils

2017-04-11 Thread Martin Kletzander
On Mon, Apr 10, 2017 at 12:26:40PM +0100, Daniel P. Berrange wrote: On Mon, Apr 10, 2017 at 01:18:05PM +0200, Michal Privoznik wrote: On 04/10/2017 01:04 PM, Daniel P. Berrange wrote: > On Mon, Apr 10, 2017 at 01:00:58PM +0200, Michal Privoznik wrote: >> On 04/10/2017 09:52 AM, Pavel Hrdina wrot

Re: [libvirt] [PATCH 0/8] qemu tests improvements and cleanups

2017-04-11 Thread Pavel Hrdina
On Tue, Apr 11, 2017 at 01:39:48PM +0200, Ján Tomko wrote: > On Fri, Apr 07, 2017 at 03:44:15PM +0200, Pavel Hrdina wrote: > >Pavel Hrdina (8): > > tests/qemuxml2argvtest: remove unnecessary machine canonicalization > > tests/qemuxml2xmltest: remove NOP call of virQEMUCapsSetList > > tests: use

Re: [libvirt] [PATCH 8/8] tests/testutilsqemu: properly initialize qemu caps for tests

2017-04-11 Thread Pavel Hrdina
On Tue, Apr 11, 2017 at 01:39:08PM +0200, Ján Tomko wrote: > On Fri, Apr 07, 2017 at 03:44:23PM +0200, Pavel Hrdina wrote: > >This removes the hacky extern global variable and modifies the > >test code to properly create QEMU capabilities cache for QEMU > >binaries used in our tests. > > > >Signed-

Re: [libvirt] [PATCH 0/8] qemu tests improvements and cleanups

2017-04-11 Thread Ján Tomko
On Fri, Apr 07, 2017 at 03:44:15PM +0200, Pavel Hrdina wrote: Pavel Hrdina (8): tests/qemuxml2argvtest: remove unnecessary machine canonicalization tests/qemuxml2xmltest: remove NOP call of virQEMUCapsSetList tests: use global virQEMUDriver tests/testutilsqemu: extract guest creation into sep

Re: [libvirt] [PATCH 8/8] tests/testutilsqemu: properly initialize qemu caps for tests

2017-04-11 Thread Ján Tomko
On Fri, Apr 07, 2017 at 03:44:23PM +0200, Pavel Hrdina wrote: This removes the hacky extern global variable and modifies the test code to properly create QEMU capabilities cache for QEMU binaries used in our tests. Signed-off-by: Pavel Hrdina --- src/qemu/qemu_capabilities.c | 6 -- tests/q

Re: [libvirt] [PATCH 4/8] tests/testutilsqemu: extract guest creation into separate functions

2017-04-11 Thread Ján Tomko
On Fri, Apr 07, 2017 at 03:44:19PM +0200, Pavel Hrdina wrote: All other architectures have separate functions to prepare guest capabilities, do the same for i686 and x86_64 as well. Signed-off-by: Pavel Hrdina --- tests/testutilsqemu.c | 182 +++--- 1

Re: [libvirt] [PATCH 0/4] fix some resource leaks

2017-04-11 Thread Pavel Hrdina
On Tue, Apr 11, 2017 at 12:51:58PM +0200, Ján Tomko wrote: > On Mon, Apr 10, 2017 at 09:53:56AM +0200, Pavel Hrdina wrote: > >Pavel Hrdina (4): > > conf/domain_capabilities: fix resource leak > > src: fix multiple resource leaks in loops > > rpc: fix resource leak > > tests: fix some resource l

Re: [libvirt] [PATCH 0/4] fix some resource leaks

2017-04-11 Thread Ján Tomko
On Mon, Apr 10, 2017 at 09:53:56AM +0200, Pavel Hrdina wrote: Pavel Hrdina (4): conf/domain_capabilities: fix resource leak src: fix multiple resource leaks in loops rpc: fix resource leak tests: fix some resource leaks ACK series, terms and conditions apply. Jan signature.asc Descripti

Re: [libvirt] [PATCH 0/2] Fixes for CI virt-manager test failures

2017-04-11 Thread Michal Privoznik
On 04/10/2017 07:56 PM, John Ferlan wrote: Test began failing after commit 'd06d1a32' and 'be3c2dfd': https://ci.centos.org/view/libvirt/job/virt-manager-master-check/systems=libvirt-fedora-rawhide/426/console Needed to fix the aclfilter check in both NumOfDevices and GetNames John Ferlan (2)

Re: [libvirt] [PATCH 4/4] tests: fix some resource leaks

2017-04-11 Thread Ján Tomko
On Mon, Apr 10, 2017 at 09:54:00AM +0200, Pavel Hrdina wrote: Found by running valgrind for these tests. Signed-off-by: Pavel Hrdina --- tests/commandtest.c| 3 +++ tests/domaincapstest.c | 2 ++ tests/fchosttest.c | 2 ++ tests/vircgroupmock.c | 2 ++ 4 files changed, 9 insertions(+) dif

Re: [libvirt] [PATCH 2/4] src: fix multiple resource leaks in loops

2017-04-11 Thread Ján Tomko
On Mon, Apr 10, 2017 at 09:53:58AM +0200, Pavel Hrdina wrote: All of the variables are filled inside a loop and therefore needs to be also freed in every cycle. Signed-off-by: Pavel Hrdina --- src/conf/node_device_conf.c | 10 +- src/conf/storage_conf.c | 1 + src/util/virsysinfo.c

[libvirt] [RFC] RFC: Reimplement cache allocation for a VM

2017-04-11 Thread Eli Qiao
This is a RFC patch for the reimplement of `support cache tune(CAT) in libvirt`[1]. There are already patch sets[2] to address it, and functional works, but people doesn't like it cause it has global variable, and missing unit test case for new added capabilites, etc. Martin has proposed a test i

[libvirt] [PATCH V5] Expose resource control capabilites on cache bank

2017-04-11 Thread Eli Qiao
This patch is based on Martin's cache branch. * This patch amends the cache bank capability as follow: For CDP enabled on x86 arch, we will have: ... * Added a new testdata directory `linux-resctrl-cdp` to test CDP enabled case. * Along with vircaps2xml

Re: [libvirt] Determining domain job kind from job stats?

2017-04-11 Thread Daniel P. Berrange
On Tue, Apr 11, 2017 at 09:49:42AM +0200, Jiri Denemark wrote: > On Mon, Apr 10, 2017 at 12:01:43 +0100, Daniel P. Berrange wrote: > > On Mon, Apr 10, 2017 at 12:58:09PM +0200, Milan Zamazal wrote: > > > I looked how the change could be implemented. Could you please help me > > > clarify some thin

Re: [libvirt] [PATCH V4] Expose resource control capabilites on cache bank

2017-04-11 Thread Eli Qiao
On Tuesday, 11 April 2017 at 4:10 PM, Martin Kletzander wrote: > This should just be: > > + if (virAsprintf(&resctrl, "%s/vircaps2xmldata/linux-%s/resctrl", > + abs_srcdir, data->filename) < 0) > yep, stupid me. I get it now. -- libvir-list mailing list libvir-list@redhat.com https://www.redha

[libvirt] [PATCH v3 03/16] qemu: introduce QEMU_DOMAIN_JOB_STATUS_POSTCOPY

2017-04-11 Thread Nikolay Shirokovskiy
Current code consults job.current->stats.status to check for postcopy state. First it is more correct to check for both job.current->status and job.current->stats.status.code because on some paths on failures we change only the former. Second if qemu supports migration events then stats can change

[libvirt] [PATCH v3 10/16] qemu: introduce migrating job status

2017-04-11 Thread Nikolay Shirokovskiy
Instead of checking stat.status let's set status to migrating as soon as migrate command is send (waiting for completion is a good place too). --- src/qemu/qemu_domain.c| 1 + src/qemu/qemu_domain.h| 1 + src/qemu/qemu_driver.c| 4 +++- src/qemu/qemu_migration.c | 9 +++-- 4 files

[libvirt] [PATCH v3 11/16] qemu: always get job condition on getting job stats

2017-04-11 Thread Nikolay Shirokovskiy
Looks like it is more simple to drop this optimization as we are going to add getting disks stats during migration via quering qemu process and checking if we have to acquire job condition becomes more complicate. --- src/qemu/qemu_driver.c | 15 +-- 1 file changed, 5 insertions(+), 10

[libvirt] [PATCH v3 14/16] qemu: migation: resolve race on getting job info and stopping block jobs

2017-04-11 Thread Nikolay Shirokovskiy
During stopping mirror block jobs vm lock is droped on awating block job events, thus next scenario is possible: 1. stop mirror block job is sent 2. migration routine awaits for block job event 3. mirror job stopped and event send 4. getting migration job info routine asks for block job info and a

[libvirt] [PATCH v3 13/16] qemu: support getting disks stats during stopping block jobs

2017-04-11 Thread Nikolay Shirokovskiy
Let's store disks stats for completed mirror jobs in current job info. So on getting migration job stats thru API we take records for completed jobs from current job info and records for still active jobs by querying qemu process. As we need to keep disks stats for completed mirror jobs in current

[libvirt] [PATCH v3 16/16] qemu: migration: don't expose incomplete job as complete

2017-04-11 Thread Nikolay Shirokovskiy
In case of real migration (not migrating to file on save, dump etc) migration info is not complete at time qemu finishes migration in normal (non postcopy) mode. We need to update disks stats, downtime info etc. Thus let's not expose this job status as completed. To archive this let's set status t

[libvirt] [PATCH v3 07/16] qemu: simplify getting completed job stats

2017-04-11 Thread Nikolay Shirokovskiy
--- src/qemu/qemu_driver.c | 26 -- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index f23503a..da4d8e9 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -12744,12 +12744,18 @@ qemuDomainGe

[libvirt] [PATCH v3 00/16] qemu: migration: show disks stats for nbd migration

2017-04-11 Thread Nikolay Shirokovskiy
diff from v2: 1. Fix style issues. 2. Rework patch for fetching job info (save logic to use temporary variable when drop vm lock) 3. Update disk stats when block jobs are canceled. 4. Adress a few more corner cases. This patch series add disks stats to domain job info(stats) as w

[libvirt] [PATCH v3 02/16] qemu: introduce qemu domain job status

2017-04-11 Thread Nikolay Shirokovskiy
This patch simply switches code from using VIR_DOMAIN_JOB_* to introduced QEMU_DOMAIN_JOB_STATUS_*. Later this gives us freedom to introduce states for postcopy and mirroring phases. --- src/qemu/qemu_domain.c | 27 -- src/qemu/qemu_domain.h | 11 -

[libvirt] [PATCH v3 12/16] qemu: migrate: show disks stats on job info requests

2017-04-11 Thread Nikolay Shirokovskiy
This patch shows incorrect info when client request comes when migration routine is stopping mirror jobs or mirror jobs already stopped. This issue will be addressed in next patch. --- src/qemu/qemu_driver.c| 4 src/qemu/qemu_migration.c | 49 +

[libvirt] [PATCH v3 09/16] qemu: start all async job with job status active

2017-04-11 Thread Nikolay Shirokovskiy
Setting status to none has little value - getting job status will not return even elapsed time. After this patch getting job stats stays correct in a sence it will not fetch migration stats because it consults stats.status before doing the fetch. --- src/qemu/qemu_domain.c| 1 + src/qemu/qemu

Re: [libvirt] [PATCH V4] Expose resource control capabilites on cache bank

2017-04-11 Thread Eli Qiao
On Tuesday, 11 April 2017 at 3:48 PM, Peter Krempa wrote: > On Tue, Apr 11, 2017 at 13:44:26 +0800, Eli Qiao wrote: > > This patch is based on Martin's cache branch. > > > > * This patch amends the cache bank capability as follow: > > > > > > > > > > > > > > > > > > > > > > For CDP

Re: [libvirt] [PATCH V4] Expose resource control capabilites on cache bank

2017-04-11 Thread Martin Kletzander
On Tue, Apr 11, 2017 at 09:48:54AM +0200, Peter Krempa wrote: On Tue, Apr 11, 2017 at 13:44:26 +0800, Eli Qiao wrote: This patch is based on Martin's cache branch. * This patch amends the cache bank capability as follow: For CDP enabled on x86 arch, we will have:

Re: [libvirt] Determining domain job kind from job stats?

2017-04-11 Thread Jiri Denemark
On Mon, Apr 10, 2017 at 12:01:43 +0100, Daniel P. Berrange wrote: > On Mon, Apr 10, 2017 at 12:58:09PM +0200, Milan Zamazal wrote: > > I looked how the change could be implemented. Could you please help me > > clarify some things? > > > > - I think a new member should be added to _virDomainJobInf

Re: [libvirt] [PATCH V4] Expose resource control capabilites on cache bank

2017-04-11 Thread Peter Krempa
On Tue, Apr 11, 2017 at 13:44:26 +0800, Eli Qiao wrote: > This patch is based on Martin's cache branch. > > * This patch amends the cache bank capability as follow: > > > > > > > > > > > For CDP enabled on x86 arch, we will have: > > > > > > ... > > * Ad

[libvirt] [PATCH v3 04/16] qemu: drop QEMU_MIGRATION_COMPLETED_UPDATE_STATS

2017-04-11 Thread Nikolay Shirokovskiy
This way we get stats only in one place. The former code waits for complete/postcopy status basically and don't need to mess with stats. The patch drops raising an error on stats updates failure. This does not make much sense anyway. --- src/qemu/qemu_migration.c | 24 +++- 1

[libvirt] [PATCH v3 06/16] qemu: refactor fetching migration stats

2017-04-11 Thread Nikolay Shirokovskiy
qemuMigrationFetchJobStatus is rather inconvinient. Some of its callers don't need status to be updated, some don't need to update elapsed time right away. So let's update status or elapsed time in callers instead. In qemuMigrationConfirmPhase we should fetch stats with copy flag set as stats vari

[libvirt] [PATCH v3 05/16] qemu: drop excessive zero-out in qemuMigrationFetchJobStatus

2017-04-11 Thread Nikolay Shirokovskiy
qemuMonitorGetMigrationStats will do it for us anyway. --- src/qemu/qemu_migration.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index f766ca6..022fad0 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -1355,7 +13

[libvirt] [PATCH v3 01/16] qemu: drop code for VIR_DOMAIN_JOB_BOUNDED and timeRemaining

2017-04-11 Thread Nikolay Shirokovskiy
qemu driver does not have VIR_DOMAIN_JOB_BOUNDED jobs and timeRemaining is always 0. --- src/qemu/qemu_domain.c | 7 --- src/qemu/qemu_domain.h | 1 - src/qemu/qemu_migration_cookie.c | 5 - 3 files changed, 13 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qem

[libvirt] [PATCH v3 08/16] qemu: fail querying destination migration statistics always

2017-04-11 Thread Nikolay Shirokovskiy
Querying destination migration statistics may result in getting a failure or getting a elapsed time value depending on stats.status value which is odd. Instead let's always fail. Clients should be ready to handle this as currently getting failure period can be considerable. --- src/qemu/qemu_drive

[libvirt] [PATCH v3 15/16] qemu: migrate: copy disks stats to completed job

2017-04-11 Thread Nikolay Shirokovskiy
--- src/qemu/qemu_migration.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 76c8554..1703274 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -3831,6 +3831,13 @@ qemuMigrationRun(virQEMUDriverPtr driv