Re: [libvirt] [PATCH v3 0/4] numa: describe sibling nodes distances

2017-09-01 Thread Jim Fehlig
Hi Wim, I'll be away for a few weeks and won't be able to review this in detail until later in the month. I see Martin provided some feedback on patch1, which is awesome since I'd prefer a broader agreement on that patch than my single 'ack'. BTW, the new code in patch2 can also be tested

[libvirt] [PATCH] qemu: Remove unused params from qemuDomainDeviceDefValidate

2017-09-01 Thread John Ferlan
Neither @cfg nor (now) @driver is used in the API, so remove them and mark @opaque as UNUSED. NB: Commit id 'fa3c558596' dropped the unused @qemuCaps which was the last consumer of @driver other than @cfg, but even @cfg was never used even in the original implementation from commit id 'd987f63a'.

[libvirt] [PATCH v7 06/11] qemu: Add qemu command line generation for a VxHS block device

2017-09-01 Thread John Ferlan
From: Ashish Mittal The VxHS block device will only use the newer formatting options and avoid the legacy URI syntax. An excerpt for a sample QEMU command line is: -drive file.driver=vxhs,file.vdisk-id=eb90327c-8302-4725-9e1b-4e85ed4dc251,\

[libvirt] [PATCH v7 04/11] docs: Add schema and docs for Veritas HyperScale (VxHS)

2017-09-01 Thread John Ferlan
From: Ashish Mittal Alter the schema to allow a VxHS block device. Sample XML is: eb90327c-8302-4725-9e1b-4e85ed4dc251 Update the html docs to describe the capability for VxHS. Alter the qemuxml2xmltest to validate the

[libvirt] [PATCH v7 00/11] Add support for Veritas HyperScale (VxHS) block device protocol

2017-09-01 Thread John Ferlan
v6: https://www.redhat.com/archives/libvir-list/2017-August/msg00993.html Changes/notes since v6: Patch1 - Used the "right" process to create the files. There's also a separate patch on list which I used mainly to "extract" the details/needs from being associated specifically

[libvirt] [PATCH v7 10/11] util: Add virstoragetest to parse/format a tls='yes'

2017-09-01 Thread John Ferlan
From: Ashish Mittal Add a test case to verify TLS arguments are parsed correctly for a VxHS disk. This includes saving off a found tls-creds into the storage source @tlsAlias field since that's what's used to link the TLS object for the authentication credentials and

[libvirt] [PATCH v7 08/11] util: Add TLS attributes to virStorageSource

2017-09-01 Thread John Ferlan
From: Ashish Mittal Add an optional virTristateBool haveTLS to virStorageSource to manage whether a storage source will be using TLS. Sample XML for a VxHS disk: Additionally add a tlsFromConfig boolean to control whether the TLS setting was due

[libvirt] [PATCH v7 11/11] qemu: Add TLS support for Veritas HyperScale (VxHS)

2017-09-01 Thread John Ferlan
From: Ashish Mittal Alter qemu command line generation in order to possibly add TLS for a suitably configured domain. Sample TLS args generated by libvirt - -object tls-creds-x509,id=objvirtio-disk0_tls0,dir=/etc/pki/qemu,\ endpoint=client,verify-peer=yes \

[libvirt] [PATCH v7 07/11] conf: Introduce TLS options for VxHS block device clients

2017-09-01 Thread John Ferlan
From: Ashish Mittal Add a new TLS X.509 certificate type - "vxhs". This will handle the creation of a TLS certificate capability for properly configured VxHS network block device clients. The following describes the behavior of TLS for VxHS block device: (1) Two

[libvirt] [PATCH v7 09/11] qemu: Introduce qemuDomainPrepareDiskSource

2017-09-01 Thread John Ferlan
Introduce a function to setup any TLS needs for a disk source. If there's a configuration or other error setting up the disk source for TLS, then cause the domain startup to fail. For VxHS, follow the chardevTLS model where if the src->haveTLS hasn't been configured, then take the system/global

[libvirt] [PATCH v7 05/11] util: storage: Add JSON backing volume parse for VxHS

2017-09-01 Thread John Ferlan
From: Ashish Mittal Add the backing parse and a test case to verify parsing of VxHS backing storage. Signed-off-by: Ashish Mittal Signed-off-by: John Ferlan --- src/util/virstoragefile.c | 37

