Re: [libvirt] [PATCH 4/7] hostdev: Add detachPCIDevices()

2016-01-21 Thread Andrea Bolognani
On Tue, 2016-01-19 at 16:36 +0100, Andrea Bolognani wrote: > This function mirrors reattachPCIDevices(). > > The handling of active and inactive devices is updated and made more > explicit, which means virHostdevPreparePCIDevices() has to be > updated as well. > --- >  src/util/virhostdev.c | 125

Re: [libvirt] [PATCH v5 6/7] Implement qemuSetupGlobalCpuCgroup

2016-01-21 Thread Dmitry Guryanov
On Mon, 2016-01-18 at 13:08 +0300, Alexander Burluka wrote: > This functions setups per-domain cpu bandwidth parameters > > Signed-off-by: Alexander Burluka > --- >  src/qemu/qemu_cgroup.c  | 54 > + >  

Re: [libvirt] [PATCH v5 0/7] Per domain bandwidth settings

2016-01-21 Thread Dmitry Guryanov
On Mon, 2016-01-18 at 13:08 +0300, Alexander Burluka wrote: > We decide to make a global per domain bandwidth setting > as were discussed in mailing list earlier. > This patchset implements hierarchy top level cpu.cfs_period_us > and cpu.cfs_quota_us control knob. I've named this parameters > as

[libvirt] [PATCH v2] security_selinux: Fix crash in virSecuritySELinuxRestoreFileLabel

2016-01-21 Thread Shanzhi Yu
virSecuritySELinuxRestoreFileLabel should never be called with NULL path add check before call this function in case of causeing libvirtd crash https://bugzilla.redhat.com/show_bug.cgi?id=1300532 Signed-off-by: Shanzhi Yu --- src/security/security_selinux.c | 25

[libvirt] [PATCH LIBVIRT v3] libxl: Support cmdline= in xl config files

2016-01-21 Thread Ian Campbell
... and consolidate the cmdline/extra/root parsing to facilitate doing so. The logic is the same as xl's parse_cmdline from the current xen.git master branch (e6f0e099d2c17de47fd86e817b1998db903cab61). On the formatting side switch to producing cmdline= instead of extra=. Update a few tests and

Re: [libvirt] [PATCH v2 00/15] Implement post-copy migration

2016-01-21 Thread Jiri Denemark
I forgot to mention that all patches are also available in post-copy-migration branch in my staging repository at https://gitlab.com/jirkade/libvirt Jirka -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 2/2] Xen: add XENXL to virErrorDomain enum

2016-01-21 Thread Ian Campbell
On Wed, 2016-01-20 at 11:58 -0700, Jim Fehlig wrote: > Add "Xen XL Config" to the virErrorDomain enum and use it in > src/xenconfig/xen_xl.c. > > Signed-off-by: Jim Fehlig Acked-by: Ian Campbell -- libvir-list mailing list libvir-list@redhat.com

[libvirt] [PATCH v2 11/15] qemu: Don't kill running migrated domain on daemon restart

2016-01-21 Thread Jiri Denemark
When destination libvirtd is restarted during migration in Finish phase just after the point we started guest CPUs, we should not kill the domain. Signed-off-by: Jiri Denemark --- Notes: Version 2: - no change src/qemu/qemu_process.c | 10 +++--- 1 file

[libvirt] [PATCH v2 00/15] Implement post-copy migration

2016-01-21 Thread Jiri Denemark
(See "Add public APIs for post-copy migration" patch for more details about post-copy migration.) Post-copy support was originally written by Cristian Klein in 2014, but no one touched the series since then. Some patches in this series are modified versions of the old patches from Cristian, some

[libvirt] [PATCH v2 08/15] virsh: Add support for post-copy migration

2016-01-21 Thread Jiri Denemark
From: Cristian Klein Signed-off-by: Cristian Klein Signed-off-by: Jiri Denemark --- Notes: Version 2: - no change tools/virsh-domain.c | 55 tools/virsh.pod |

