[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

[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 @@

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

2017-04-11 Thread Nikolay Shirokovskiy
total: 1.032 GiB The above is applied to qemu 2.6 at least. Patches that were explicitly ACKed in previous review (up to style issues) marked with A. Nikolay Shirokovskiy (16): qemu: drop code for VIR_DOMAIN_JOB_BOUNDED and timeRemaining A qemu: introduce qemu domain job status A qemu

[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 +

[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

[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

[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

[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. ---

[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

[libvirt] [PATCH 1/2] qemu: take current async job into account in qemuBlockNodeNamesDetect

2017-04-07 Thread Nikolay Shirokovskiy
Becase it can be called during migration out (namely on cancelling blockjobs). --- src/qemu/qemu_block.c | 6 -- src/qemu/qemu_block.h | 4 +++- src/qemu/qemu_blockjob.c | 9 ++--- src/qemu/qemu_blockjob.h | 4 src/qemu/qemu_driver.c| 11 ++-

[libvirt] [PATCH 0/2] qemu: migration: bugfixes for cancelling drive mirror

2017-04-07 Thread Nikolay Shirokovskiy
Nikolay Shirokovskiy (2): qemu: take current async job into account in qemuBlockNodeNamesDetect qemu: migration: fix race on cancelling drive mirror src/qemu/qemu_block.c | 6 -- src/qemu/qemu_block.h | 4 +++- src/qemu/qemu_blockjob.c | 9 ++--- src/qemu/qemu_blockjob.h

[libvirt] [PATCH 2/2] qemu: migration: fix race on cancelling drive mirror

2017-04-07 Thread Nikolay Shirokovskiy
0feebab2 adds calling qemuBlockNodeNamesDetect for completed job on updating block jobs. This affects cancelling drive mirror logic as this function drops vm lock. Now we have to recheck all disks before the disk with the completed block job before going to wait for block job events. ---

Re: [libvirt] [PATCH] vz: fix typo that breaks build

2017-04-04 Thread Nikolay Shirokovskiy
On 04.04.2017 15:46, Martin Kletzander wrote: > On Tue, Apr 04, 2017 at 01:02:21PM +0300, Nikolay Shirokovskiy wrote: >> --- >> >> I guess it should be back ported to 3.2.0 release too. Sorry that >> we missed this during freeze period. >> > > I'm really

[libvirt] [PATCH] vz: fix typo that breaks build

2017-04-04 Thread Nikolay Shirokovskiy
--- I guess it should be back ported to 3.2.0 release too. Sorry that we missed this during freeze period. src/vz/vz_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c index bb1afd0..da83a8f 100644 --- a/src/vz/vz_driver.c +++

[libvirt] [PATCH v2] qemu: command: align disk serial check to schema

2017-03-28 Thread Nikolay Shirokovskiy
Disk serial schema has extra '.+' allowed characters in comparison with check in code. Looks like there is no reason for that as qemu allows any character AFAIK for serial. This discrepancy is originated in 85d15b51 where ability to add serial was added. --- Diff from v1: * fix xml2argv disk

[libvirt] [PATCH] qemu: command: align disk serial check to schema

2017-03-27 Thread Nikolay Shirokovskiy
Disk serial schema has extra '.+' allowed characters in comparison with check in code. Looks like there is no reason for that as qemu allows any character AFAIK for serial. This discrepancy is originated in 85d15b51 where ability to add serial was added. --- src/qemu/qemu_command.c | 2 +- 1 file

Re: [libvirt] [PATCH RESEND] vz: make more accurate closing connection to sdk

2017-02-26 Thread Nikolay Shirokovskiy
On 23.02.2017 12:08, Michal Privoznik wrote: > On 02/03/2017 08:01 AM, Nikolay Shirokovskiy wrote: >> Current code for example can call unsubscribe if connection >> succeeds but subscribing fails. This will probabaly lead >> only to spurious error messages without any a

Re: [libvirt] [RFC PATCH 00/10] introduce push backups

2017-02-17 Thread Nikolay Shirokovskiy
On 08.02.2017 17:52, Martin Kletzander wrote: > On Wed, Jan 18, 2017 at 01:21:48PM +0300, Nikolay Shirokovskiy wrote: >> By the way we came to agreement to create distinct API to support backup >> operations in [1] >> and there is a discussion of pull backup series in [2].

Re: [libvirt] [PATCH v2 12/12] qemu: show disks stats for nbd migration

2017-02-17 Thread Nikolay Shirokovskiy
On 17.02.2017 13:17, Jiri Denemark wrote: > On Wed, Dec 28, 2016 at 17:39:21 +0300, Nikolay Shirokovskiy wrote: >> There is no disks stats when migrating with VIR_MIGRATE_NON_SHARED_* >> for qemu that supports nbd. The reason is that disks are copied via dis

Re: [libvirt] [PATCH v2 10/12] qemu: split getting stats for migration and others

2017-02-17 Thread Nikolay Shirokovskiy
On 16.02.2017 18:47, Jiri Denemark wrote: > On Wed, Dec 28, 2016 at 17:39:19 +0300, Nikolay Shirokovskiy wrote: >> All domain jobs other than source migration have only one >> state - active. Only elapsed time is available for such >> jobs so let's make it more explic

Re: [libvirt] [PATCH v2 08/12] qemu: drop unused code in qemuDomainGetJobStatsInternal

2017-02-17 Thread Nikolay Shirokovskiy
On 16.02.2017 18:45, Jiri Denemark wrote: > On Wed, Dec 28, 2016 at 17:39:17 +0300, Nikolay Shirokovskiy wrote: >> Destination migration never fetch migration stats thus due > > This becomes true only after patch 10/12. > >> to the check above fetch flag can not be

Re: [libvirt] [PATCH v2 06/12] qemu: drop fetch and update status functions

2017-02-17 Thread Nikolay Shirokovskiy
On 17.02.2017 11:23, Jiri Denemark wrote: > On Thu, Feb 16, 2017 at 16:15:02 +0100, Jiri Denemark wrote: >> On Wed, Dec 28, 2016 at 17:39:15 +0300, Nikolay Shirokovskiy wrote: >>> qemuMigrationFetchJobStatus is rather inconvinient. If we poll >>> stats for sta

Re: [libvirt] [PATCH v2 01/12] qemu: qemuDomainJobInfoToParams drop unused code

2017-02-17 Thread Nikolay Shirokovskiy
On 16.02.2017 16:07, Jiri Denemark wrote: > On Wed, Dec 28, 2016 at 17:39:10 +0300, Nikolay Shirokovskiy wrote: >> qemu driver does not have VIR_DOMAIN_JOB_BOUNDED jobs. >> --- >> src/qemu/qemu_domain.c | 6 -- >> 1 file changed, 6 deletions(-) >> >>

Re: [libvirt] [PATCH v2 12/12] qemu: show disks stats for nbd migration

2017-02-17 Thread Nikolay Shirokovskiy
On 17.02.2017 13:17, Jiri Denemark wrote: > On Wed, Dec 28, 2016 at 17:39:21 +0300, Nikolay Shirokovskiy wrote: >> There is no disks stats when migrating with VIR_MIGRATE_NON_SHARED_* >> for qemu that supports nbd. The reason is that disks are copied via dis

Re: [libvirt] [PATCH v2 3/3] add per cpu stats to all domain stats

2017-02-06 Thread Nikolay Shirokovskiy
On 03.02.2017 19:09, Peter Krempa wrote: > On Thu, Feb 02, 2017 at 14:09:33 +0300, Nikolay Shirokovskiy wrote: >> Add per host cpu info provided in virDomainGetCPUStats to the >> stats provided in virConnectGetAllDomainStats. Namely: >> >> "cpu.count" - numbe

Re: [libvirt] [PATCH v2 1/3] cgroup: extract interface part from virCgroupGetPercpuStats

2017-02-03 Thread Nikolay Shirokovskiy
After trying a while on this path I decided not to push code reuse further in this patch. Actually it is quite difficult to reuse further without fragmenting function too much. So let's stay with this patch series. On 02.02.2017 17:08, Nikolay Shirokovskiy wrote: > After refactori

[libvirt] [PATCH RESEND] vz: make more accurate closing connection to sdk

2017-02-02 Thread Nikolay Shirokovskiy
Current code for example can call unsubscribe if connection succeeds but subscribing fails. This will probabaly lead only to spurious error messages without any actual inconsistencies but nevertheless. --- src/vz/vz_driver.c | 9 ++-- src/vz/vz_sdk.c| 65

Re: [libvirt] [PATCH v2 1/3] cgroup: extract interface part from virCgroupGetPercpuStats

2017-02-02 Thread Nikolay Shirokovskiy
/source to use and prefix too. Actually I want to reuse this adapting function in vz driver in the process of implementing virDomainGetCPUStats and don't want to include vircgroup.h there. Any ideas? On 02.02.2017 14:09, Nikolay Shirokovskiy wrote: > virCgroupGetPercpuStats do 2 things. Fi

[libvirt] [PATCH v2 2/3] cgroup: reuse virCgroupGetPercpuTime in virCgroupGetPercpuVcpuSum

2017-02-02 Thread Nikolay Shirokovskiy
--- src/util/vircgroup.c | 44 1 file changed, 20 insertions(+), 24 deletions(-) diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c index e4eaf32..06dd589 100644 --- a/src/util/vircgroup.c +++ b/src/util/vircgroup.c @@ -89,6 +89,10 @@ typedef

[libvirt] [PATCH v2 1/3] cgroup: extract interface part from virCgroupGetPercpuStats

2017-02-02 Thread Nikolay Shirokovskiy
virCgroupGetPercpuStats do 2 things. First it extracts per cpu stats from cgroups, second it puts stats values into virTypedParameterPtr in accordance with virDomainGetCPUStats interface. As we need first function in order to prodive per cpus stats in virConnectGetAllDomainStats lets split these

[libvirt] [PATCH v2 0/3] add per cpu stats to all domain stats

2017-02-02 Thread Nikolay Shirokovskiy
. move per cpu stats to a distinct stats group 3. add documentation Nikolay Shirokovskiy (3): cgroup: extract interface part from virCgroupGetPercpuStats cgroup: reuse virCgroupGetPercpuTime in virCgroupGetPercpuVcpuSum add per cpu stats to all domain stats docs/news.xml| 9

[libvirt] [PATCH v2 3/3] add per cpu stats to all domain stats

2017-02-02 Thread Nikolay Shirokovskiy
Add per host cpu info provided in virDomainGetCPUStats to the stats provided in virConnectGetAllDomainStats. Namely: "cpu.count" - number of host cpus "cpu..time" - total cpu time spent for this domain in nanoseconds "cpu..vtime" - time spent in virtual cpu threads for this domain

Re: [libvirt] [PATCH] qemu: add host per cpu info to all domain stats

2017-02-01 Thread Nikolay Shirokovskiy
On 01.02.2017 12:35, Peter Krempa wrote: > On Wed, Feb 01, 2017 at 09:47:20 +0300, Nikolay Shirokovskiy wrote: >> Info provided in virDomainGetCPUStats is now missed in all >> domain stats. This patch removes this discrepancy. >> >> Output example: >>

[libvirt] [PATCH] qemu: add host per cpu info to all domain stats

2017-01-31 Thread Nikolay Shirokovskiy
Info provided in virDomainGetCPUStats is now missed in all domain stats. This patch removes this discrepancy. Output example: cpu.count=2 cpu.0.time=536163399467 cpu.1.time=453846564946 cpu.0.vtime=530053197220 cpu.1.vtime=446078894510 --- src/libvirt_private.syms | 1 +

Re: [libvirt] [PATCH] vz: change printing format specifier for network statistics

2017-01-31 Thread Nikolay Shirokovskiy
On 31.01.2017 14:01, Maxim Nestratov wrote: > This is necessary to be able to get statistics for venet0 or > "host-routed" adapter, which has -1 index and thus, its statistics > is shown as "net.nic4294967295". > > Signed-off-by: Maxim Nestratov > --- >

[libvirt] [PATCH 0/2] vz: support more API calls

2017-01-30 Thread Nikolay Shirokovskiy
Nikolay Shirokovskiy (2): vz: support virDomainAbortJob vz: support virDomainReset src/vz/vz_driver.c | 53 + src/vz/vz_sdk.c| 48 src/vz/vz_sdk.h| 2 ++ src/vz/vz_utils.c | 1

[libvirt] [PATCH 1/2] vz: support virDomainAbortJob

2017-01-30 Thread Nikolay Shirokovskiy
--- src/vz/vz_driver.c | 21 + src/vz/vz_sdk.c| 33 + src/vz/vz_sdk.h| 1 + src/vz/vz_utils.c | 1 + src/vz/vz_utils.h | 2 ++ 5 files changed, 58 insertions(+) diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c index

[libvirt] [PATCH 2/2] vz: support virDomainReset

2017-01-30 Thread Nikolay Shirokovskiy
--- src/vz/vz_driver.c | 32 src/vz/vz_sdk.c| 15 +++ src/vz/vz_sdk.h| 1 + 3 files changed, 48 insertions(+) diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c index 0547de5..6aade90 100644 --- a/src/vz/vz_driver.c +++ b/src/vz/vz_driver.c

[libvirt] [PATCH] qemu: fix crash on getting block stats for empty cdrom

2017-01-29 Thread Nikolay Shirokovskiy
Looks like it was introduced in c5f61513. Before this commit handling empty cdrom was correct becase physical sizes of non block disks are not updated. Now when all types are supported we need to check for empty drives. [1] crash backtrace 0 __strrchr_sse42 () at

Re: [libvirt] [PATCH v2 00/12] qemu: migration: show disks stats for nbd migration

2017-01-24 Thread Nikolay Shirokovskiy
ping On 28.12.2016 17:39, Nikolay Shirokovskiy wrote: > diff from v1: > > 1. patch "qemu: clean out unused migrate to unix" is dropped > as it is already pushed. > 2. a lot of refactoring patches added, namely all except > the last patch. > 3. f

Re: [libvirt] [RFC PATCH 00/10] introduce push backups

2017-01-18 Thread Nikolay Shirokovskiy
/msg00937.html [2] https://www.redhat.com/archives/libvir-list/2016-September/msg00192.html On 18.01.2017 12:18, Nikolay Shirokovskiy wrote: > > > On 12.01.2017 16:16, Martin Kletzander wrote: >> On Mon, Nov 14, 2016 at 10:14:52AM +0300, Nikolay Shirokovskiy wrote: >>> Push

Re: [libvirt] [RFC PATCH 00/10] introduce push backups

2017-01-18 Thread Nikolay Shirokovskiy
On 12.01.2017 16:16, Martin Kletzander wrote: > On Mon, Nov 14, 2016 at 10:14:52AM +0300, Nikolay Shirokovskiy wrote: >> Push backup is a backup when hypervisor itself copy backup >> data to destination in contrast to pull backup when hypervisor >> exports backup dat

[libvirt] [PATCH] news: Fix xml dump of autogenerated websocket

2017-01-17 Thread Nikolay Shirokovskiy
--- Sorry for delay and thus not getting this news bit into release notes in time. docs/news.xml | 9 + 1 file changed, 9 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 95b021a..3ff8f4e 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -274,6 +274,15 @@ for

[libvirt] [PATCH] vz: don't show bootorder for containers

2016-12-29 Thread Nikolay Shirokovskiy
Because this is invalid xml for containers. This patch almost reverts 7eda8369, but still skips converting vz sdk bootorder for containers to libvirt bootorder because we use boot order in containers for quite different purpurse. --- I know I reviewed this code just recently. It is just got out

[libvirt] [PATCH v2 06/12] qemu: drop fetch and update status functions

2016-12-28 Thread Nikolay Shirokovskiy
qemuMigrationFetchJobStatus is rather inconvinient. If we poll stats for status only then we don't need to update elapsed time. Next on some paths we use this function to get stats only we don't what to unexpectedly update job status. So the common part is only enter/exit which is too little to

[libvirt] [PATCH v2 02/12] qemu: introduce qemu domain job status

2016-12-28 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| 24 -- src/qemu/qemu_domain.h| 11 +-

[libvirt] [PATCH v2 05/12] qemu: drop excessive zero-out in qemuMigrationFetchJobStatus

2016-12-28 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 05ff2a0..6ddc4bd 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -2595,7

[libvirt] [PATCH v2 03/12] qemu: introduce QEMU_DOMAIN_JOB_STATUS_POSTCOPY

2016-12-28 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 v2 07/12] qemu: simplify getting completed job stats

2016-12-28 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 d3da18a..913f8f3 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -13019,12 +13019,18 @@

[libvirt] [PATCH v2 11/12] qemu: introduce QEMU_DOMAIN_JOB_STATUS_PREPARE

2016-12-28 Thread Nikolay Shirokovskiy
This patch removes the last place where we consult priv->job.current->stats.status for migration state, namely in qemuDomainGetMigrationJobStats. --- src/qemu/qemu_domain.c| 1 + src/qemu/qemu_domain.h| 1 + src/qemu/qemu_driver.c| 5 +++-- src/qemu/qemu_migration.c | 7 +-- 4

[libvirt] [PATCH v2 04/12] qemu: drop QEMU_MIGRATION_COMPLETED_UPDATE_STATS

2016-12-28 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 v2 09/12] qemu: drop fetch flag in qemuDomainGetJobStatsInternal

2016-12-28 Thread Nikolay Shirokovskiy
Basically this optimization skips acquiring jobs condition in case no job is running. But as we are going to add mirroring statistics it is simplier to drop this optimization. --- src/qemu/qemu_driver.c | 17 + 1 file changed, 5 insertions(+), 12 deletions(-) diff --git

[libvirt] [PATCH v2 12/12] qemu: show disks stats for nbd migration

2016-12-28 Thread Nikolay Shirokovskiy
There is no disks stats when migrating with VIR_MIGRATE_NON_SHARED_* for qemu that supports nbd. The reason is that disks are copied via disk mirroring and not in the scope of migration job itself. Below a couble of issues of the implementation are described. 'total' field is set from 'end'

[libvirt] [PATCH v2 01/12] qemu: qemuDomainJobInfoToParams drop unused code

2016-12-28 Thread Nikolay Shirokovskiy
qemu driver does not have VIR_DOMAIN_JOB_BOUNDED jobs. --- src/qemu/qemu_domain.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index acfa695..acc27d0 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -432,12 +432,6 @@

[libvirt] [PATCH v2 00/12] qemu: migration: show disks stats for nbd migration

2016-12-28 Thread Nikolay Shirokovskiy
processed: 146.000 MiB File remaining: 854.000 MiB File total: 1000.000 MiB Nikolay Shirokovskiy (12): qemu: qemuDomainJobInfoToParams drop unused code qemu: introduce qemu domain job status qemu: introduce QEMU_DOMAIN_JOB_STATUS_POSTCOPY qemu: drop QEMU_MIGRATION_COMPLETED_UPDATE_ST

[libvirt] [PATCH v2 08/12] qemu: drop unused code in qemuDomainGetJobStatsInternal

2016-12-28 Thread Nikolay Shirokovskiy
Destination migration never fetch migration stats thus due to the check above fetch flag can not be set. --- src/qemu/qemu_driver.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 913f8f3..84db59d 100644 --- a/src/qemu/qemu_driver.c

[libvirt] [PATCH v2 10/12] qemu: split getting stats for migration and others

2016-12-28 Thread Nikolay Shirokovskiy
All domain jobs other than source migration have only one state - active. Only elapsed time is available for such jobs so let's make it more explicit. Also if in future there will be more stats for such jobs we don't want to mess them with migration stats code. --- src/qemu/qemu_driver.c | 58

[libvirt] [RFC] add option to bring new qemu binary/pending conf changes on reboot

2016-12-21 Thread Nikolay Shirokovskiy
Hi, all. I'm trying to reword the long pending RFC [1]. We

Re: [libvirt] [PATCH v3] qemu: report block job errors from qemu to the user

2016-12-21 Thread Nikolay Shirokovskiy
ping On 02.11.2016 12:15, Nikolay Shirokovskiy wrote: > So that you can see nice report on migration: > > "error: operation failed: migration of disk sda failed: No space left on > device" > > diff from v2: > 1. split into 2 patches > 2. change formal

Re: [libvirt] [PATCH 5/5] vz: get disks statistics for CTs

2016-12-20 Thread Nikolay Shirokovskiy
On 09.12.2016 17:36, Maxim Nestratov wrote: > A CT disk statistics is reported with prefix "hdd" and we should use > it to extract data. > > Signed-off-by: Maxim Nestratov > --- > src/vz/vz_driver.c | 10 -- > src/vz/vz_sdk.c| 5 +++-- > src/vz/vz_sdk.h

Re: [libvirt] [PATCH 4/5] vz: report disks either as disks or filesystems depending on original xml

2016-12-20 Thread Nikolay Shirokovskiy
On 09.12.2016 17:36, Maxim Nestratov wrote: > Virtuozzo SDK interface doesn't differ filesystems from disks and sees them > as disks. > Before, we always mistakenly presented disks based on files as filesystems, > which is > not completely correct. Now we are going to show either disks or

Re: [libvirt] [PATCH 3/5] vz: don't add implicit devices for CTs

2016-12-20 Thread Nikolay Shirokovskiy
On 09.12.2016 17:36, Maxim Nestratov wrote: > Implicit devices like controllers are confusing for CTs as they are faked. > Other devices like video we require to be specified explicitly. I would drop last sentence. prlsdkApplyVideoParams shows that we ignore video params for containers. Let's

Re: [libvirt] [PATCH 2/5] vz: don't query boot devices information for VZ, set boot from disk always

2016-12-20 Thread Nikolay Shirokovskiy
On 09.12.2016 17:36, Maxim Nestratov wrote: > Before, boot devices information for CTs was always empty and we > didn't indicate that containers always boot from disk. > > Signed-off-by: Maxim Nestratov > --- > src/vz/vz_sdk.c | 13 + > 1 file changed, 9

Re: [libvirt] [PATCH 1/5] vz: report "scsi" bus for disks when nothing was set explixitly

2016-12-20 Thread Nikolay Shirokovskiy
On 09.12.2016 17:36, Maxim Nestratov wrote: > This is necessary for to show CTs created out of libvirt correctly. > > Signed-off-by: Maxim Nestratov > --- > src/vz/vz_sdk.c | 11 --- > 1 file changed, 4 insertions(+), 7 deletions(-) > > diff --git

[libvirt] [PATCH 1/2] qemu: clean out unused migrate to unix

2016-12-19 Thread Nikolay Shirokovskiy
--- src/qemu/qemu_migration.c | 40 ++-- src/qemu/qemu_monitor.c | 24 src/qemu/qemu_monitor.h | 4 3 files changed, 2 insertions(+), 66 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index

[libvirt] [PATCH 2/2] qemu: migration: show disks stats for nbd migration

2016-12-19 Thread Nikolay Shirokovskiy
There is no disks statistics when migrating with VIR_MIGRATE_NON_SHARED_* for qemu that supports nbd. The reason is that disks are copied via disk mirroring and not in the scope of migration job itself. Let's enhance qemuMigrationFetchJobStatus to take mirror jobs into account. Now

[libvirt] [PATCH 0/2] qemu: migration: show disks stats for nbd migration

2016-12-19 Thread Nikolay Shirokovskiy
MiB Data total: 1000.000 MiB File processed: 146.000 MiB File remaining: 854.000 MiB File total: 1000.000 MiB Nikolay Shirokovskiy (2): qemu: clean out unused migrate to unix qemu: migration: show disks stats for nbd migration docs/news.html.in | 4 ++ src/qemu

Re: [libvirt] [PATCH v2 0/3] qemu: fix racy paths in agent related code

2016-12-12 Thread Nikolay Shirokovskiy
On 13.12.2016 01:58, John Ferlan wrote: > > > On 12/12/2016 04:13 AM, Nikolay Shirokovskiy wrote: >> Changes from v1: >> 1. patch 2: make vm def copy instead of making qemuAgentGetFSInfo >> independent of domain conf. >> 2. patch 3: provide more rele

[libvirt] [PATCH v2 0/3] qemu: fix racy paths in agent related code

2016-12-12 Thread Nikolay Shirokovskiy
Changes from v1: 1. patch 2: make vm def copy instead of making qemuAgentGetFSInfo independent of domain conf. 2. patch 3: provide more relevant commit message Nikolay Shirokovskiy (3): qemu: agent: fix uninitialized var case in qemuAgentGetFSInfo qemu: don't use vm when lock is dropped

[libvirt] [PATCH v2 2/3] qemu: don't use vm when lock is dropped in qemuDomainGetFSInfo

2016-12-12 Thread Nikolay Shirokovskiy
Current call to qemuAgentGetFSInfo in qemuDomainGetFSInfo is unsafe. Domain lock is dropped and we use vm->def. Let's make def copy to fix that. --- src/qemu/qemu_driver.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_driver.c

[libvirt] [PATCH v2 1/3] qemu: agent: fix uninitialized var case in qemuAgentGetFSInfo

2016-12-12 Thread Nikolay Shirokovskiy
In case of 0 filesystems *info is not set while according to virDomainGetFSInfo contract user should call free on it even in case of 0 filesystems. Thus we need to properly set it. NULL will be enough as free eats NULLs ok. --- src/qemu/qemu_agent.c | 1 + 1 file changed, 1 insertion(+) diff

[libvirt] [PATCH v2 3/3] qemu: agent: take monitor lock in qemuAgentNotifyEvent

2016-12-12 Thread Nikolay Shirokovskiy
qemuAgentNotifyEvent accesses monitor structure and is called on qemu reset/shutdown/suspend events under domain lock. Other monitor functions on the other hand take monitor lock and don't hold domain lock. Thus it is possible to have risky simultaneous access to the structure from 2 threads.

[libvirt] [PATCH 2/5] vz: add net group to all domain stats

2016-12-12 Thread Nikolay Shirokovskiy
--- src/vz/vz_driver.c | 44 1 file changed, 44 insertions(+) diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c index 6d173ef..c282858 100644 --- a/src/vz/vz_driver.c +++ b/src/vz/vz_driver.c @@ -3586,6 +3586,47 @@

[libvirt] [PATCH 1/5] vz: provide block stats for all domain stats

2016-12-12 Thread Nikolay Shirokovskiy
--- src/vz/vz_driver.c | 189 + src/vz/vz_sdk.c| 8 +++ 2 files changed, 197 insertions(+) diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c index 08f7961..6d173ef 100644 --- a/src/vz/vz_driver.c +++ b/src/vz/vz_driver.c @@ -3508,6

[libvirt] [PATCH 3/5] vz: add vcpu group to all domain stats

2016-12-12 Thread Nikolay Shirokovskiy
--- src/vz/vz_driver.c | 54 ++ 1 file changed, 54 insertions(+) diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c index c282858..a0a61eb 100644 --- a/src/vz/vz_driver.c +++ b/src/vz/vz_driver.c @@ -3627,6 +3627,57 @@

[libvirt] [PATCH 4/5] vz: add balloon group to all domain stats

2016-12-12 Thread Nikolay Shirokovskiy
--- src/vz/vz_driver.c | 54 ++ 1 file changed, 54 insertions(+) diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c index a0a61eb..01c1a96 100644 --- a/src/vz/vz_driver.c +++ b/src/vz/vz_driver.c @@ -3678,6 +3678,57 @@

[libvirt] [PATCH 5/5] vz: add state group to all domain stats

2016-12-12 Thread Nikolay Shirokovskiy
--- src/vz/vz_driver.c | 25 + 1 file changed, 25 insertions(+) diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c index 01c1a96..d9bd2cd 100644 --- a/src/vz/vz_driver.c +++ b/src/vz/vz_driver.c @@ -3729,6 +3729,28 @@ vzDomainGetBalloonStats(virDomainObjPtr dom,

[libvirt] [PATCH 0/5] implement .connectGetAllDomainStats

2016-12-12 Thread Nikolay Shirokovskiy
Nikolay Shirokovskiy (5): vz: provide block stats for all domain stats vz: add net group to all domain stats vz: add vcpu group to all domain stats vz: add balloon group to all domain stats vz: add state group to all domain stats src/vz/vz_driver.c | 366

Re: [libvirt] [PATCH 3/3] qemu: agent: take monitor lock in qemuAgentNotifyEvent

2016-12-11 Thread Nikolay Shirokovskiy
On 09.12.2016 17:42, John Ferlan wrote: > > > On 12/09/2016 03:55 AM, Nikolay Shirokovskiy wrote: >> >> >> On 08.12.2016 19:40, John Ferlan wrote: >>> >>> >>> On 11/24/2016 04:19 AM, Nikolay Shirokovskiy wrote: >>>> qemuAgentN

Re: [libvirt] [PATCH 2/3] qemu: mark user defined websocket as used

2016-12-09 Thread Nikolay Shirokovskiy
On 09.12.2016 15:57, John Ferlan wrote: > > > On 12/09/2016 01:51 AM, Nikolay Shirokovskiy wrote: >> >> >> On 08.12.2016 23:07, John Ferlan wrote: >>> >>> >>> On 11/22/2016 06:09 AM, Nikolay Shirokovskiy wrote: >>>>

Re: [libvirt] RFC: add recreate option to domain events conf

2016-12-09 Thread Nikolay Shirokovskiy
ping On 30.06.2016 16:14, Nikolay Shirokovskiy wrote: > Hi, all. > > Does it make sense to anybody else that rebooting and resetting > a persistent domain from outside or from inside should bring upon > pending configuration changes? For this purpose we can add another > o

Re: [libvirt] [PATCH 3/3] qemu: agent: take monitor lock in qemuAgentNotifyEvent

2016-12-09 Thread Nikolay Shirokovskiy
On 08.12.2016 19:40, John Ferlan wrote: > > > On 11/24/2016 04:19 AM, Nikolay Shirokovskiy wrote: >> qemuAgentNotifyEvent notify on a lock condition without taking >> the lock. This works but it is a subject to race conditions. >> --- >> src/qemu/qemu_agent

Re: [libvirt] [PATCH 2/3] qemu: don't use vmdef without domain lock

2016-12-09 Thread Nikolay Shirokovskiy
On 08.12.2016 19:40, John Ferlan wrote: > > > On 11/24/2016 04:19 AM, Nikolay Shirokovskiy wrote: >> Current call to qemuAgentGetFSInfo in qemuDomainGetFSInfo is >> unsafe. Domain lock is dropped and we use vm->def. To fix that >> let's fill in intermed

Re: [libvirt] [PATCH 1/3] qemu: agent: fix uninitialized var case in qemuAgentGetFSInfo

2016-12-08 Thread Nikolay Shirokovskiy
On 08.12.2016 19:38, John Ferlan wrote: > > > On 11/24/2016 04:19 AM, Nikolay Shirokovskiy wrote: >> In case of 0 filesystems *info is not set while according >> to virDomainGetFSInfo contract user should call free on it even >> in case of 0 filesystems. T

Re: [libvirt] [PATCH 2/3] qemu: mark user defined websocket as used

2016-12-08 Thread Nikolay Shirokovskiy
On 08.12.2016 23:07, John Ferlan wrote: > > > On 11/22/2016 06:09 AM, Nikolay Shirokovskiy wrote: >> We need extra state variable to distinguish between autogenerated >> and user defined cases after auto generation is done. >> --- >> src/conf/domain_conf.h |

Re: [libvirt] [PATCH v2] storage: vz storage pool support

2016-12-08 Thread Nikolay Shirokovskiy
On 08.12.2016 15:17, John Ferlan wrote: > > > On 12/08/2016 04:19 AM, Maxim Nestratov wrote: >> 08-Dec-16 02:22, John Ferlan пишет: >> >>> [...] >>> > I see what you mean; however, IMO vstorage should be separate. Maybe > there's another opinion out there, but since you're requiring

Re: [libvirt] [PATCH 3/3] qemu: fix xml dump of autogenerated websocket

2016-12-08 Thread Nikolay Shirokovskiy
On 08.12.2016 16:21, John Ferlan wrote: > > Perhaps a commit message would answer my question below... > > On 11/22/2016 06:09 AM, Nikolay Shirokovskiy wrote: >> --- >> src/conf/domain_conf.c | 5 - >> 1 file changed, 4 insertions(+), 1 deletion(

Re: [libvirt] [PATCH 2/3] qemu: mark user defined websocket as used

2016-12-08 Thread Nikolay Shirokovskiy
On 08.12.2016 16:21, John Ferlan wrote: > > > On 11/22/2016 06:09 AM, Nikolay Shirokovskiy wrote: >> We need extra state variable to distinguish between autogenerated >> and user defined cases after auto generation is done. >> --- >> src/conf/domain_conf.h |

Re: [libvirt] [PATCH 1/3] qemu: refactor: use switch for enum in qemuProcessGraphicsReservePorts

2016-12-08 Thread Nikolay Shirokovskiy
On 08.12.2016 16:21, John Ferlan wrote: > > > On 11/22/2016 06:09 AM, Nikolay Shirokovskiy wrote: >> --- >> src/qemu/qemu_process.c | 30 +- >> 1 file changed, 21 insertions(+), 9 deletions(-) >> > > ACK - although I'll rewor

[libvirt] [RFC] provide error string on blockjob event

2016-12-05 Thread Nikolay Shirokovskiy
Hi, all. There is a patch series [1] that adds reporting qemu blockjob errors to the client on migration. I guess if somebody uses block{copy/pull/commit} he would be glad to see the precise qemu error too. But these operation are asynchronous and blockjob result is provided via event. So what

Re: [libvirt] [PATCH] daemon: Install virt-guest-shutdown.target properly

2016-11-30 Thread Nikolay Shirokovskiy
On 29.11.2016 18:38, Michal Privoznik wrote: > When trying to install libvirtd from sources I've noticed the > following failure: > > /usr/bin/install: cannot stat 'virt-guest-shutdown.target': No such file or > directory > Makefile:2792: recipe for target 'install-init-systemd' failed >

Re: [libvirt] [PATCH v3] qemu: report block job errors from qemu to the user

2016-11-29 Thread Nikolay Shirokovskiy
ping On 02.11.2016 12:15, Nikolay Shirokovskiy wrote: > So that you can see nice report on migration: > > "error: operation failed: migration of disk sda failed: No space left on > device" > > diff from v2: > 1. split into 2 patches > 2. change formal

Re: [libvirt] [PATCH RFC 0/5] drop nested job concept

2016-11-28 Thread Nikolay Shirokovskiy
On 28.11.2016 11:56, Peter Krempa wrote: > On Mon, Nov 28, 2016 at 11:15:41 +0300, Nikolay Shirokovskiy wrote: >> Instead I suggest to serialize qemu monitor commands. > > That won't be possible. There are a few APIs that call multiple commands > and expect the VM not to chang

[libvirt] [PATCH RFC 1/5] qemu: monitor: serialize send command requests

2016-11-28 Thread Nikolay Shirokovskiy
Current libvirt qemu monitor can not handle many send command requests and it does not need to as misc job conditions protect him from this case. As there is an intention to replace nested jobs concept by mere serialization at monitor level let's add serialization to monitor as a preparation step.

[libvirt] [PATCH RFC 5/5] qemu: drop qemuDomainObjEnterMonitorAsync

2016-11-28 Thread Nikolay Shirokovskiy
Part of work can be done by perl: perl -0777 -i.bak -pe 's/if \(qemuDomainObjEnterMonitorAsync\(driver, vm,\n? .*\) < 0\)\n \ +return -1;/qemuDomainObjEnterMonitor(vm);/g' src/qemu/* perl -0777 -i.bak -pe 's/if \(qemuDomainObjEnterMonitorAsync\(driver, vm,\n? .*\) <

[libvirt] [PATCH RFC 4/5] qemu: drop driver parameter on domain enter/exit monitor

2016-11-28 Thread Nikolay Shirokovskiy
As it is not used anymore. Most of the work is done by sed: sed -i.bak s/qemuDomainObjEnterMonitor(driver, vm)/qemuDomainObjEnterMonitor(vm)/ src/qemu/* sed -i.bak s/qemuDomainObjExitMonitor(driver, vm)/qemuDomainObjExitMonitor(vm)/ src/qemu/* Then drop driver parameter from the callers until

[libvirt] [PATCH RFC 0/5] drop nested job concept

2016-11-28 Thread Nikolay Shirokovskiy
unused parameter in patches 4 and 5. To reduce risk of introducing an error on this tedious task I used sed and perl where I can. I ran only a simple test with this series of quering a domain during its migration. Nikolay Shirokovskiy (5): qemu: monitor: serialize send command requests qemu

<    5   6   7   8   9   10   11   12   13   14   >