[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 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 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 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 00/12] qemu: migration: show disks stats for nbd migration

2016-12-28 Thread Nikolay Shirokovskiy
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. fetching mirroring stats is done separately from getting migration status. Generally speaking

[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] [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 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 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 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 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] cmdPerf: Display enabled/disabled message on perf event enable/disable

2016-12-28 Thread Nitesh Konkar
Currently no message is displayed on successful perf event enable or disable. This patch gives the enabled/disabled status message on successful enabling/disabling of the perf event. Eg:virsh perf Domain --enable instructions --disable cache_misses instructions : enabled cache_misses :

Re: [libvirt] [PATCH] cmdPerf: Display enabled/disabled message on perf event enable/disable

2016-12-28 Thread Nitesh Konkar
I realized after sending the patch that the code I mentioned as "dead code" is not a dead code. I have sent a v2 for the same. On Wed, Dec 28, 2016 at 3:19 PM, Nitesh Konkar < niteshkonkar.libv...@gmail.com> wrote: > Currently, the code to display enabled/disabled message is > a dead code as its

[libvirt] [PATCH] cmdPerf: Display enabled/disabled message on perf event enable/disable

2016-12-28 Thread Nitesh Konkar
Currently, the code to display enabled/disabled message is a dead code as its misplaced in if block instead of else. This patch fixes that issue. Signed-off-by: Nitesh Konkar --- tools/virsh-domain.c | 17 + 1 file changed, 9 insertions(+), 8

[libvirt] [PATCH 0/3] Fix networkxml2conftest on FreeBSD

2016-12-28 Thread Martin Kletzander
Yet another approach. If you hate it, we still have this: https://www.redhat.com/archives/libvir-list/2016-December/msg01123.html as an option. Martin Kletzander (3): networkxml2conftest: Rename outxml to outconf networkxml2conftest: Indent function parameters properly

[libvirt] [PATCH 3/3] networkxml2conftest: Fix build on BSD

2016-12-28 Thread Martin Kletzander
Yet another way to fix the different loopback naming. This variant doesn't use multiple files, allows easy addition of more loopback names and factoring out the naming code to a function (which would programmatically get the loopback interface name) is very easy. OTOH we lose a way to regenerate

[libvirt] [PATCH 2/3] networkxml2conftest: Indent function parameters properly

2016-12-28 Thread Martin Kletzander
Otherwise we might end up bikeshedding on the next patch. Signed-off-by: Martin Kletzander --- tests/networkxml2conftest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/networkxml2conftest.c b/tests/networkxml2conftest.c index

[libvirt] [PATCH 1/3] networkxml2conftest: Rename outxml to outconf

2016-12-28 Thread Martin Kletzander
Just a name, I know, but it bothered me a lot since it does not refer to XML. Signed-off-by: Martin Kletzander --- tests/networkxml2conftest.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/networkxml2conftest.c

Re: [libvirt] [PATCH] network: write both lo and lo0 in dnsmasq configuration

2016-12-28 Thread Martin Kletzander
On Thu, Dec 22, 2016 at 08:46:55PM +0100, Andrea Bolognani wrote: On Tue, 2016-12-06 at 09:41 +0100, Martin Kletzander wrote: > When generating a new configuration for dnsmasq, add except-interface > for both lo and lo0: this should make sure the configuration works, > and is always the same