[libvirt] [PATCH v7 03/11] storage: Introduce VIR_STORAGE_NET_PROTOCOL_VXHS

2017-09-01 Thread John Ferlan
From: Ashish Mittal Add a new virStorageNetProtocol for Veritas HyperScale (VxHS) disks Signed-off-by: Ashish Mittal Signed-off-by: John Ferlan --- src/libxl/libxl_conf.c| 1 + src/qemu/qemu_block.c | 1

[libvirt] [PATCH v7 02/11] qemu: Detect support for vxhs

2017-09-01 Thread John Ferlan
Using the query-qmp-schema introspection - look for the 'vxhs' blockdevOptions type. NB: This is a "best effort" type situation as there is not a mechanism to determine whether the running QEMU has been built with '--enable-vxhs'. All we can do is check if the option to use vxhs for a

Re: [libvirt] [PATCH v2] news: Prepare for 3.7.0 release

2017-09-01 Thread John Ferlan
On 09/01/2017 11:01 AM, Andrea Bolognani wrote: > Documents some changes that have slipped through the cracks > during the development cycle. > > Signed-off-by: Andrea Bolognani > --- > Changes from [v1]: > > * rebase on top of master > * remove the part about guests

Re: [libvirt] [PATCH v6 02/13] qemu: Detect support for vxhs

2017-09-01 Thread Jeff Cody
On Fri, Sep 01, 2017 at 10:20:43AM +0200, Peter Krempa wrote: > On Thu, Aug 31, 2017 at 12:59:59 -0400, John Ferlan wrote: > > On 08/31/2017 11:34 AM, Peter Krempa wrote: > > [...] > > > >> @@ -1811,6 +1814,7 @@ static struct virQEMUCapsStringFlags > > >> virQEMUCapsObjectPropsIntelIOMMU[] = {

[libvirt] [PATCH v2] news: Prepare for 3.7.0 release

2017-09-01 Thread Andrea Bolognani
Documents some changes that have slipped through the cracks during the development cycle. Signed-off-by: Andrea Bolognani --- Changes from [v1]: * rebase on top of master * remove the part about guests no longer disappearing if the QEMU binary is missing, since

Re: [libvirt] [PATCH v3 1/4] numa: describe siblings distances within cells

2017-09-01 Thread Wim ten Have
On Thu, 31 Aug 2017 16:36:58 +0200 Martin Kletzander wrote: > On Thu, Aug 31, 2017 at 04:02:38PM +0200, Wim Ten Have wrote: > >From: Wim ten Have > > > I haven't seen the previous versions, so sorry if I point out something > that got changed

[libvirt] [PATCH] news: Prepare for 3.7.0 release

2017-09-01 Thread Andrea Bolognani
Documents some changes that have slipped through the cracks during the development cycle. Signed-off-by: Andrea Bolognani --- I'll push this by the end of tomorrow under the "nobody reads the release notes" rule, unless I get either an ACK or a NACK earlier. docs/news.xml

Re: [libvirt] [PATCH 2/3] libvirtaio: add allow for moving callbacks to other event loop

2017-09-01 Thread Wojtek Porczyk
On Fri, Sep 01, 2017 at 01:16:51PM +0100, Daniel P. Berrange wrote: > On Fri, Sep 01, 2017 at 01:51:17PM +0200, Wojtek Porczyk wrote: > > On Fri, Sep 01, 2017 at 10:08:18AM +0100, Daniel P. Berrange wrote: > > > IIUC, you are trying to make it possible to register multiple event > > > loop impls.

Re: [libvirt] [PATCH] news: Add stuff for 3.7.0

2017-09-01 Thread Ján Tomko
On Fri, Sep 01, 2017 at 02:59:15PM +0200, Peter Krempa wrote: --- docs/news.xml | 22 ++ 1 file changed, 22 insertions(+) ACK Jan signature.asc Description: Digital signature -- libvir-list mailing list libvir-list@redhat.com

[libvirt] [PATCH] news: Add stuff for 3.7.0

2017-09-01 Thread Peter Krempa
--- docs/news.xml | 22 ++ 1 file changed, 22 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 4b48f0fb3..dd8967e25 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -71,6 +71,16 @@ + + + qemu: Report a clear error when

[libvirt] [PATCH] event: ignore attempts to replace the event loop impl

2017-09-01 Thread Daniel P. Berrange
Although not previously explicitly documented, the expectation for the libvirt event loop is that an implementation is registered early in application startup, before calling any libvirt APIs and then run forever after. Replacing a previously registered event loop is not safe & subject to races

Re: [libvirt] [PATCH 2/3] libvirtaio: add allow for moving callbacks to other event loop

2017-09-01 Thread Daniel P. Berrange
On Fri, Sep 01, 2017 at 01:51:17PM +0200, Wojtek Porczyk wrote: > On Fri, Sep 01, 2017 at 10:08:18AM +0100, Daniel P. Berrange wrote: > > IIUC, you are trying to make it possible to register multiple event > > loop impls. This is *not* supported usage of libvirt. You must > > call

Re: [libvirt] [PATCH 2/3] libvirtaio: add allow for moving callbacks to other event loop

2017-09-01 Thread Wojtek Porczyk
On Fri, Sep 01, 2017 at 10:08:18AM +0100, Daniel P. Berrange wrote: > IIUC, you are trying to make it possible to register multiple event > loop impls. This is *not* supported usage of libvirt. You must > call 'virEventRegisterImpl' before opening any connection, and once > called you are

Re: [libvirt] [PATCH] virnetdaemon: Don't deadlock when talking to D-Bus

2017-09-01 Thread Erik Skultety
On Fri, Sep 01, 2017 at 10:39:10AM +0200, Michal Privoznik wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1487322 > > In ace45e67abbd I've tried to fix a problem that we get the reply s/I've/I --> the point in the past is known ;) > to a D-Bus call while we were sleeping. In that case the

