Re: [libvirt] [PATCH 2/6] qemu: Use qemuDomainRequiresMlock() in qemuBuildCommandLine()

2015-11-18 Thread Peter Krempa
On Wed, Nov 18, 2015 at 15:13:16 +0100, Andrea Bolognani wrote: > This removes a duplication of the logic used to decide whether > the memory locking limit should be set. > --- > src/qemu/qemu_command.c | 9 +++-- > 1 file changed, 3 insertions(+), 6 deletions(-) ACK, Peter signature.asc

Re: [libvirt] [PATCH 1/6] process: Log when limiting the amount of locked memory

2015-11-18 Thread Peter Krempa
On Wed, Nov 18, 2015 at 15:13:15 +0100, Andrea Bolognani wrote: > This can be useful for debugging. > --- > src/util/virprocess.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/src/util/virprocess.c b/src/util/virprocess.c > index 103c114..4b18903 100644 > ---

Re: [libvirt] [PATCH 3/6] qemu: Use qemuDomainRequiresMlock() when attaching PCI hostdev

2015-11-18 Thread Peter Krempa
On Wed, Nov 18, 2015 at 15:13:17 +0100, Andrea Bolognani wrote: > The function is used everywhere else to check whether the locked > memory limit should be set / updated, and it should be used here > as well. > > Moreover, qemuDomainGetMlockLimitBytes() expects the hostdev to > have already been

Re: [libvirt] [PATCH v3 1/8] libxl: implement virDomainGetCPUStats

