Re: [libvirt] [PATCH] libvirt-guests: Disable shutdown timeout

2015-11-17 Thread Guido Günther
On Tue, Nov 17, 2015 at 10:51:55AM +, Daniel P. Berrange wrote: > On Tue, Nov 17, 2015 at 08:43:54AM +0100, Guido Günther wrote: > > Since we can't know at service start how many VMs will be running we > > can't calculate an apropriate shutdown timeout. So instead of killing > > off the service

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

2015-11-17 Thread Martin Kletzander
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: The LXC driver uses virSetUIDGID() to become UID/GID 0. It passes an empty groups list to virSetUI

Re: [libvirt] [PATCH v2] tpm: adapt sysfs cancel path for new TPM driver

2015-11-17 Thread Cole Robinson
On 11/17/2015 08:14 PM, Cole Robinson wrote: > On 11/17/2015 07:44 PM, Stefan Berger wrote: >> This patch addresses BZ 1244895. >> >> Adapt the sysfs TPM command cancel path for the TPM driver that >> does not use a miscdevice anymore since Linux 4.0. Support old >> and new paths and check their av

Re: [libvirt] [PATCH v2] tpm: adapt sysfs cancel path for new TPM driver

2015-11-17 Thread Cole Robinson
On 11/17/2015 07:44 PM, Stefan Berger wrote: > This patch addresses BZ 1244895. > > Adapt the sysfs TPM command cancel path for the TPM driver that > does not use a miscdevice anymore since Linux 4.0. Support old > and new paths and check their availability. > > Add a mockup for the test cases to

[libvirt] [PATCH v2] tpm: adapt sysfs cancel path for new TPM driver

2015-11-17 Thread Stefan Berger
This patch addresses BZ 1244895. Adapt the sysfs TPM command cancel path for the TPM driver that does not use a miscdevice anymore since Linux 4.0. Support old and new paths and check their availability. Add a mockup for the test cases to avoid the testing for availability of the cancel path. Si

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

2015-11-17 Thread Jim Fehlig
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 the >>> use of `virsh domifstat ` command. >>> >>> A

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

2015-11-17 Thread Jim Fehlig
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 and currently > in use. swap-in, swap-out, major-fa

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

2015-11-17 Thread Vasiliy Tolstov
2015-11-18 1:10 GMT+03:00 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. Third version of the patch compiled fine. -- Vasiliy Tolstov, e-mail: v.tols.

[libvirt] storage sheepdog: allow to specify redundancy level

2015-11-17 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 --- docs/schemas/storagevol.rng| 3 ++ src/conf/st

Re: [libvirt] [PATCH v2] tpm: adapt sysfs cancel path for new TPM driver

2015-11-17 Thread Stefan Berger
Cole Robinson wrote on 11/17/2015 04:37:56 PM: > From: Cole Robinson > To: Stefan Berger/Watson/IBM@IBMUS, libvir-list@redhat.com, > berra...@redhat.com > Cc: Stefan Berger > Date: 11/17/2015 04:38 PM > Subject: Re: [PATCH v2] tpm: adapt sysfs cancel path for new TPM driver > > On 11/17/2015

Re: [libvirt] [PATCH v2] tpm: adapt sysfs cancel path for new TPM driver

2015-11-17 Thread Cole Robinson
On 11/17/2015 10:46 AM, Stefan Berger wrote: > Adapt the sysfs TPM command cancel path for the TPM driver that > does not use a miscdevice anymore since Linux 4.0. Support old > and new paths and check their availability. > > Add a mockup for the test cases to avoid the testing for > availability

Re: [libvirt] [PATCH v2] tpm: adapt sysfs cancel path for new TPM driver

2015-11-17 Thread Cole Robinson
On 11/17/2015 04:26 PM, Stefan Berger wrote: > Cole Robinson wrote on 11/17/2015 03:55:13 PM: > >> From: Cole Robinson >> To: Stefan Berger , Stefan Berger/ >> Watson/IBM@IBMUS, libvir-list@redhat.com, berra...@redhat.com >> Date: 11/17/2015 03:55 PM >> Subject: Re: [PATCH v2] tpm: adapt sysfs c

Re: [libvirt] [PATCH v2] tpm: adapt sysfs cancel path for new TPM driver

2015-11-17 Thread Stefan Berger
Cole Robinson wrote on 11/17/2015 03:55:13 PM: > From: Cole Robinson > To: Stefan Berger , Stefan Berger/ > Watson/IBM@IBMUS, libvir-list@redhat.com, berra...@redhat.com > Date: 11/17/2015 03:55 PM > Subject: Re: [PATCH v2] tpm: adapt sysfs cancel path for new TPM driver > > On 11/17/2015 03:49

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