[libvirt] [PATCH v2] vmx: Expose VMware Managed Object Reference (moref) in

2017-09-01 Thread Richard W.M. Jones
v1 -> v2: - Implemented all the review recommendations. I didn't add a test. Is it even possible to test this without a VMware server? I did however test it myself with a real server and it works as expected for me. Rich. -- libvir-list mailing list libvir-list@redhat.com

[libvirt] [PATCH v2] vmx: Expose VMware Managed Object Reference (moref) in XML.

2017-09-01 Thread Richard W.M. Jones
If you use the VDDK library to access virtual machines remotely, you really need to know the Managed Object Reference ("moref") of the VM. This must be passed each time you connect to the API. For example nbdkit's VDDK plugin requires a moref to be passed to mount up a VM's disk remotely:

Re: [libvirt] [PATCH] virnetdaemon: Don't deadlock when talking to D-Bus

2017-09-01 Thread Christian Ehrhardt
On Fri, Sep 1, 2017 at 10:39 AM, Michal Privoznik wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1487322 > > In ace45e67abbd I've tried to fix a problem that we get the reply > to a D-Bus call while we were sleeping. In that case the callback > was never set. So I've

Re: [libvirt] [PATCH] vmx: Expose VMware Managed Object Reference (moref) in XML.

2017-09-01 Thread Michal Privoznik
On 08/25/2017 04:04 PM, Richard W.M. Jones wrote: > If you use the VDDK library to access virtual machines remotely, you > really need to know the Managed Object Reference ("moref") of the VM. > This must be passed each time you connect to the API. > > For example nbdkit's VDDK plugin requires a

Re: [libvirt] [PATCH 2/3] libvirtaio: add allow for moving callbacks to other event loop

2017-09-01 Thread Daniel P. Berrange
On Thu, Aug 31, 2017 at 09:40:23PM +0200, Wojtek Porczyk wrote: > The virEvent implementation is tied to a particular loop. When spinning > another loop, the callbacks have to be moved to another implementation, > so they will have a chance to be invoked, should they be scheduled. If > not, file

Re: [libvirt] [PATCH] qemu: handle -1 for pid in qemuDomainGetMachineName

2017-09-01 Thread Michal Privoznik
On 08/31/2017 11:29 AM, Daniel P. Berrange wrote: > On Thu, Aug 31, 2017 at 12:01:44PM +0300, Nikolay Shirokovskiy wrote: >> We call qemuDomainGetMachineName on domain start. On first >> start (after daemon start) pid is 0 and virSystemdGetMachineNameByPID >> don't get called. But after domain

[libvirt] [PATCH] virnetdaemon: Don't deadlock when talking to D-Bus