2015-11-18 Thread Jim Fehlig
On 11/16/2015 07:59 PM, Jim Fehlig wrote: > On 11/13/2015 06:14 AM, Joao Martins wrote: > @@ -5233,6 +5342,7 @@ static virHypervisorDriver libxlHypervisorDriver = { > #endif > .nodeGetFreeMemory = libxlNodeGetFreeMemory, /* 0.9.0 */ > .nodeGetCellsFreeMemory =

Re: [libvirt] [PATCH 4/6] qemu: Reduce memlock limit after detaching hostdev

2015-11-18 Thread Peter Krempa
On Wed, Nov 18, 2015 at 15:13:18 +0100, Andrea Bolognani wrote: > We increase the limit before plugging in a PCI hostdev or a memory > module because some memory might need to be locked due to eg. VFIO. > > Of course we should do the opposite after unplugging a device: this > was already the case

Re: [libvirt] [PATCH 6/6] qemu: Add ppc64-specific math to qemuDomainGetMlockLimitBytes()

2015-11-18 Thread Peter Krempa
On Wed, Nov 18, 2015 at 15:13:20 +0100, Andrea Bolognani wrote: > The amount of memory a ppc64 domain might need to lock is different > than that of a equally-sized x86 domain, so we need to check the > domain's architecture and act accordingly. > > Resolves:

[libvirt] [PATCH] vz: implementation of domainReboot callback

2015-11-18 Thread Mikhail Feoktistov
--- src/vz/vz_driver.c | 8 src/vz/vz_sdk.c| 8 src/vz/vz_sdk.h| 1 + 3 files changed, 17 insertions(+) diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c index 0a968b9..5f56eaf 100644 --- a/src/vz/vz_driver.c +++ b/src/vz/vz_driver.c @@ -923,6 +923,13 @@ static int

Re: [libvirt] [PATCH 6/6] qemu: Add ppc64-specific math to qemuDomainGetMlockLimitBytes()

2015-11-18 Thread Andrea Bolognani
On Wed, 2015-11-18 at 16:39 +0100, Peter Krempa wrote: > Is there any public documentation where you were taking the info from? > Should we link it to the code? The information was provided by David Gibson, and AFAIU what he did is go through the kernel / qemu code and take note of all the bits

Re: [libvirt] [PATCH v2 02/13] Import stripped down virtlockd code as basis of virtlogd

2015-11-18 Thread John Ferlan
On 11/12/2015 12:18 PM, Daniel P. Berrange wrote: > Copy the virtlockd codebase across to form the initial virlogd > code. Simple search & replace of s/lock/log/ and gut the remote > protocol & dispatcher. This gives us a daemon that starts up > and listens for connections, but does nothing with

[libvirt] [PATCH] vz: allow only en-us keymap for VNC

2015-11-18 Thread Mikhail Feoktistov
In virtuozzo we support only en-us keymap for VMs and containers. If keymap is specified than check that it's en-us, otherwise show error message. --- src/vz/vz_sdk.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c index

Re: [libvirt] [PATCH 4/6] qemu: Reduce memlock limit after detaching hostdev

2015-11-18 Thread Andrea Bolognani
On Wed, 2015-11-18 at 16:17 +0100, Peter Krempa wrote: > > +/* QEMU might no longer need to lock as much memory, eg. we just > > detached > > + * a VFIO device, so adjust the limit here */ > > +if (qemuDomainRequiresMlock(vm->def)) > > +if (virProcessSetMaxMemLock(vm->pid, > >

Re: [libvirt] [PATCH 4/6] qemu: Reduce memlock limit after detaching hostdev

2015-11-18 Thread Peter Krempa
On Wed, Nov 18, 2015 at 17:04:55 +0100, Andrea Bolognani wrote: > On Wed, 2015-11-18 at 16:17 +0100, Peter Krempa wrote: > > > +/* QEMU might no longer need to lock as much memory, eg. we just > > > detached > > > + * a VFIO device, so adjust the limit here */ > > > +if

Re: [libvirt] [PATCH v2 02/13] Import stripped down virtlockd code as basis of virtlogd

2015-11-18 Thread Daniel P. Berrange
On Wed, Nov 18, 2015 at 03:54:37PM +0100, Peter Krempa wrote: > On Thu, Nov 12, 2015 at 17:18:59 +, Daniel Berrange wrote: > > Copy the virtlockd codebase across to form the initial virlogd > > code. Simple search & replace of s/lock/log/ and gut the remote > > protocol & dispatcher. This

Re: [libvirt] [PATCH 5/6] qemu: Always set locked memory limit for ppc64 domains

2015-11-18 Thread Andrea Bolognani
On Wed, 2015-11-18 at 16:11 +0100, Peter Krempa wrote: > On Wed, Nov 18, 2015 at 15:13:19 +0100, Andrea Bolognani wrote: > > Unlike other architectures, ppc64 domains need to lock memory > > even when VFIO is not used. > > > > Change qemuDomainRequiresMlock() to reflect this fact. > > --- > >  

Re: [libvirt] [PATCH 5/6] qemu: Always set locked memory limit for ppc64 domains

2015-11-18 Thread Peter Krempa
On Wed, Nov 18, 2015 at 15:13:19 +0100, Andrea Bolognani wrote: > Unlike other architectures, ppc64 domains need to lock memory > even when VFIO is not used. > > Change qemuDomainRequiresMlock() to reflect this fact. > --- > src/qemu/qemu_domain.c | 9 +++-- > 1 file changed, 7

Re: [libvirt] [PATCH 6/6] qemu: Add ppc64-specific math to qemuDomainGetMlockLimitBytes()

2015-11-18 Thread Peter Krempa
On Wed, Nov 18, 2015 at 15:13:20 +0100, Andrea Bolognani wrote: > The amount of memory a ppc64 domain might need to lock is different > than that of a equally-sized x86 domain, so we need to check the > domain's architecture and act accordingly. > > Resolves:

Re: [libvirt] [PATCH v3 2/8] libxl: implement virDomainMemorystats

2015-11-18 Thread Joao Martins
On 11/17/2015 11:15 PM, Jim Fehlig wrote: > Joao Martins wrote: >> Introduce support for domainMemoryStats API call, which >> consequently enables the use of `virsh dommemstat` command to >> query for memory statistics of a domain. We support >> the following statistics: balloon info, available

[libvirt] [PATCH 08/21] qemu: migration: src: add nbd tunnel socket data

2015-11-18 Thread Pavel Boldin
Add local NBD tunnel socket info to the qemuMigrationSpec structure. Signed-off-by: Pavel Boldin --- src/qemu/qemu_migration.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 3eee3a5..fb2a216 100644 ---

[libvirt] [PATCH 05/21] domain: add virDomainMigrateOpenTunnel

2015-11-18 Thread Pavel Boldin
Add auxiliary private function that calls the apropriate driver's domainMigrateOpenTunnel function. Signed-off-by: Pavel Boldin --- docs/apibuild.py | 1 + docs/hvsupport.pl| 1 + src/libvirt-domain.c | 43 +++

[libvirt] [PATCH 13/21] qemu: migration: src: qemuNBDTunnelAcceptAndPipe

2015-11-18 Thread Pavel Boldin
Add qemuNBDTunnelAcceptAndPipe function that is called to handle POLLIN on the UNIX socket connection from the QEMU's NBD server. The function creates a pipe of a remote stream connected to the QEMU NBD Unix socket on destination and a local stream connected to the incoming connection from the

Re: [libvirt] [PATCH v3 3/8] libxl: implement virDomainInterfaceStats

2015-11-18 Thread Joao Martins
On 11/17/2015 11:38 PM, Jim Fehlig wrote: > Joao Martins wrote: >> >> On 11/17/2015 02:48 AM, Jim Fehlig wrote: >>> On 11/13/2015 06:14 AM, Joao Martins wrote: Introduce support for domainInterfaceStats API call for querying network interface statistics. Consequently it also enables

[libvirt] [PATCH 06/21] domain: add virDomainMigrateTunnelFlags

2015-11-18 Thread Pavel Boldin
Add virDomainMigrateTunnelFlags enum. Signed-off-by: Pavel Boldin --- include/libvirt/libvirt-domain.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h index a1ea6a5..444deee 100644 ---

[libvirt] [PATCH 10/21] qemu: migration: src: qemu `drive-mirror` to UNIX

2015-11-18 Thread Pavel Boldin
Make qemuMigrationDriveMirror able to instruct QEMU to connect to a local UNIX socket used for tunnelling. Signed-off-by: Pavel Boldin --- src/qemu/qemu_migration.c | 45 ++--- 1 file changed, 30 insertions(+), 15 deletions(-) diff

[libvirt] [PATCH 12/21] qemu: migration: src: add NBD unixSock to iothread

2015-11-18 Thread Pavel Boldin
Pass UNIX socket used as a local NBD server destination to the migration iothread. Signed-off-by: Pavel Boldin --- src/qemu/qemu_migration.c | 46 ++ 1 file changed, 38 insertions(+), 8 deletions(-) diff --git

[libvirt] [PATCH 03/21] remote_driver: introduce virRemoteClientNew

2015-11-18 Thread Pavel Boldin
Move common code to a function. Signed-off-by: Pavel Boldin --- src/remote/remote_driver.c | 48 +++--- 1 file changed, 28 insertions(+), 20 deletions(-) diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index

[libvirt] [PATCH 19/21] qemu: migration: dest: qemuMigrationOpenNBDTunnel

2015-11-18 Thread Pavel Boldin
Add qemuMigrationOpenNBDTunnel that connects a remote stream to the local NBD UNIX socket. Signed-off-by: Pavel Boldin --- src/qemu/qemu_migration.c | 29 + 1 file changed, 29 insertions(+) diff --git a/src/qemu/qemu_migration.c

[libvirt] [PATCH 21/21] apparmor: fix tunnelmigrate permissions

2015-11-18 Thread Pavel Boldin
Signed-off-by: Pavel Boldin --- src/security/virt-aa-helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c index 5de56e5..87af98f 100644 --- a/src/security/virt-aa-helper.c +++

[libvirt] [PATCH] set UID and GID according to dynamicOwnership

2015-11-18 Thread Matteo Cafasso
When called with dynamicOwnership set, the qemuOpenFileAs function ignores it resulting in files not created with proper permissions. The issue is reported in: https://www.redhat.com/archives/libvirt-users/2015-November/msg00039.html and also mentioned in:

Re: [libvirt] [PATCH v3 5/8] libxl: implement virDomainBlockStats

2015-11-18 Thread Jim Fehlig
On 11/13/2015 06:14 AM, Joao Martins wrote: > Introduce initial support for domainBlockStats API call that > allow us to query block device statistics. openstack nova > uses this API call to query block statistics, alongside > virDomainMemoryStats and virDomainInterfaceStats. Note that > this

[libvirt] [PATCH 11/21] qemu: migration: src: qemuSock for running thread

2015-11-18 Thread Pavel Boldin
Tunnelled drive mirroring requires an active thread to accept incoming connections from the QEMU and pumping them to the remote host through the tunnel. For this, we need to split thread's QEMU socket initialization from the start of the thread and introduce qemuMigrationSetQEMUSocket to specify

[libvirt] [PATCH 09/21] qemu: migration: src: nbdtunnel unix socket

2015-11-18 Thread Pavel Boldin
Create a UNIX socket that will be a target for outgoing NBD connection from the QEMU side. Signed-off-by: Pavel Boldin --- src/qemu/qemu_migration.c | 24 +++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_migration.c

[libvirt] [PATCH 00/21] Support NBD for tunnelled migration

2015-11-18 Thread Pavel Boldin
The provided patchset implements NBD disk migration over a tunnelled connection provided by libvirt. The migration source instructs QEMU to NBD mirror drives into the provided UNIX socket. These connections and all the data are then tunnelled to the destination using newly introduced RPC call.

[libvirt] [PATCH 20/21] qemu: migration: allow NBD tunneling migration

2015-11-18 Thread Pavel Boldin
Now that all the pieces are in their places finally allow NBD in tunnelled migration. Signed-off-by: Pavel Boldin --- src/qemu/qemu_migration.c | 16 ++-- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/qemu/qemu_migration.c

[libvirt] [PATCH 02/21] driver: add virDrvDomainMigrateOpenTunnel

2015-11-18 Thread Pavel Boldin
Add virDrvDomainMigrateOpenTunnel call that is to be implemented by the drivers in order to provide a way to open tunnel during migration. Signed-off-by: Pavel Boldin --- src/driver-hypervisor.h | 8 1 file changed, 8 insertions(+) diff --git

[libvirt] [PATCH 01/21] rpc: add DOMAIN_MIGRATE_OPEN_TUNNEL proc

2015-11-18 Thread Pavel Boldin
Add REMOTE_PROC_DOMAIN_MIGRATE_OPEN_TUNNEL remote call, args and rets. Signed-off-by: Pavel Boldin --- daemon/remote.c | 12 src/remote/remote_protocol.x | 19 ++- src/remote_protocol-structs | 8 3 files changed, 38

[libvirt] [PATCH 17/21] qemu: migration: dest: qemuMigrationOpenTunnel

2015-11-18 Thread Pavel Boldin
Introduce an auxiliary handler domainMigrateOpenTunnel for QEMU. Signed-off-by: Pavel Boldin --- src/qemu/qemu_migration.c | 19 +++ src/qemu/qemu_migration.h | 6 ++ 2 files changed, 25 insertions(+) diff --git a/src/qemu/qemu_migration.c

[libvirt] [PATCH 07/21] remote: impl remoteDispatchDomainMigrateOpenTunnel

2015-11-18 Thread Pavel Boldin
Implement remoteDispatchDomainMigrateOpenTunnel. Signed-off-by: Pavel Boldin --- daemon/remote.c | 50 -- 1 file changed, 44 insertions(+), 6 deletions(-) diff --git a/daemon/remote.c b/daemon/remote.c index 237124d..3c6803e

[libvirt] [PATCH 14/21] qemu: migration: src: stream piping

2015-11-18 Thread Pavel Boldin
Add and use qemuMigrationPipeEvent piped streams' event handler. It sets the appropriate event flags for each of the stream and pumps the pipe using qemuMigrationPipeIO whenever there is a data at any end. Signed-off-by: Pavel Boldin --- src/qemu/qemu_migration.c | 85

[libvirt] [PATCH 04/21] remote_driver: add remoteDomainMigrateOpenTunnel

2015-11-18 Thread Pavel Boldin
Add remoteDomainMigrateOpenTunnel that ties passed stream to the network stream and then makes the appropriate remote call. Signed-off-by: Pavel Boldin --- src/remote/remote_driver.c | 43 +++ 1 file changed, 43 insertions(+) diff

[libvirt] [PATCH 15/21] qemu: monitor: add qemuMonitorNBDServerStartUnix

2015-11-18 Thread Pavel Boldin
Add qemuMonitorNBDServerStartUnix used to instruct QEMU to connect to a UNIX socket as a NBD drive mirror destination. Signed-off-by: Pavel Boldin --- src/qemu/qemu_monitor.c | 12 src/qemu/qemu_monitor.h | 2 ++ src/qemu/qemu_monitor_json.c | 35

[libvirt] [PATCH 18/21] qemu: driver: add qemuDomainMigrateOpenTunnel

2015-11-18 Thread Pavel Boldin
Add domainMigrateOpenTunnel handler for QEMU driver. Signed-off-by: Pavel Boldin --- src/qemu/qemu_driver.c | 24 1 file changed, 24 insertions(+) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 92a9961..ad9a6a0 100644 ---

[libvirt] [PATCH 16/21] qemu: migration: dest: nbd-server to UNIX sock

2015-11-18 Thread Pavel Boldin
Modify qemuMigrationStartNBDServer so it can instruct QEMU to start NBD server binded to a local UNIX socket. Signed-off-by: Pavel Boldin --- src/qemu/qemu_migration.c | 18 +++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git

Re: [libvirt] [PATCH v3 1/8] libxl: implement virDomainGetCPUStats

2015-11-18 Thread Joao Martins
On 11/18/2015 05:33 PM, Jim Fehlig wrote: > On 11/16/2015 07:59 PM, Jim Fehlig wrote: >> On 11/13/2015 06:14 AM, Joao Martins wrote: >> @@ -5233,6 +5342,7 @@ static virHypervisorDriver libxlHypervisorDriver = { >> #endif >> .nodeGetFreeMemory = libxlNodeGetFreeMemory, /* 0.9.0 */ >>

[libvirt] qemuParseCommandLine and virDomainDefPostParse (and virDomaniDefAddImplicitControllers)

2015-11-18 Thread Laine Stump
While playing with the idea of forcing explicit USB controller models, I ended up with the qemuargv2xml test failing; it ended up that this was because changes I had made to qemuDomainDefPostParse() were affecting the XML produced by qemuParseCommandline(). The reason - after constructing a

Re: [libvirt] [PATCH v2 03/13] logging: introduce log handling protocol

2015-11-18 Thread John Ferlan
On 11/12/2015 12:19 PM, Daniel P. Berrange wrote: > Define a new RPC protocol for the virtlogd daemon that provides > for handling of logs. The initial RPC method defined allows a > client to obtain a file handle to use for writing to a log > file for a guest domain. The file handle passed back

Re: [libvirt] [PATCH v3 2/8] libxl: implement virDomainMemorystats

2015-11-18 Thread Jim Fehlig
On 11/18/2015 11:05 AM, Joao Martins wrote: > > On 11/17/2015 11:15 PM, Jim Fehlig wrote: >> Joao Martins wrote: >>> Introduce support for domainMemoryStats API call, which >>> consequently enables the use of `virsh dommemstat` command to >>> query for memory statistics of a domain. We support >>>

Re: [libvirt] [PATCH v3 4/8] util: add virDiskNameParse to handle disk and partition idx

2015-11-18 Thread Jim Fehlig
On 11/13/2015 06:14 AM, Joao Martins wrote: > Introduce a new helper function "virDiskNameParse" which extends > virDiskNameToIndex but handling both disk index and partition index. > Also rework virDiskNameToIndex to be based on virDiskNameParse. > A test is also added for this function testing

Re: [libvirt] [PATCH] lxc: Don't make container's TTY a controlling TTY

2015-11-18 Thread Daniel P. Berrange
On Tue, Jun 23, 2015 at 03:18:53PM +0200, Richard Weinberger wrote: > Userspace does not expect that the initial console > is a controlling TTY. systemd can deal with that, others not. > On sysv init distros getty will fail to spawn a controlling on > /dev/console or /dev/tty1. Which will cause to

Re: [libvirt] [PATCH] lxc: Bind mount container TTYs

2015-11-18 Thread Daniel P. Berrange
On Tue, Jun 23, 2015 at 04:38:57PM +0200, Richard Weinberger wrote: > Instead of creating symlinks, bind mount the devices to > /dev/pts/XY. > Using bind mounts it is no longer needed to add pts devices > to files like /dev/securetty. > > Signed-off-by: Richard Weinberger > --- >

Re: [libvirt] [PATCH v2 01/13] util: add APIs for reading/writing from/to rotating files

2015-11-18 Thread Peter Krempa
On Thu, Nov 12, 2015 at 17:18:58 +, Daniel Berrange wrote: > Add virRotatingFileReader and virRotatingFileWriter objects > which allow reading & writing from/to files with automation > rotation to N backup files when a size limit is reached. This > is useful for guest logging when a guaranteed

[libvirt] How to disable kvm_steal_time feature

2015-11-18 Thread Piotr Rybicki
Hi. I would like to workaround a bug, when after live-migration of KVM guest, there is a 100% steal time shown in guest. I've read, that disabling 'kvm_steal_time' feature should workarund this bug, but i can't find a way to disable it in libvirt's domain xml file. Tried in section: but

Re: [libvirt] [PATCH] [RFC] virSetUIDGID: Don't leak supplementary groups

2015-11-18 Thread Daniel P. Berrange
On Wed, Nov 18, 2015 at 07:35:39AM +0100, Martin Kletzander wrote: > On Tue, Nov 17, 2015 at 10:02:36PM +0100, Richard Weinberger wrote: > >On Wed, Jun 24, 2015 at 11:19 AM, Martin Kletzander > >wrote: > >>On Tue, Jun 23, 2015 at 01:48:42PM +0200, Richard Weinberger wrote: >

Re: [libvirt] [PATCH] [RFC] virSetUIDGID: Don't leak supplementary groups

2015-11-18 Thread Daniel P. Berrange
On Tue, Jun 23, 2015 at 01:48:42PM +0200, Richard Weinberger wrote: > The LXC driver uses virSetUIDGID() to become UID/GID 0. > It passes an empty groups list to virSetUIDGID() > to get rid of all supplementary groups from the host side. > But virSetUIDGID() calls setgroups() only if the supplied

Re: [libvirt] [PATCH] [RFC] virSetUIDGID: Don't leak supplementary groups

2015-11-18 Thread Daniel P. Berrange
On Tue, Jun 23, 2015 at 01:48:42PM +0200, Richard Weinberger wrote: > The LXC driver uses virSetUIDGID() to become UID/GID 0. > It passes an empty groups list to virSetUIDGID() > to get rid of all supplementary groups from the host side. > But virSetUIDGID() calls setgroups() only if the supplied

Re: [libvirt] [PATCH v2 0/7] Allow memory hotplug without NUMA on ppc64

2015-11-18 Thread Peter Krempa
On Thu, Nov 12, 2015 at 14:28:51 -0500, John Ferlan wrote: > > > ACK series Pushed; Thanks. Peter signature.asc Description: Digital signature -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH v2] locking: Add io_timeout to sanlock

2015-11-18 Thread Michal Privoznik
On 27.10.2015 17:53, Jiri Denemark wrote: > On Tue, Oct 27, 2015 at 16:29:51 +0100, Michal Privoznik wrote: >> https://bugzilla.redhat.com/show_bug.cgi?id=1251190 >> >> So, if domain loses access to storage, sanlock tries to kill it >> after some timeout. So far, the default is 80 seconds. But for

Re: [libvirt] [PATCH 0/8] Add perf and Intel CMT feature support

2015-11-18 Thread Ren, Qiaowei
> -Original Message- > From: Daniel P. Berrange [mailto:berra...@redhat.com] > Sent: Tuesday, November 17, 2015 6:47 PM > To: Ren, Qiaowei > Cc: libvir-list@redhat.com; Jiri Denemark > Subject: Re: [PATCH 0/8] Add perf and Intel CMT feature support > > On Tue, Nov 17, 2015 at 04:00:40PM

[libvirt] [PATCH] storage sheepdog: allow to specify redundancy level

2015-11-18 Thread Vasiliy Tolstov
Some storage backends allows to specify per volume redundancy options. Sheepdog use x format for specify copies, and x:y format to specify data and parity block count. Signed-off-by: Alexey Tyabin Signed-off-by: Vasiliy Tolstov ---

[libvirt] [PATCH 4/6] qemu: Reduce memlock limit after detaching hostdev

2015-11-18 Thread Andrea Bolognani
We increase the limit before plugging in a PCI hostdev or a memory module because some memory might need to be locked due to eg. VFIO. Of course we should do the opposite after unplugging a device: this was already the case for memory modules, but not for hostdevs. --- src/qemu/qemu_hotplug.c |

[libvirt] [PATCH 5/6] qemu: Always set locked memory limit for ppc64 domains

2015-11-18 Thread Andrea Bolognani
Unlike other architectures, ppc64 domains need to lock memory even when VFIO is not used. Change qemuDomainRequiresMlock() to reflect this fact. --- src/qemu/qemu_domain.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c

Re: [libvirt] [PATCH v2 02/13] Import stripped down virtlockd code as basis of virtlogd

2015-11-18 Thread Peter Krempa
On Thu, Nov 12, 2015 at 17:18:59 +, Daniel Berrange wrote: > Copy the virtlockd codebase across to form the initial virlogd > code. Simple search & replace of s/lock/log/ and gut the remote > protocol & dispatcher. This gives us a daemon that starts up > and listens for connections, but does

[libvirt] [PATCH v2] storage sheepdog: allow to specify redundancy level

2015-11-18 Thread Vasiliy Tolstov
This is fixed version that compiles and passes make check -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] Found mem leak in livirt, need help to debug

2015-11-18 Thread Piotr Rybicki
Hi. There is a mem leak in libvirt, when doing external snapshot (for backup purposes). My KVM domain uses raw storage images via libgfapi. I'm using latest 1.2.21 libvirt (although previous versions act the same). My bash script for snapshot backup uses series of shell commands (virsh

Re: [libvirt] [PATCH v2 01/13] util: add APIs for reading/writing from/to rotating files

2015-11-18 Thread John Ferlan
On 11/12/2015 12:18 PM, Daniel P. Berrange wrote: > Add virRotatingFileReader and virRotatingFileWriter objects > which allow reading & writing from/to files with automation > rotation to N backup files when a size limit is reached. This > is useful for guest logging when a guaranteed finite

[libvirt] [PATCH 3/6] qemu: Use qemuDomainRequiresMlock() when attaching PCI hostdev

2015-11-18 Thread Andrea Bolognani
The function is used everywhere else to check whether the locked memory limit should be set / updated, and it should be used here as well. Moreover, qemuDomainGetMlockLimitBytes() expects the hostdev to have already been added to the domain definition, but we only do that at the end of

[libvirt] [PATCH 0/6] Fixes for memory locking limit

2015-11-18 Thread Andrea Bolognani
The code dealing with RLIMIT_MEMLOCK contained a few assumptions that hold for x86 but don't necessarily work as well for other platforms, eg. that qemu will need to lock memory only when VFIO passthrough is involved. This series removes such assumptions by removing ad-hoc code and making sure

[libvirt] [PATCH 6/6] qemu: Add ppc64-specific math to qemuDomainGetMlockLimitBytes()

2015-11-18 Thread Andrea Bolognani
The amount of memory a ppc64 domain might need to lock is different than that of a equally-sized x86 domain, so we need to check the domain's architecture and act accordingly. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1273480 --- src/qemu/qemu_domain.c | 80

Re: [libvirt] [PATCH v2 01/13] util: add APIs for reading/writing from/to rotating files

2015-11-18 Thread Daniel P. Berrange
On Wed, Nov 18, 2015 at 08:46:43AM -0500, John Ferlan wrote: > > > On 11/12/2015 12:18 PM, Daniel P. Berrange wrote: > > Add virRotatingFileReader and virRotatingFileWriter objects > > which allow reading & writing from/to files with automation > > rotation to N backup files when a size limit is

[libvirt] [PATCH 2/6] qemu: Use qemuDomainRequiresMlock() in qemuBuildCommandLine()

2015-11-18 Thread Andrea Bolognani
This removes a duplication of the logic used to decide whether the memory locking limit should be set. --- src/qemu/qemu_command.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 8fdf90c..3e9eb8c 100644 ---

[libvirt] [PATCH 1/6] process: Log when limiting the amount of locked memory

2015-11-18 Thread Andrea Bolognani
This can be useful for debugging. --- src/util/virprocess.c | 4 1 file changed, 4 insertions(+) diff --git a/src/util/virprocess.c b/src/util/virprocess.c index 103c114..4b18903 100644 --- a/src/util/virprocess.c +++ b/src/util/virprocess.c @@ -766,6 +766,10 @@

Re: [libvirt] [PATCH v2 13/13] qemu: add support for sending QEMU stdout/stderr to virtlogd

2015-11-18 Thread John Ferlan
On 11/12/2015 12:19 PM, Daniel P. Berrange wrote: > Currently the QEMU stdout/stderr streams are written directly to > a regular file (eg /var/log/libvirt/qemu/$GUEST.log). While those > can be rotated by logrotate (using copytruncate option) this is > not very efficient. It also leaves open a

Re: [libvirt] [PATCH v2 12/13] qemu: convert monitor to use qemuDomainLogContextPtr indirectly

2015-11-18 Thread John Ferlan
On 11/12/2015 12:19 PM, Daniel P. Berrange wrote: > Currently the QEMU monitor is given an FD to the logfile. This > won't work in the future with virtlogd, so it needs to use the > qemuDomainLogContextPtr instead, but it shouldn't directly > access that object either. So define a callback that

Re: [libvirt] [PATCH v3 6/8] libxl: implement virConnectGetAllDomainStats

2015-11-18 Thread Jim Fehlig
On 11/13/2015 06:14 AM, Joao Martins wrote: > Introduce support for connectGetAllDomainStats call that > allow us to _all_ domain(s) statistics including network, block, allows us to get > cpus and memory. Changes are rather mechanical and mostly > take care of the format to export the data. > >

Re: [libvirt] [PATCH v2 08/13] qemu: convert log file creation to use qemuDomainLogContextPtr

2015-11-18 Thread John Ferlan
On 11/12/2015 12:19 PM, Daniel P. Berrange wrote: > Convert the places which create/open log files to use the new > qemuDomainLogContextPtr object instead. > > Signed-off-by: Daniel P. Berrange > --- > src/qemu/qemu_domain.c | 100 >

Re: [libvirt] [PATCH v2 07/13] qemu: introduce a qemuDomainLogContext object

2015-11-18 Thread John Ferlan
On 11/12/2015 12:19 PM, Daniel P. Berrange wrote: > Introduce a qemuDomainLogContext object to encapsulate > handling of I/O to/from the domain log file. This will > hide details of the log file implementation from the > rest of the driver, making it easier to introduce > support for virtlogd

Re: [libvirt] [PATCH v2 11/13] qemu: convert process stop/attach to use qemuDomainLogContextPtr

2015-11-18 Thread John Ferlan
On 11/12/2015 12:19 PM, Daniel P. Berrange wrote: > When the qemuProcessAttach/Stop methods write a marker into > the log file, they can use qemuDomainLogContextWrite to > write a formatted message. > > Signed-off-by: Daniel P. Berrange > --- > src/qemu/qemu_process.c |

[libvirt] [PATCH 0/2] libxl: a few minor fixes

2015-11-18 Thread Jim Fehlig
A few minor fixes for patches 1 and 2 of Joao's series adding stats support to the libxl driver https://www.redhat.com/archives/libvir-list/2015-November/msg00489.html I only noticed the minor flaws while reviewing patches later in the series, after already committing patches 1 and 2. Jim

Re: [libvirt] [PATCH v2 09/13] qemu: change qemuDomainTaint APIs to accept qemuDomainLogContextPtr

2015-11-18 Thread John Ferlan
On 11/12/2015 12:19 PM, Daniel P. Berrange wrote: > The qemuDomainTaint APIs currently expect to be passed a log file > descriptor. Change them to instead use a qemuDomainLogContextPtr > to hide the implementation details. > > Signed-off-by: Daniel P. Berrange > --- >

Re: [libvirt] [PATCH v2 10/13] qemu: convert qemuLogOperation to take a qemuDomainLogContextPtr

2015-11-18 Thread John Ferlan
On 11/12/2015 12:19 PM, Daniel P. Berrange wrote: > Instead of writing directly to a log file descriptor, change > qemuLogOperation to use qemuDomainLogContextWrite(). > > Signed-off-by: Daniel P. Berrange > --- > src/qemu/qemu_process.c | 39

[libvirt] [PATCH] libvirt-domain: Fix typo in debug message

2015-11-18 Thread Cole Robinson
--- Pushed as trivial src/libvirt-domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index de7eb04..7cfbe58 100644 --- a/src/libvirt-domain.c +++ b/src/libvirt-domain.c @@ -2015,7 +2015,7 @@

Re: [libvirt] [Xen-devel] [PATCH v3 2/8] libxl: implement virDomainMemorystats

2015-11-18 Thread Konrad Rzeszutek Wilk
On November 17, 2015 6:15:38 PM EST, Jim Fehlig wrote: >Joao Martins wrote: >> Introduce support for domainMemoryStats API call, which >> consequently enables the use of `virsh dommemstat` command to >> query for memory statistics of a domain. We support >> the following

[libvirt] [PATCH 1/2] libxl: unref libxlDriverConfig object

2015-11-18 Thread Jim Fehlig
Commits b6e19cf4 and 6472e54a missed unref'ing the libxlDriverConfig object. Add missing calls to virObjectUnref. Signed-off-by: Jim Fehlig --- src/libxl/libxl_driver.c | 22 -- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git

[libvirt] [PATCH 2/2] libxl: don't unlock virDomainObj if refcnt is 0

2015-11-18 Thread Jim Fehlig
Commit 6472e54a unlocks the virDomainObj even if libxlDomainObjEndJob returns false, indicating that its refcnt has dropped to 0. Signed-off-by: Jim Fehlig --- src/libxl/libxl_driver.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git

Re: [libvirt] [PATCH v2 06/13] qemu: unify code for reporting errors from QEMU log files

2015-11-18 Thread John Ferlan
On 11/12/2015 12:19 PM, Daniel P. Berrange wrote: > There are two pretty similar functions qemuProcessReadLog and > qemuProcessReadChildErrors. Both read from the QEMU log file > and try to strip out libvirt messages. The latter than reports s/than/then > an error, while the former lets the

Re: [libvirt] [PATCH v2 04/13] logging: add client for virtlogd daemon

2015-11-18 Thread John Ferlan
On 11/12/2015 12:19 PM, Daniel P. Berrange wrote: > Add the virLogManager API which allows for communication with > the virtlogd daemon to RPC program. This provides the client > side API to open log files for guest domains. > > The virtlogd daemon is setup to auto-spawn on first use when >

Re: [libvirt] [PATCH v2 05/13] qemu: remove writing to QEMU log file for rename operation

2015-11-18 Thread John Ferlan
On 11/12/2015 12:19 PM, Daniel P. Berrange wrote: > The rename operation only works on inactive virtual machines, > but it none the less writes to the log file used by the QEMU > processes. This log file is not intended to provide a general > purpose audit trail of operations performed on VMs.