2015-11-17 Thread Richard Weinberger
On Fri, Jul 3, 2015 at 1:55 PM, Martin Kletzander wrote: > 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/securett

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

2015-11-17 Thread Richard Weinberger
On Tue, Jun 23, 2015 at 3:18 PM, 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 whole co

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

2015-11-17 Thread Richard Weinberger
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: >> >> 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

Re: [libvirt] [PATCH v2] tpm: adapt sysfs cancel path for new TPM driver

2015-11-17 Thread Cole Robinson
On 11/17/2015 03:49 PM, Stefan Berger wrote: > On 11/17/2015 02:12 PM, Cole Robinson wrote: >> First, thanks for following up on the fedora bugs so quickly! >> >> On 11/17/2015 10:46 AM, Stefan Berger wrote: >>> Adapt the sysfs TPM command cancel path for the TPM driver that >>> does not use a misc

Re: [libvirt] [PATCH v2] tpm: adapt sysfs cancel path for new TPM driver

2015-11-17 Thread Stefan Berger
On 11/17/2015 02:12 PM, Cole Robinson wrote: First, thanks for following up on the fedora bugs so quickly! On 11/17/2015 10:46 AM, Stefan Berger wrote: Adapt the sysfs TPM command cancel path for the TPM driver that does not use a miscdevice anymore since Linux 4.0. Support old and new paths an

Re: [libvirt] [PATCH v2] tpm: adapt sysfs cancel path for new TPM driver

2015-11-17 Thread Cole Robinson
First, thanks for following up on the fedora bugs so quickly! On 11/17/2015 10:46 AM, Stefan Berger wrote: > Adapt the sysfs TPM command cancel path for the TPM driver that > does not use a miscdevice anymore since Linux 4.0. Support old > and new paths and check their availability. > > Add a moc

Re: [libvirt] [PATCH 1/1] virt-aa-helper: support OVMF

2015-11-17 Thread Serge Hallyn
Quoting Guido Günther (a...@sigxcpu.org): > On Mon, Nov 16, 2015 at 05:59:08PM +, Serge Hallyn wrote: > > > > As suggested by Jamie Strandboge in > > > > https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1483071 > > > > Signed-off-by: Serge Hallyn > > --- > > src/security/virt-aa-help

[libvirt] [PATCH 2/2] storage: Change virStorageBackendVolOpen to use virFileOpenAs

2015-11-17 Thread John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1282288 Rather than using just open on the path, allow for the possibility that the path to be opened resides on an NFS root-squash target and was created under a different uid/gid. Without using virFileOpenAs an attempt to get the volume size data may

[libvirt] [PATCH 1/2] storage: Really fix setting mode for backend exec in NFS root-squash env

2015-11-17 Thread John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1282288 Although commit id '77346f27' resolves part of the problem regarding creating a qemu-img image in an NFS root-squash environment, it really didn't fix the entire problem. Unfortunately it only masked the problem. It seems qemu-img must open/creat

[libvirt] [PATCH 0/2] Address more nfs root-squash issues

2015-11-17 Thread John Ferlan
Fix a couple of more issues with an NFS root-squash environment. The details are in the commit messages and bugzilla comments. NB: While using virFileOpenAs in the virStorageBackendVolOpen path and checking for EACESS/EPERM afterwards may seem a bit counter intuitive, but those will be returned if

[libvirt] [PATCH v2] tpm: adapt sysfs cancel path for new TPM driver

2015-11-17 Thread Stefan Berger
Adapt the sysfs TPM command cancel path for the TPM driver that does not use a miscdevice anymore since Linux 4.0. Support old and new paths and check their availability. Add a mockup for the test cases to avoid the testing for availability of the cancel path. Signed-off-by: Stefan Berger --- s

Re: [libvirt] [PATCH] tpm: adapt sysfs cancel path for new TPM driver

2015-11-17 Thread Daniel P. Berrange
On Tue, Nov 17, 2015 at 10:24:51AM -0500, Stefan Berger wrote: > On 11/17/2015 09:24 AM, Daniel P. Berrange wrote: > >On Tue, Nov 17, 2015 at 09:18:29AM -0500, Stefan Berger wrote: > >> > >>To get that path right we need to test it's availability by opening it. > >>Unfortunately there's problem wi

Re: [libvirt] [PATCH] tpm: adapt sysfs cancel path for new TPM driver