2017-09-01 Thread Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=1487322 In ace45e67abbd I've tried to fix a problem that we get the reply to a D-Bus call while we were sleeping. In that case the callback was never set. So I've changed the code that the callback is called directly in this case. However, I hadn't

Re: [libvirt] [PATCH v3 3/6] udev: Convert udevEventHandleThread to an actual thread routine

2017-09-01 Thread Erik Skultety
On Thu, Aug 31, 2017 at 12:23:09PM -0400, John Ferlan wrote: > > > On 08/29/2017 08:49 AM, Erik Skultety wrote: > > On Mon, Aug 28, 2017 at 12:26:08PM -0400, John Ferlan wrote: > >> > >> > >> On 08/24/2017 07:23 AM, Erik Skultety wrote: > >>> Adjust udevEventHandleThread to be a proper thread

Re: [libvirt] [PATCH v6 02/13] qemu: Detect support for vxhs

2017-09-01 Thread Peter Krempa
On Thu, Aug 31, 2017 at 12:59:59 -0400, John Ferlan wrote: > On 08/31/2017 11:34 AM, Peter Krempa wrote: [...] > >> @@ -1811,6 +1814,7 @@ static struct virQEMUCapsStringFlags > >> virQEMUCapsObjectPropsIntelIOMMU[] = { > >> static struct virQEMUCapsStringFlags virQEMUCapsQMPSchemaQueries[] = {

[libvirt] [PATCH v4 10/13] qemu: introduce migrating job status

2017-09-01 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 v4 07/13] qemu: simplify getting completed job stats

2017-09-01 Thread Nikolay Shirokovskiy
--- src/qemu/qemu_driver.c | 25 +++-- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 43244d0..fe41b9f 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -12987,12 +12987,17 @@

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

2017-09-01 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

[libvirt] [PATCH v4 06/13] qemu: refactor fetching migration stats

2017-09-01 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. This patch drops updating job status on getting job stats by client. This way we

[libvirt] [PATCH v4 11/13] qemu: always get job condition on getting job stats

2017-09-01 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(+),

[libvirt] [PATCH v4 05/13] qemu: drop excessive zero-out in qemuMigrationFetchJobStatus

2017-09-01 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 33171e5..e2760d1 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -1387,7

[libvirt] [PATCH v4 02/13] qemu: introduce qemu domain job status

2017-09-01 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 | 10 +++-

[libvirt] [PATCH v4 04/13] qemu: drop QEMU_MIGRATION_COMPLETED_UPDATE_STATS

2017-09-01 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 v4 03/13] qemu: introduce QEMU_DOMAIN_JOB_STATUS_POSTCOPY

2017-09-01 Thread Nikolay Shirokovskiy
Let's introduce QEMU_DOMAIN_JOB_STATUS_POSTCOPY state for job.current->status instead of checking job.current->stats.status. The latter can be changed when fetching migration statistics. Moving state function from the variable and leave only store function seems more managable. This patch removes

[libvirt] [PATCH v4 01/13] qemu: drop code for VIR_DOMAIN_JOB_BOUNDED and timeRemaining

2017-09-01 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_driver.c | 3 +-- src/qemu/qemu_migration_cookie.c | 5 - 4 files changed, 1 insertion(+), 15

[libvirt] [PATCH v4 12/13] qemu: migrate: add mirror stats to migration stats

2017-09-01 Thread Nikolay Shirokovskiy
When getting job info in case mirror does not reach ready phase fetch mirror stats from qemu. Otherwise mirror stats are already saved in current job. --- src/qemu/qemu_domain.c| 31 +++ src/qemu/qemu_domain.h| 9 src/qemu/qemu_driver.c| 5 +

[libvirt] [PATCH v4 00/13] qemu: migration: show disks stats for nbd migration

2017-09-01 Thread Nikolay Shirokovskiy
diff from v3: 1. Fix misc style issues 2. Use different structure to store mirror stats 3. Drop logic to update mirror stats after mirror become ready This patch series add disks stats to domain job info(stats) as well as to migration completed event in case nbd scheme is used.

[libvirt] [PATCH v4 09/13] qemu: start all async job with job status active

2017-09-01 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 +

[libvirt] [PATCH v4 08/13] qemu: fail querying destination migration statistics always

2017-09-01 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. ---