[libvirt] [PATCH v2 07/15] qemu: Implement virDomainMigrateStartPostCopy

2016-01-21 Thread Jiri Denemark
From: Cristian Klein Signed-off-by: Cristian Klein Signed-off-by: Jiri Denemark --- Notes: Version 2: - no change src/qemu/qemu_domain.c| 1 + src/qemu/qemu_domain.h| 1 + src/qemu/qemu_driver.c| 58

[libvirt] [PATCH v2 01/15] Add event and state details for post-copy

2016-01-21 Thread Jiri Denemark
VIR_DOMAIN_EVENT_SUSPENDED_POSTCOPY and VIR_DOMAIN_PAUSED_POSTCOPY are used on the source host once migration enters post-copy mode (which means the domain gets paused on the source. After the destination host takes over the execution of the domain, its virtual CPUs are resumed and the domain

Re: [libvirt] [PATCH] libxl: dispose libxl_dominfo after libxl_domain_info()

2016-01-21 Thread Joao Martins
On 01/21/2016 01:41 AM, Jim Fehlig wrote: > Joao Martins wrote: >> As suggested in a previous thread [0] this patch adds some missing calls >> to libxl_dominfo_dispose when doing some of the libxl_domain_info >> operations which would otherwise lead to memory leaks. >> >> [0] >>

[libvirt] [PATCH v2 10/15] virsh: Add --postcopy-after-precopy option to migrate

2016-01-21 Thread Jiri Denemark
From: Cristian Klein Signed-off-by: Cristian Klein Signed-off-by: Jiri Denemark --- Notes: Version 2: - implement --postcopy-after-precopy entirely in virsh tools/virsh-domain.c | 35

[libvirt] [PATCH v2 02/15] Add public APIs for post-copy migration

2016-01-21 Thread Jiri Denemark
From: Cristian Klein To use post-copy one has to start the migration with VIR_MIGRATE_POSTCOPY flag and, while migration is in progress, call virDomainMigrateStartPostCopy() to switch from pre-copy to post-copy. Signed-off-by: Cristian Klein

[libvirt] [PATCH v2] libxl: dispose libxl_dominfo after libxl_domain_info()

2016-01-21 Thread Joao Martins
As suggested in a previous thread [0] this patch adds some missing calls to libxl_dominfo_{init,dispose} when doing some of the libxl_domain_info operations which would otherwise lead to memory leaks. [0] https://www.redhat.com/archives/libvir-list/2015-September/msg00519.html Signed-off-by:

[libvirt] [PATCH v2 09/15] virsh: Configurable migrate --timeout action

2016-01-21 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Version 2: - no change tools/virsh-domain.c | 63 +--- tools/virsh.pod | 15 - 2 files changed, 65 insertions(+), 13 deletions(-) diff --git

[libvirt] [PATCH v2 05/15] qemu: Add QMP functions for post-copy migration

2016-01-21 Thread Jiri Denemark
From: Cristian Klein Signed-off-by: Cristian Klein Signed-off-by: Jiri Denemark --- Notes: The migration capability is called x-postcopy-ram in QEMU, which means it's still considered experimental. The main reason for

[libvirt] [PATCH v2 04/15] qemu: Handle postcopy-active migration state

2016-01-21 Thread Jiri Denemark
Migration enters "postcopy-active" state after QEMU switches to post-copy and pauses guest CPUs. From libvirt's point of view this state is similar to "completed" because we need to transfer guest execution to the destination host. Signed-off-by: Jiri Denemark --- Notes:

[libvirt] [PATCH v2 13/15] qemu: Handle post-copy migration failures

2016-01-21 Thread Jiri Denemark
When migration fails in the post-copy mode, it's impossible to just kill the destination domain and resume the source since the source no longer contains current guest state. Let's mark domains on both sides as VIR_DOMAIN_PAUSED_POSTCOPY_FAILED to let the upper layer decide what to do with them.

[libvirt] [PATCH v2 06/15] qemu: Add support for VIR_MIGRATE_POSTCOPY flag

2016-01-21 Thread Jiri Denemark
From: Cristian Klein Signed-off-by: Cristian Klein Signed-off-by: Jiri Denemark --- Notes: Version 2: - no change src/qemu/qemu_migration.c | 76 +++

[libvirt] [PATCH v2 15/15] qemu: Add flags to qemuMigrationWaitForCompletion

2016-01-21 Thread Jiri Denemark
The function already takes two bool arguments, switching to flags makes it a lot easier to read. Especially in case we need to add another boolean in the future. Signed-off-by: Jiri Denemark --- Notes: Version 2: - moved to the end of the series since it is not

Re: [libvirt] [PATCH 1/2] Xen: VIR_FROM_THIS cleanup

2016-01-21 Thread Ian Campbell
On Wed, 2016-01-20 at 11:58 -0700, Jim Fehlig wrote: > The virErrorDomain enum has VIR_FROM_XEN, VIR_FROM_XEND, > VIR_FROM_XENSTORE, VIR_FROM_SEXPR, and VIR_FROM_XENXM. Use > these elements in the corresponding .c files. While at it, > remove the VIR_FROM_THIS define in

Re: [libvirt] [PATCH 1/2] Introduce migration iteration event

2016-01-21 Thread Jiri Denemark
On Mon, Jan 18, 2016 at 15:53:04 +0100, Jiri Denemark wrote: > The VIR_DOMAIN_EVENT_ID_MIGRATION_ITERATION event will be triggered > whenever VIR_DOMAIN_JOB_MEMORY_ITERATION changes its value, i.e., > whenever a new iteration over guest memory pages is started during > migration. > >

Re: [libvirt] [PATCH] security_selinux: Fix crash in virSecuritySELinuxRestoreFileLabel

2016-01-21 Thread Jiri Denemark
On Thu, Jan 21, 2016 at 18:31:58 +0800, Shanzhi Yu wrote: > when failed to boot a guest, virSecuritySELinuxRestoreFileLabel > will be called eventually to reset security label, which will > lead a crash if pass null to virFileResolveLink(path, ). > >

[libvirt] [PATCH v2 12/15] qemu: Refactor qemuProcessRecoverMigration

2016-01-21 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Version 2: - no change src/qemu/qemu_process.c | 206 ++-- 1 file changed, 110 insertions(+), 96 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index

[libvirt] [PATCH v2 14/15] qemu: Refuse to abort migration in post-copy mode

2016-01-21 Thread Jiri Denemark
In post-copy mode none of the hosts has a complete guest state and rolling back migration is impossible. Thus aborting it would be equivalent to destroying the domain. Signed-off-by: Jiri Denemark --- Notes: Version 2: - no change src/qemu/qemu_driver.c | 14

Re: [libvirt] [PATCH LIBVIRT v2] libxl: Support cmdline= in xl config files

2016-01-21 Thread Ian Campbell
On Wed, 2016-01-20 at 11:16 -0700, Jim Fehlig wrote: > Ian Campbell wrote: > > ... and consolidate the cmdline/extra/root parsing to facilitate doing > > so. > > > > The logic is the same as xl's parse_cmdline from the current xen.git > > master > > branch

[libvirt] [PATCH v2 03/15] qemu: Don't explicitly stop CPUs after migration

2016-01-21 Thread Jiri Denemark
With a very old QEMU which doesn't support events we need to explicitly call qemuMigrationSetOffline at the end of migration to update our internal state. On the other hand, if we talk to QEMU using QMP, we should just wait for the STOP event and let the event handler update the state and trigger

[libvirt] [PATCH] security_selinux: Fix crash in virSecuritySELinuxRestoreFileLabel

2016-01-21 Thread Shanzhi Yu
when failed to boot a guest, virSecuritySELinuxRestoreFileLabel will be called eventually to reset security label, which will lead a crash if pass null to virFileResolveLink(path, ). https://bugzilla.redhat.com/show_bug.cgi?id=1300532 Signed-off-by: Shanzhi Yu ---

Re: [libvirt] [PATCH v3 2/6] virnetdaemon: Add post exec restart support for multiple servers

2016-01-21 Thread Erik Skultety
On 10/01/16 16:27, Martin Kletzander wrote: > On Mon, Nov 30, 2015 at 04:03:01PM +0100, Erik Skultety wrote: >> Since the daemon can manage and add (at fresh start) multiple servers, >> we also should be able to add them from a JSON state file in case of a >> daemon restart. This patch introduces

Re: [libvirt] [PATCH 0/2] Introduce migration iteration event

2016-01-21 Thread Pavel Hrdina
On Mon, Jan 18, 2016 at 03:53:03PM +0100, Jiri Denemark wrote: > Jiri Denemark (2): > Introduce migration iteration event > qemu: Add support for migration iteration event > > daemon/remote.c | 32 ++ > include/libvirt/libvirt-domain.h | 22 + >

Re: [libvirt] [python PATCH] Add support for MIGRATION_ITERATION event

2016-01-21 Thread Pavel Hrdina
On Mon, Jan 18, 2016 at 03:53:21PM +0100, Jiri Denemark wrote: > Signed-off-by: Jiri Denemark > --- > examples/event-test.py | 4 +++ > libvirt-override-virConnect.py | 9 +++ > libvirt-override.c | 57 > ++ >

Re: [libvirt] [PATCH v2] libxl: dispose libxl_dominfo after libxl_domain_info()

2016-01-21 Thread Jim Fehlig
Joao Martins wrote: > As suggested in a previous thread [0] this patch adds some missing calls > to libxl_dominfo_{init,dispose} when doing some of the libxl_domain_info > operations which would otherwise lead to memory leaks. > > [0] >

Re: [libvirt] [PATCH LIBVIRT v3] libxl: Support cmdline= in xl config files

2016-01-21 Thread Jim Fehlig
Ian Campbell wrote: > ... and consolidate the cmdline/extra/root parsing to facilitate doing > so. > > The logic is the same as xl's parse_cmdline from the current xen.git master > branch (e6f0e099d2c17de47fd86e817b1998db903cab61). > > On the formatting side switch to producing cmdline= instead

[libvirt] [PATCH 3/4] lxc: fuse: Fill in MemAvailable for /proc/meminfo

2016-01-21 Thread Cole Robinson
'free' on Fedora 23 will use MemAvailable to calculate its 'available' field, but we are passing through the host's value. Set it to match MemFree, which is what 'free' will do for older linux that don't have MemAvailable https://bugzilla.redhat.com/show_bug.cgi?id=1300781 --- src/lxc/lxc_fuse.c

[libvirt] [PATCH 4/4] lxc: fuse: Stub out Slab bits in /proc/meminfo

2016-01-21 Thread Cole Robinson
'free' on fedora23 wants to use the Slab field for calculated used memory. The equation is: used = MemTotal - MemFree - (Cached + Slab) - Buffers We already set Cached and Buffers to 0, do the same for Slab and its related values https://bugzilla.redhat.com/show_bug.cgi?id=1300781 ---

[libvirt] [PATCH 2/4] lxc: fuse: Fix /proc/meminfo size calculation

2016-01-21 Thread Cole Robinson
We virtualize bits of /proc/meminfo by replacing host values with values specific to the container. However for calculating the final size of the returned data, we are using the size of the original file and not the altered copy, which could give garbelled output. --- src/lxc/lxc_fuse.c | 13

[libvirt] [PATCH 1/4] lxc: fuse: Unindent meminfo logic

2016-01-21 Thread Cole Robinson
Reverse the conditional at the start so we aren't stuffing all the logic in an 'if' block --- src/lxc/lxc_fuse.c | 122 ++--- 1 file changed, 61 insertions(+), 61 deletions(-) diff --git a/src/lxc/lxc_fuse.c b/src/lxc/lxc_fuse.c index

[libvirt] [PATCH 0/4] lxc: fix 'free' usage on fedora 23

2016-01-21 Thread Cole Robinson
We need to add a few bits to our /proc/meminfo virtualization to make 'free' work correctly on Fedora 23. https://bugzilla.redhat.com/show_bug.cgi?id=1300781 Cole Robinson (4): lxc: fuse: Unindent meminfo logic lxc: fuse: Fix /proc/meminfo size calculation lxc: fuse: Fill in MemAvailable

[libvirt] [PATCH 1/2] util: keep/use a bitmap of in-use macvtap devices

2016-01-21 Thread Laine Stump
(Intro - not to be pushed with the patch: Tony Krowiak had pointed out here: https://www.redhat.com/archives/libvir-list/2015-October/msg00877.html that libvirt takes a *very long time* to creat macvtap/macvlan devices when there are a lot of them already in use.

[libvirt] [PATCH 0/2] macvtap/802.1Qbh fixes

2016-01-21 Thread Laine Stump
The first patch generally improves performance when creating a lot of macvtap devices. It was inspired by Tony Krowiak's email back in November. The 2nd patch eliminates a bogus error when destroying a macvtap passthrough device that is using 802.1Qbh. Laine Stump (2): util: keep/use a bitmap

[libvirt] [PATCH 2/2] util: reset MAC address of macvtap passthrough physdev after disassociate

2016-01-21 Thread Laine Stump
libvirt always resets the MAC address of the physdev used for macvtap passthrough when the guest is finished with it. This was happening prior to the 802.1Qb[gh] DISASSOCIATE command, and was quite often failing, presumably because the driver wouldn't allow the MAC address to be reset while the

Re: [libvirt] [PATCH v4] libvirtd: Increase NL buffer size for lots of interface

2016-01-21 Thread Laine Stump
On 01/20/2016 08:51 AM, Leno Hou wrote: 1. When switching CPUs to offline/online in a system more than 128 cpus 2. When using virsh to destroy domain in a system with more interface All of above happens nl_recv returned with error: No buffer space available. This patch sets the socket buffer

Re: [libvirt] [PATCH LIBVIRT v2] libxl: Support cmdline= in xl config files

2016-01-21 Thread Jim Fehlig
Ian Campbell wrote: > On Wed, 2016-01-20 at 11:16 -0700, Jim Fehlig wrote: >> Ian Campbell wrote: >>> ... and consolidate the cmdline/extra/root parsing to facilitate doing >>> so. >>> >>> The logic is the same as xl's parse_cmdline from the current xen.git >>> master >>> branch

Re: [libvirt] [PATCH 2/2] Xen: add XENXL to virErrorDomain enum

2016-01-21 Thread Jim Fehlig
Ian Campbell wrote: > On Wed, 2016-01-20 at 11:58 -0700, Jim Fehlig wrote: >> Add "Xen XL Config" to the virErrorDomain enum and use it in >> src/xenconfig/xen_xl.c. >> >> Signed-off-by: Jim Fehlig > > Acked-by: Ian Campbell Thanks! I've now pushed

Re: [libvirt] [PATCH 2/2] rbd: Implement buildVolFrom using RBD cloning

2016-01-21 Thread John Ferlan
On 12/23/2015 04:29 AM, Wido den Hollander wrote: > RBD supports cloning by creating a snapshot, protecting it and create > a child image based on that snapshot afterwards. > > The RBD storage driver will try to find a snapshot with zero deltas between > the current state of the original volume

Re: [libvirt] [PATCH 1/2] rbd: Add wiping RBD volumes by using rbd_discard() or rbd_write()

2016-01-21 Thread John Ferlan
On 12/23/2015 10:06 AM, Wido den Hollander wrote: > This allows user to use the volume wiping functionality of the libvirt > storage driver. > > This patch also adds a new wiping algorithm VIR_STORAGE_VOL_WIPE_ALG_DISCARD > > By default the VIR_STORAGE_VOL_WIPE_ALG_ZERO algorithm is used and