2015-11-17 Thread Stefan Berger
On 11/17/2015 09:24 AM, Daniel P. Berrange wrote: On Tue, Nov 17, 2015 at 09:18:29AM -0500, Stefan Berger wrote: To get that path right we need to test it's availability by opening it. Unfortunately there's problem with that now related to the test case below where, if the test is run as non-r

Re: [libvirt] [Qemu-devel] [QEMU PATCH] target-i386: Disable rdtscp on Opteron_G* CPU models

2015-11-17 Thread Eduardo Habkost
On Fri, Nov 13, 2015 at 05:07:13PM -0200, Eduardo Habkost wrote: > KVM can't virtualize rdtscp on AMD CPUs yet, so there's no point > in enabling it by default on AMD CPU models, as all we are > getting are confused users because of the "host doesn't support > requested feature" warnings. > > Disa

Re: [libvirt] [PATCH] tpm: adapt sysfs cancel path for new TPM driver

2015-11-17 Thread Daniel P. Berrange
On Tue, Nov 17, 2015 at 09:18:29AM -0500, Stefan Berger wrote: > On 11/16/2015 10:12 PM, Stefan Berger wrote: > >Adapt the sysfs TPM command cancel path for the TPM driver that > >does not use a miscdevice anymore since Linux 4.0. Support old > >and new paths. > > > >Signed-off-by: Stefan Berger >

Re: [libvirt] [PATCH 1/3] Allow building lxc without virt-login-shell

2015-11-17 Thread Daniel P. Berrange
On Tue, Nov 17, 2015 at 03:14:50PM +0100, Cédric Bosdonnat wrote: > Add a configure option to disable virt-login-shell build even if lxc is > enabled. > --- > configure.ac | 14 ++ > tools/Makefile.am | 12 ++-- > 2 files changed, 20 insertions(+), 6 deletions(-) ACK >

Re: [libvirt] [PATCH] tpm: adapt sysfs cancel path for new TPM driver

2015-11-17 Thread Stefan Berger
On 11/16/2015 10:12 PM, Stefan Berger wrote: Adapt the sysfs TPM command cancel path for the TPM driver that does not use a miscdevice anymore since Linux 4.0. Support old and new paths. Signed-off-by: Stefan Berger --- src/util/virtpm.c | 21

[libvirt] [PATCH 2/3] virt-aa-helper: don't deny writes to readonly mounts

2015-11-17 Thread Cédric Bosdonnat
There is no need to deny writes on a readonly mount: write still won't be accepted, even if the user remounts the folder as RW in the guest as qemu sets the 9p mount as ro. This deny rule was leading to problems for example with readonly /: The qemu process had to write to a bunch of files in / li

[libvirt] [PATCH 0/3] Misc fixes

2015-11-17 Thread Cédric Bosdonnat
Hi all, Here are a few patches without strong connection together. The first one only allows us not to package virt-login-shell even with lxc driver enabled. The other ones are related to mounts security. I'm wondering if changing the default dropped capabilities in the lxc driver is acceptable..

[libvirt] [PATCH 1/3] Allow building lxc without virt-login-shell

2015-11-17 Thread Cédric Bosdonnat
Add a configure option to disable virt-login-shell build even if lxc is enabled. --- configure.ac | 14 ++ tools/Makefile.am | 12 ++-- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index f481c50..c766351 100644 --- a/configure

[libvirt] storage sheepdog: allow to specify redundancy level

2015-11-17 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 --- docs/schemas/storagevol.rng| 3 ++ src/conf/st

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

2015-11-17 Thread Joao Martins
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 the >> use of `virsh domifstat ` command. >> >> After succesful guest creation

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

2015-11-17 Thread Joao Martins
On 11/17/2015 02:59 AM, Jim Fehlig wrote: > On 11/13/2015 06:14 AM, Joao Martins wrote: >> Introduce support for domainGetCPUStats API call and consequently >> allow us to use `virsh cpu-stats`. The latter returns a more brief >> output than the one provided by`virsh vcpuinfo`. >> >> Signed-off-b

Re: [libvirt] [PATCH] libvirt-guests: Disable shutdown timeout

2015-11-17 Thread Daniel P. Berrange
On Tue, Nov 17, 2015 at 08:43:54AM +0100, Guido Günther wrote: > Since we can't know at service start how many VMs will be running we > can't calculate an apropriate shutdown timeout. So instead of killing > off the service just let it use it's own internal timeout mechanism. > > References: >

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

2015-11-17 Thread Daniel P. Berrange
On Tue, Nov 17, 2015 at 04:00:40PM +0800, Qiaowei Ren wrote: > The series mainly adds Intel CMT feature support into libvirt. CMT is > new introduced PQos (Platform Qos) feature to monitor the usage of > cache by applications running on the platform. > > Currently CMT patches has been merged into

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

2015-11-17 Thread Vasiliy Tolstov
Signed-off-by: Vasiliy Tolstov --- docs/schemas/storagevol.rng| 3 ++ src/conf/storage_conf.c| 2 + src/storage/storage_backend_sheepdog.c | 38 + src/util/virstoragefile.c | 4 +- src/util/virstoragefile.h

Re: [libvirt] [PATCH] bhyve: monitor: do not override domain's privateData

2015-11-17 Thread Roman Bogorodskiy
Daniel P. Berrange wrote: > On Wed, Nov 04, 2015 at 06:08:00PM +0300, Roman Bogorodskiy wrote: > > Current monitor code overrides domain object's privateData, e.g. > > in virBhyveProcessStart(): > > > > vm->privateData = bhyveMonitorOpen(vm, driver); > > > > where bhyveMonitorPtr() returns b

[libvirt] [PATCH 6/8] qemu_driver: add support to perf event

2015-11-17 Thread Qiaowei Ren
This patch implement the internal driver API for perf event into qemu driver. In addition, this patch extend virDomainListGetStats API to get the statistics for perf event. To do so, we add a 'VIR_DOMAIN_STATS_PERF' enum to causes reporting of all previously enabled perf events. Signed-off-by: Qi

[libvirt] [PATCH 2/8] perf: define internal driver API for perf event

2015-11-17 Thread Qiaowei Ren
* src/driver-hypervisor.h (virDrvDomainGetPerfEvents, virDrvDomainSetPerfEvents): New typedefs. Signed-off-by: Qiaowei Ren --- src/driver-hypervisor.h | 12 1 file changed, 12 insertions(+) diff --git a/src/driver-hypervisor.h b/src/driver-hypervisor.h index ae2ec4d..2b72e23 100644

[libvirt] [PATCH 7/8] virsh: extend domstats command

2015-11-17 Thread Qiaowei Ren
This patch extend domstats command to match extended virDomainListGetStats API in previous patch. Signed-off-by: Qiaowei Ren --- tools/virsh-domain-monitor.c | 7 +++ tools/virsh.pod | 7 +-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/tools/virsh-domain-

[libvirt] [PATCH 4/8] perf: implement the remote protocol for perf event

2015-11-17 Thread Qiaowei Ren
Add remote support for perf event. Signed-off-by: Qiaowei Ren --- daemon/remote.c | 60 src/remote/remote_driver.c | 49 src/remote/remote_protocol.x | 32 ++- src/remote_protocol

[libvirt] [PATCH 8/8] virsh: implement new command to support perf

2015-11-17 Thread Qiaowei Ren
This patch add new perf command to enable/disable perf event for a guest domain. For example: $ virsh perf domain --cmt 1 // enable CMT perf event for domain $ virsh perf domain --cmt 0 // disable CMT perf event for domain $ virsh perf domain // list the state (enabled or disabled) of all sup

[libvirt] [PATCH 3/8] perf: implement the public APIs for perf event

2015-11-17 Thread Qiaowei Ren
* src/libvirt-domain.c: Implement virDomainGetPerfEvents and virDomainSetPerfEvents. Signed-off-by: Qiaowei Ren --- src/libvirt-domain.c | 106 +++ 1 file changed, 106 insertions(+) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index de

[libvirt] [PATCH 5/8] perf: implement a set of util functions for perf event

2015-11-17 Thread Qiaowei Ren
This patch implement a set of interfaces for perf event. Based on these interfaces, we can implement internal driver API for perf, and get the results of perf conuter you care about. Signed-off-by: Qiaowei Ren --- include/libvirt/virterror.h | 2 + src/Makefile.am | 1 + src/libv

[libvirt] [PATCH 1/8] perf: add new public APIs for perf event

2015-11-17 Thread Qiaowei Ren
API agreed on in https://www.redhat.com/archives/libvir-list/2015-October/msg00872.html * include/libvirt/libvirt-domain.h (virDomainGetPerfEvents, virDomainSetPerfEvents): New declarations. * src/libvirt_public.syms: Export new symbols. Signed-off-by: Qiaowei Ren --- include/libvirt/libvirt-do

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

2015-11-17 Thread Qiaowei Ren
The series mainly adds Intel CMT feature support into libvirt. CMT is new introduced PQos (Platform Qos) feature to monitor the usage of cache by applications running on the platform. Currently CMT patches has been merged into Linux kernel mainline. The CMT implementation in Linux kernel is based