Re: [libvirt] [PATCH] rpc: fixing compilation error due to deprecated ssh_get_publickey().

2018-05-04 Thread Eric Blake
On 05/04/2018 04:01 PM, Julio Faracco wrote: IMHO: - The first approach is simple to remove in the future. No, both approaches are equally easy to trim down in the future (true, the second approach leaves a temporary variable that could possibly be deleted, but it's not a prerequisite to remo

Re: [libvirt] [PATCH] rpc: fixing compilation error due to deprecated ssh_get_publickey().

2018-05-04 Thread Julio Faracco
IMHO: - The first approach is simple to remove in the future. - The second one is easy to read and understand. -- Julio Cesar Faracco 2018-05-04 16:10 GMT-03:00 Jiri Denemark : > On Tue, May 01, 2018 at 13:21:15 -0300, Julio Faracco wrote: >> After 0.7.5 release, libssh deprecated ssh_get_publick

[libvirt] [PATCH v3 07/14] util: Extend virtpm.c with tpm-emulator support

2018-05-04 Thread Stefan Berger
Add functions for managing the storage of the external swtpm as well as starting and stopping it. Also implement functions to use swtpm_setup, which simulates the manufacturing of a TPM which includes creation of certificates for the device. Signed-off-by: Stefan Berger --- src/libvirt_private.s

[libvirt] [PATCH v3 05/14] util: Implement virFileChownFiles()

2018-05-04 Thread Stefan Berger
Implement virFileChownFiles() which changes file ownership of all files in a given directory. Signed-off-by: Stefan Berger --- src/libvirt_private.syms | 1 + src/util/virfile.c | 49 src/util/virfile.h | 3 +++ 3 files changed, 53 i

[libvirt] [PATCH v3 14/14] qemu: Add swtpm to emulator cgroup

2018-05-04 Thread Stefan Berger
Add the external swtpm to the emulator cgroup so that upper limits of CPU usage can be enforced on the emulated TPM. To enable this we need to have the swtpm write its process id (pid) into a file. We then read it from the file to configure the emulator cgroup. The PID file is created in /var/run

[libvirt] [PATCH v3 02/14] util: Implement virStringFilterLines()

2018-05-04 Thread Stefan Berger
Implement virStringFilterLines() that takes as an input a buffer with text and extracts each line that contains a given needle. The size of each re- turned line can be restricted and if it is restricted '...' will automa- tically be appended. Signed-off-by: Stefan Berger --- src/util/virstring.c

[libvirt] [PATCH v3 06/14] security: Add DAC and SELinux security for tpm-emulator

2018-05-04 Thread Stefan Berger
Extend the DAC and SELinux modules with support for the tpm-emulator. Signed-off-by: Stefan Berger --- src/security/security_dac.c | 4 src/security/security_selinux.c | 5 + 2 files changed, 9 insertions(+) diff --git a/src/security/security_dac.c b/src/security/security_dac.c ind

[libvirt] [PATCH v3 00/14] Add support for TPM emulator

2018-05-04 Thread Stefan Berger
This series of patches adds support for the TPM emulator backend that is available in QEMU and based on swtpm + libtpms. It allows to attach a TPM 1.2 or 2 to a QEMU VM. sVirt labels are used for labeling the swtpm process, its Unix socket, and log file with the same label that the QEMU process get

[libvirt] [PATCH v3 11/14] tests: Add test cases for external swtpm TPM emulator

2018-05-04 Thread Stefan Berger
This patch adds extensions to existing test cases and specific test cases for the tpm-emulator. Signed-off-by: Stefan Berger --- tests/qemuxml2argvdata/tpm-emulator.args | 27 +++ tests/qemuxml2argvtest.c | 15 +++ 2 files changed, 42 insertion

[libvirt] [PATCH v3 10/14] qemu: Add support for external swtpm TPM emulator

2018-05-04 Thread Stefan Berger
This patch adds support for an external swtpm TPM emulator. The XML for this type of TPM looks as follows: The XML will currently only start a TPM 1.2. Upon first start, libvirt will run `swtpm_setup`, which will simulate the manufacturing of a TPM and create certificates for it and writ

[libvirt] [PATCH v3 08/14] qemu: Extend qemu_conf with tpm-emulator support

2018-05-04 Thread Stefan Berger
Extend qemu_conf with user and group for running the tpm-emulator and add directories to the configuration for the locations of the log, state, and socket of the tpm-emulator. Signed-off-by: Stefan Berger --- src/qemu/libvirtd_qemu.aug | 5 + src/qemu/qemu.conf | 8

[libvirt] [PATCH v3 03/14] conf: Add support for external swtpm TPM emulator to domain XML

2018-05-04 Thread Stefan Berger
This patch adds support for an external swtpm TPM emulator. The XML for this type of TPM looks as follows: The XML will currently only define a TPM 1.2. Extend the documentation. Add a test case testing the XML parser and formatter. Signed-off-by: Stefan Berger --- docs/formatdomain.

[libvirt] [PATCH v3 13/14] tpm: Add support for choosing emulation of a TPM 2

2018-05-04 Thread Stefan Berger
This patch extends the TPM's device XML with TPM 2 support. This only works for the emulator type backend and looks as follows: The swtpm process now has --tpm2 as an additional parameter: system_u:system_r:svirt_t:s0:c597,c632 tss 18477 11.8 0.0 28364 3868 ? Rs 11:1

[libvirt] [PATCH v3 09/14] qemu: Implement a layer for external devices like tpm-emulator

2018-05-04 Thread Stefan Berger
Implement a layer for starting and stopping of external devices. The tpm-emulator is the only user of this layer. Signed-off-by: Stefan Berger --- src/qemu/Makefile.inc.am | 2 + src/qemu/qemu_extdevice.c | 300 ++ src/qemu/qemu_extdevice.h | 43 ++

[libvirt] [PATCH v3 12/14] security: Label the external swtpm with SELinux labels

2018-05-04 Thread Stefan Berger
In this patch we label the swtpm process with SELinux labels. We give it the same label as the QEMU process has. We label its state directory and files as well. The file and process labels now look as follows: Directory: /var/lib/libvirt/swtpm [root@localhost swtpm]# ls -lZ total 4 rwx--. 2

[libvirt] [PATCH v3 01/14] util: implement virFileReadOffsetQuiet()

2018-05-04 Thread Stefan Berger
Implement virFileReadOffsetQuiet() that reads a given maximum number of bytes into a buffer that will be allocated. The reading starts from a given offset. Signed-off-by: Stefan Berger --- src/libvirt_private.syms | 1 + src/util/virfile.c | 14 +- src/util/virfile.h |

[libvirt] [PATCH v3 04/14] qemu: Extend QEMU capabilities with 'tpm-emulator'

2018-05-04 Thread Stefan Berger
Extend the QEMU capabilities with tpm-emulator support. Signed-off-by: Stefan Berger --- src/qemu/qemu_capabilities.c | 5 + src/qemu/qemu_capabilities.h | 1 + tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml | 1 + tests/qemucapabilitiesdata/ca

Re: [libvirt] [PATCH] rpc: fixing compilation error due to deprecated ssh_get_publickey().

2018-05-04 Thread Jiri Denemark
On Tue, May 01, 2018 at 13:21:15 -0300, Julio Faracco wrote: > After 0.7.5 release, libssh deprecated ssh_get_publickey() method to > introduce ssh_get_server_publickey(). This commit check the current > version of libssh and use the proper method during the compilation. > See the error: > > make[

Re: [libvirt] ZFS backend does fail if used on non top level pools

2018-05-04 Thread John Ferlan
On 05/02/2018 03:36 AM, Christian Ehrhardt wrote: > Hi, > by discussing on bug [1] we found an issue in the ZFS storage backend. > When one defines a zfs pool through XML (virsh pool-create --build) a > top level ZFS pool will be created and works fine. The virsh > pool-define-as counterpart to t

Re: [libvirt] Expose vfio device display/migration to libvirt and above, was Re: [PATCH 0/3] sample: vfio mdev display devices.

2018-05-04 Thread Alex Williamson
On Fri, 4 May 2018 10:16:09 +0100 Daniel P. Berrangé wrote: > On Thu, May 03, 2018 at 12:58:00PM -0600, Alex Williamson wrote: > > Hi, > > > > The previous discussion hasn't produced results, so let's start over. > > Here's the situation: > > > > - We currently have kernel and QEMU support for

Re: [libvirt] [PATCH] rpc: fixing compilation error due to deprecated ssh_get_publickey().

2018-05-04 Thread Daniel P . Berrangé
On Fri, May 04, 2018 at 12:53:14PM -0400, John Ferlan wrote: > > > On 05/01/2018 12:21 PM, Julio Faracco wrote: > > After 0.7.5 release, libssh deprecated ssh_get_publickey() method to > > introduce ssh_get_server_publickey(). This commit check the current > > version of libssh and use the proper

Re: [libvirt] [PATCH] rpc: fixing compilation error due to deprecated ssh_get_publickey().

2018-05-04 Thread John Ferlan
On 05/01/2018 12:21 PM, Julio Faracco wrote: > After 0.7.5 release, libssh deprecated ssh_get_publickey() method to > introduce ssh_get_server_publickey(). This commit check the current > version of libssh and use the proper method during the compilation. > See the error: > > make[3]: Entering d

Re: [libvirt] [PATCH 5/5] Deprecate QEMU_CAPS_NESTING

2018-05-04 Thread John Ferlan
On 05/03/2018 06:35 AM, Ján Tomko wrote: > Unused since commit . > > Signed-off-by: Ján Tomko > --- > src/qemu/qemu_capabilities.h | 2 +- > src/qemu/qemu_command.c | 3 --- > 2 files changed, 1 insertion(+), 4 deletions(-) > > diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_ca

Re: [libvirt] [PATCH 4/5] Depreacte QEMU_CAPS_TDF

2018-05-04 Thread John Ferlan
$subj: Deprecate On 05/03/2018 06:35 AM, Ján Tomko wrote: > This capability is unused since we stopped parsing -help output. > > Signed-off-by: Ján Tomko > --- > src/qemu/qemu_capabilities.h | 2 +- > src/qemu/qemu_command.c | 5 + > 2 files changed, 2 insertions(+), 5 deletions(-)

Re: [libvirt] [PATCH 0/5] Another batch of old capability cleanups

2018-05-04 Thread John Ferlan
On 05/03/2018 06:35 AM, Ján Tomko wrote: > Ján Tomko (5): > qemu: remove qemuBuildObsoleteAccelArg > qemuBuildMachineCommandLine: use a switch for virDomainVirtType > Deprecate QEMU_CAPS_NO_KVM_PIT > Depreacte QEMU_CAPS_TDF > Deprecate QEMU_CAPS_NESTING > > src/qemu/qemu_capabilities.

Re: [libvirt] Expose vfio device display/migration to libvirt and above, was Re: [PATCH 0/3] sample: vfio mdev display devices.

2018-05-04 Thread Alex Williamson
On Fri, 4 May 2018 09:49:44 +0200 Erik Skultety wrote: > On Thu, May 03, 2018 at 12:58:00PM -0600, Alex Williamson wrote: > > Hi, > > > > The previous discussion hasn't produced results, so let's start over. > > Here's the situation: > > > > - We currently have kernel and QEMU support for the QE

Re: [libvirt] [PATCH] lxc: convert to typesafe virConf accessors in lxc_native.c

2018-05-04 Thread Cedric Bosdonnat
On Fri, 2018-05-04 at 18:46 +0530, Prafull wrote: > From: Prafullkumar Tale > > Signed-off-by: Prafullkumar Tale > --- > src/lxc/lxc_native.c | 141 > +-- > 1 file changed, 70 insertions(+), 71 deletions(-) > > diff --git a/src/lxc/lxc_native.c

Re: [libvirt] [PATCH 0/8] vfio-ccw passthrough support

2018-05-04 Thread John Ferlan
On 04/26/2018 03:59 AM, Bjoern Walk wrote: > Shalini Chellathurai Saroja [2018-04-11, 05:49PM > +0200]: >> Let us support the basic channel I/O passthrough infrastructure based on >> vfio, which have been introduced in QEMU 2.10. The current focus is to >> support dasd-eckd (cu_type/dev_type =

Re: [libvirt] [PATCH REBASE 5/5] qemu: fix races in beingDestroyed usage

2018-05-04 Thread John Ferlan
On 05/03/2018 05:26 AM, Nikolay Shirokovskiy wrote: > > > On 01.05.2018 01:03, John Ferlan wrote: >> >> >> On 04/18/2018 10:44 AM, Nikolay Shirokovskiy wrote: >>> Clearing beingDestroyed right after acquiring job condition is racy. >>> It is not known when EOF will be delivired. Let's keep this

Re: [libvirt] [PATCH REBASE 4/5] qemu: fix domain object wait to handle monitor errors

2018-05-04 Thread John Ferlan
On 05/03/2018 03:54 AM, Nikolay Shirokovskiy wrote: > > > On 01.05.2018 01:03, John Ferlan wrote: >> >> >> On 04/18/2018 10:44 AM, Nikolay Shirokovskiy wrote: >>> Block job abort operation can not handle properly qemu crashes >>> when waiting for abort/pivot completion. Deadlock scenario is nex

Re: [libvirt] [dbus PATCH] Add detail argument to DomainEvent signal

2018-05-04 Thread Pavel Hrdina
On Fri, May 04, 2018 at 11:45:59AM +0200, Katerina Koukiou wrote: > Adjust all DomainEvent tests to do detail type checking. > > Signed-off-by: Katerina Koukiou > --- > This commit is rebased on top of unmerged patches for removing enum<->string > translation. > > data/org.libvirt.Connect.xml |

Re: [libvirt] [dbus PATCH v2 9/9] Remove reason to string translation in virtDBusEventsDomainDiskChange

2018-05-04 Thread Pavel Hrdina
On Fri, May 04, 2018 at 10:38:35AM +0200, Katerina Koukiou wrote: > Signed-off-by: Katerina Koukiou > --- > data/org.libvirt.Domain.xml | 2 +- > src/events.c| 17 ++--- > 2 files changed, 3 insertions(+), 16 deletions(-) Reviewed-by: Pavel Hrdina signature.asc De

Re: [libvirt] [dbus PATCH v2 8/9] Remove state to string translation in virtDBusDomainGetState

2018-05-04 Thread Pavel Hrdina
On Fri, May 04, 2018 at 10:38:34AM +0200, Katerina Koukiou wrote: > Adjust tests to comply with the new type. > > Signed-off-by: Katerina Koukiou > --- > data/org.libvirt.Domain.xml | 2 +- > src/domain.c| 31 +-- > tests/libvirttest.py| 12 ++

Re: [libvirt] [dbus PATCH v2 7/9] Remove reason to string translation in virtDBusEventsDomainTrayChange

2018-05-04 Thread Pavel Hrdina
On Fri, May 04, 2018 at 10:38:33AM +0200, Katerina Koukiou wrote: > Signed-off-by: Katerina Koukiou > --- > data/org.libvirt.Domain.xml | 2 +- > src/events.c| 15 +-- > 2 files changed, 2 insertions(+), 15 deletions(-) Reviewed-by: Pavel Hrdina signature.asc Desc

Re: [libvirt] [dbus PATCH v2 6/9] Remove virtDBusUtilEnum{From, From}String functions

2018-05-04 Thread Pavel Hrdina
On Fri, May 04, 2018 at 10:38:32AM +0200, Katerina Koukiou wrote: > Signed-off-by: Katerina Koukiou > --- > src/util.c | 27 --- > src/util.h | 28 > 2 files changed, 55 deletions(-) Reviewed-by: Pavel Hrdina signature.asc Description: PGP

[libvirt] [tck PATCH v2 0/3] Remove Test::AutoBuild leftovers

2018-05-04 Thread Andrea Bolognani
Changes from [v1]: * rename the script instead of dropping it; * perform some further clean ups. [v1] https://www.redhat.com/archives/libvir-list/2018-May/msg00218.html Andrea Bolognani (3): maint: Rename autobuild.sh to prepare-release.sh prepare-release: Drop references to Test::AutoBuil

[libvirt] [tck PATCH v2 1/3] maint: Rename autobuild.sh to prepare-release.sh

2018-05-04 Thread Andrea Bolognani
The script was originally used by the Test::AutoBuild project to perform periodic automatic builds; however, that effort has been abandoned a long time ago, and these days libvirt-tck CI builds are happening on the Jenkins-based CentOS CI environment under the libvirt umbrella[1], where build recip

Re: [libvirt] [dbus PATCH v2 5/9] Change NetworkEvent argument from string to unsigned int

2018-05-04 Thread Pavel Hrdina
On Fri, May 04, 2018 at 10:38:31AM +0200, Katerina Koukiou wrote: > Modify the relevant tests to comply with the new signal. > > Note: argument matching in connect_to_signal method is > only usable with string and thus had to be refactored. > > Signed-off-by: Katerina Koukiou > --- > data/org.l

[libvirt] [tck PATCH v2 3/3] spec: Drop %{extra_release}

2018-05-04 Thread Andrea Bolognani
It was mainly meant to be used for automatic builds through Test::AutoBuild, so it can be removed now. Signed-off-by: Andrea Bolognani --- perl-Sys-Virt-TCK.spec.PL | 3 +-- prepare-release.sh| 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/perl-Sys-Virt-TCK.spec.

[libvirt] [tck PATCH v2 2/3] prepare-release: Drop references to Test::AutoBuild

2018-05-04 Thread Andrea Bolognani
They are misleading, and no longer relevant anyway. Signed-off-by: Andrea Bolognani --- prepare-release.sh | 15 +++ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/prepare-release.sh b/prepare-release.sh index 005993d..7282123 100755 --- a/prepare-release.sh +++ b/pre

Re: [libvirt] [dbus PATCH v2 1/9] Abandon usage of all *TypeToString functions in domain.c

2018-05-04 Thread Pavel Hrdina
On Fri, May 04, 2018 at 10:38:27AM +0200, Katerina Koukiou wrote: > Converting ENUMS to str can be user friendly though > it can be problematic in matters of backward compatibility. > > In particular when some ENUM in libvirt API will introduce a > new constant, libvirt-dbus will fail with: > > s

Re: [libvirt] [dbus PATCH v2 3/9] Abandon usage of all *TypeToString functions in network.c

2018-05-04 Thread Pavel Hrdina
On Fri, May 04, 2018 at 10:38:29AM +0200, Katerina Koukiou wrote: > Converting ENUMS to str can be user friendly though > it can be problematic in matters of backward compatibility. > > In particular when some ENUM in libvirt API will introduce a > new constant, libvirt-dbus will fail with: > > s

Re: [libvirt] [dbus PATCH v2 4/9] Change DomainEvent argument from string to unsigned int

2018-05-04 Thread Pavel Hrdina
On Fri, May 04, 2018 at 10:38:30AM +0200, Katerina Koukiou wrote: > Modify the relevant tests to comply with the new signal. > > Note: argument matching in connect_to_signal method is > only usable with string and thus had to be refactored. > > Signed-off-by: Katerina Koukiou > --- > data/org.l

Re: [libvirt] [dbus PATCH v2 2/9] Abandon usage of all *TypeToString functions in connect.c

2018-05-04 Thread Pavel Hrdina
On Fri, May 04, 2018 at 10:38:28AM +0200, Katerina Koukiou wrote: > Converting ENUMS to str can be user friendly though > it can be problematic in matters of backward compatibility. > > In particular when some ENUM in libvirt API will introduce a > new constant, libvirt-dbus will fail with: > > s

Re: [libvirt] [PATCH REBASE 3/5] utils: export virCopyError

2018-05-04 Thread John Ferlan
On 05/03/2018 03:39 AM, Nikolay Shirokovskiy wrote: > > > On 01.05.2018 01:03, John Ferlan wrote: >> >> >> On 04/18/2018 10:44 AM, Nikolay Shirokovskiy wrote: >>> Signed-off-by: Nikolay Shirokovskiy >>> --- >>> src/libvirt_private.syms | 1 + >>> src/util/virerror.c | 12 +--- >>

Re: [libvirt] [perl PATCH] spec: Drop %{extra_release}

2018-05-04 Thread Daniel P . Berrangé
On Fri, May 04, 2018 at 03:50:57PM +0200, Andrea Bolognani wrote: > It was mainly meant to be used for automatic builds through > Test::AutoBuild, so it can be removed now. > > Signed-off-by: Andrea Bolognani > --- > perl-Sys-Virt.spec.PL | 2 +- > prepare-release.sh| 4 +--- > 2 files chang

[libvirt] [perl PATCH] spec: Drop %{extra_release}

2018-05-04 Thread Andrea Bolognani
It was mainly meant to be used for automatic builds through Test::AutoBuild, so it can be removed now. Signed-off-by: Andrea Bolognani --- perl-Sys-Virt.spec.PL | 2 +- prepare-release.sh| 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/perl-Sys-Virt.spec.PL b/perl-Sys

Re: [libvirt] [PATCH REBASE 2/5] qemu: monitor: set error flag even in OOM conditions

2018-05-04 Thread John Ferlan
On 05/03/2018 03:35 AM, Nikolay Shirokovskiy wrote: > > > On 01.05.2018 01:03, John Ferlan wrote: >> >> >> On 04/18/2018 10:44 AM, Nikolay Shirokovskiy wrote: >>> lastError.code is used as flag in qemu monitor. Unfortunately >>> due to temporary OOM conditions (very unlikely through as thread l

Re: [libvirt] [perl PATCH v2 2/3] prepare-release: Drop references to Test::AutoBuild

2018-05-04 Thread Daniel P . Berrangé
On Fri, May 04, 2018 at 03:37:50PM +0200, Andrea Bolognani wrote: > On Fri, 2018-05-04 at 14:20 +0100, Daniel P. Berrangé wrote: > > On Fri, May 04, 2018 at 03:14:04PM +0200, Andrea Bolognani wrote: > > > On Fri, 2018-05-04 at 13:38 +0100, Daniel P. Berrangé wrote: > > > > We can actually chop the

Re: [libvirt] [perl PATCH v2 2/3] prepare-release: Drop references to Test::AutoBuild

2018-05-04 Thread Andrea Bolognani
On Fri, 2018-05-04 at 14:20 +0100, Daniel P. Berrangé wrote: > On Fri, May 04, 2018 at 03:14:04PM +0200, Andrea Bolognani wrote: > > On Fri, 2018-05-04 at 13:38 +0100, Daniel P. Berrangé wrote: > > > We can actually chop the 'extra_release' bit out of the RPM spec > > > entirely, as it is only usef

Re: [libvirt] [perl PATCH v2 2/3] prepare-release: Drop references to Test::AutoBuild

2018-05-04 Thread Daniel P . Berrangé
On Fri, May 04, 2018 at 03:14:04PM +0200, Andrea Bolognani wrote: > On Fri, 2018-05-04 at 13:38 +0100, Daniel P. Berrangé wrote: > > On Fri, May 04, 2018 at 02:20:25PM +0200, Andrea Bolognani wrote: > [...] > > > if [ -f /usr/bin/rpmbuild ]; then > > > - if [ -n "$AUTOBUILD_COUNTER" ]; then > > >

[libvirt] [PATCH] lxc: convert to typesafe virConf accessors in lxc_native.c

2018-05-04 Thread Prafull
From: Prafullkumar Tale Signed-off-by: Prafullkumar Tale --- src/lxc/lxc_native.c | 141 +-- 1 file changed, 70 insertions(+), 71 deletions(-) diff --git a/src/lxc/lxc_native.c b/src/lxc/lxc_native.c index 55ea774..35077e1 100644 --- a/src/lxc/lx

Re: [libvirt] [perl PATCH v2 2/3] prepare-release: Drop references to Test::AutoBuild

2018-05-04 Thread Andrea Bolognani
On Fri, 2018-05-04 at 13:38 +0100, Daniel P. Berrangé wrote: > On Fri, May 04, 2018 at 02:20:25PM +0200, Andrea Bolognani wrote: [...] > > if [ -f /usr/bin/rpmbuild ]; then > > - if [ -n "$AUTOBUILD_COUNTER" ]; then > > -EXTRA_RELEASE=".auto$AUTOBUILD_COUNTER" > > - else > > -NOW=`date +

Re: [libvirt] [PATCH 2/2] all: replacing virGetLastError with virHas/GetLastErrorCode/Domain

2018-05-04 Thread Erik Skultety
On Fri, May 04, 2018 at 04:46:48AM +0100, ramyelkest wrote: > Many places in the code call virGetLastError() just to check the > raised error code, or domain. However virGetLastError() can return > NULL, so the code has to check for that as well. > > So Instead we create functions virGetLastErrorCo

[libvirt] [jenkins-ci PATCH] guests: Update vault

2018-05-04 Thread Pavel Hrdina
Renaming node in Jenkins changes the secret as well so we cannot reuse the same secret as for the old node. This updates the libvirt-fedora-28 secret to correct one. Signed-off-by: Pavel Hrdina --- Pushed under trivial rule. guests/vars/vault.yml | 90 +

Re: [libvirt] [PATCH] Qemu driver: Support network-backed pflash disks.

2018-05-04 Thread John Ferlan
On 05/02/2018 01:24 PM, Prerna wrote: > > > On Sat, Apr 28, 2018 at 1:11 AM, John Ferlan > wrote: > > > [...] >   > > This will need a v2 anyway because the patch has too much going on and > needs to be split up more. > > > Will do. I should have prop

Re: [libvirt] [perl PATCH v2 3/3] prepare-release: Drop references to Debian packages

2018-05-04 Thread Daniel P . Berrangé
On Fri, May 04, 2018 at 02:20:26PM +0200, Andrea Bolognani wrote: > The Debian packaging was never included in the git repository > to begin with. > > Signed-off-by: Andrea Bolognani > --- > prepare-release.sh | 8 > 1 file changed, 8 deletions(-) Reviewed-by: Daniel P. Berrangé Reg

Re: [libvirt] [perl PATCH v2 1/3] maint: Rename autobuild.sh to prepare-release.sh

2018-05-04 Thread Daniel P . Berrangé
On Fri, May 04, 2018 at 02:20:24PM +0200, Andrea Bolognani wrote: > The script was originally used by the Test::AutoBuild > project to perform periodic automatic builds; however, that > effort has been abandoned a long time ago, and these days > libvirt-perl CI builds are happening on the Jenkins-b

Re: [libvirt] [perl PATCH v2 2/3] prepare-release: Drop references to Test::AutoBuild

2018-05-04 Thread Daniel P . Berrangé
On Fri, May 04, 2018 at 02:20:25PM +0200, Andrea Bolognani wrote: > They are no longer relevant and misleading. > > Signed-off-by: Andrea Bolognani > --- > prepare-release.sh | 14 +++--- > 1 file changed, 3 insertions(+), 11 deletions(-) > > diff --git a/prepare-release.sh b/prepare-re

Re: [libvirt] [dbus PATCH v2 0/2] improve annotation of properties

2018-05-04 Thread Katerina Koukiou
On Fri, 2018-05-04 at 14:28 +0200, Pavel Hrdina wrote: > Pavel Hrdina (2): > Change the default annotation for emitting changed properties to > false > Annotate properties that will never change during the object > lifecycle > > data/org.libvirt.Connect.xml | 3 +++ > data/org.libvirt.Domain.

[libvirt] [dbus PATCH v2 0/2] improve annotation of properties

2018-05-04 Thread Pavel Hrdina
Pavel Hrdina (2): Change the default annotation for emitting changed properties to false Annotate properties that will never change during the object lifecycle data/org.libvirt.Connect.xml | 3 +++ data/org.libvirt.Domain.xml | 2 ++ data/org.libvirt.Network.xml | 3 +++ 3 files changed, 8 i

[libvirt] [dbus PATCH v2 2/2] Annotate properties that will never change during the object lifecycle

2018-05-04 Thread Pavel Hrdina
These can be annotated as 'const' properties because they will never change. Reviewed-by: Katerina Koukiou Signed-off-by: Pavel Hrdina --- data/org.libvirt.Connect.xml | 2 ++ data/org.libvirt.Domain.xml | 1 + data/org.libvirt.Network.xml | 2 ++ 3 files changed, 5 insertions(+) diff --git a

[libvirt] [dbus PATCH v2 1/2] Change the default annotation for emitting changed properties to false

2018-05-04 Thread Pavel Hrdina
For some of these properties there is no libvirt event to detect the change. For some of the remaining properties we could somehow detect the change but it would be a lot of code for nothing and it can be added later if someone asks for that. We could change the properties to methods but with the

[libvirt] [perl PATCH v2 3/3] prepare-release: Drop references to Debian packages

2018-05-04 Thread Andrea Bolognani
The Debian packaging was never included in the git repository to begin with. Signed-off-by: Andrea Bolognani --- prepare-release.sh | 8 1 file changed, 8 deletions(-) diff --git a/prepare-release.sh b/prepare-release.sh index 22f9155..9de67fe 100755 --- a/prepare-release.sh +++ b/prep

[libvirt] [perl PATCH v2 2/3] prepare-release: Drop references to Test::AutoBuild

2018-05-04 Thread Andrea Bolognani
They are no longer relevant and misleading. Signed-off-by: Andrea Bolognani --- prepare-release.sh | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/prepare-release.sh b/prepare-release.sh index 8a6d102..22f9155 100755 --- a/prepare-release.sh +++ b/prepare-rele

[libvirt] [perl PATCH v2 1/3] maint: Rename autobuild.sh to prepare-release.sh

2018-05-04 Thread Andrea Bolognani
The script was originally used by the Test::AutoBuild project to perform periodic automatic builds; however, that effort has been abandoned a long time ago, and these days libvirt-perl CI builds are happening on the Jenkins-based CentOS CI environment under the libvirt umbrella[1], where build reci

[libvirt] [perl PATCH v2 0/3] maint: Rename autobuild.sh to prepare-release.sh

2018-05-04 Thread Andrea Bolognani
Changes from [v1]: * rename the script instead of dropping it; * perform some further clean ups. [v1] https://www.redhat.com/archives/libvir-list/2018-May/msg00221.html Andrea Bolognani (3): maint: Rename autobuild.sh to prepare-release.sh prepare-release: Drop references to Test::AutoBuil

Re: [libvirt] [PATCH 1/2] util: adding virHasLastError and virGetLastErrorCode/Domain

2018-05-04 Thread Erik Skultety
On Fri, May 04, 2018 at 04:46:47AM +0100, ramyelkest wrote: > Many places in the code call virGetLastError() just to check the > raised error code, or domain. However virGetLastError() can return > NULL, so the code has to check for that as well. s/as well/first. > > So Instead we create function

Re: [libvirt] [PATCH 0/7] Couple of tiny fixes for virsh and translation.

2018-05-04 Thread Peter Krempa
On Fri, May 04, 2018 at 17:28:47 +0800, Lin Ma wrote: > Lin Ma (7): > virsh: Error out while domain not found for 'qemu-monitor-event' > command > virsh: Error out while domain not found for 'event' command > po: fix typo: remove a redundant Chinese character > virsh: Simplify control f

Re: [libvirt] [dbus PATCH 3/4] Annotate properties for which we will not emit changed signal

2018-05-04 Thread Pavel Hrdina
On Thu, May 03, 2018 at 03:21:01PM +0200, Katerina Koukiou wrote: > On Thu, 2018-05-03 at 14:46 +0200, Pavel Hrdina wrote: > > For some of these properties there is no libvirt event to detect the > > change and for properties where we could somehow detect the change > > let's annotate them as well.

Re: [libvirt] [dbus PATCH] Implement SetGuestVcpus method for Domain Interface

2018-05-04 Thread Pavel Hrdina
On Wed, May 02, 2018 at 04:51:42PM +0200, Katerina Koukiou wrote: > Signed-off-by: Katerina Koukiou > --- > data/org.libvirt.Domain.xml | 7 + > src/domain.c| 62 > + > 2 files changed, 69 insertions(+) > > diff --git a/data/org.l

Re: [libvirt] [PATCH 09/12] virsh: Enable multiple --event flags to 'event' command

2018-05-04 Thread Peter Krempa
On Fri, May 04, 2018 at 17:25:30 +0800, Lin Ma wrote: > Signed-off-by: Lin Ma > --- > tools/virsh-domain.c | 76 > +++- > 1 file changed, 39 insertions(+), 37 deletions(-) > > diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c > index 89aefb

Re: [libvirt] [PATCH 02/12] virsh: Conditionally Ignore the first entry in list of completions

2018-05-04 Thread Peter Krempa
On Fri, May 04, 2018 at 17:25:23 +0800, Lin Ma wrote: > The first entry in the returned array is the substitution for TEXT. It > causes unnecessary output if other commands or options share the same > prefix, e.g. > > $ virsh des > des desc destroy > > or > > $ virsh domblklist --d > --

Re: [libvirt] [PATCH 03/12] virsh: Create macros for VSH_OT_STRING "domain" option

2018-05-04 Thread Peter Krempa
On Fri, May 04, 2018 at 17:25:24 +0800, Lin Ma wrote: > Signed-off-by: Lin Ma > --- > tools/virsh-domain-monitor.c | 3 +++ > tools/virsh-domain.c | 3 +++ > tools/virsh-snapshot.c | 3 +++ > tools/virsh.h| 8 > 4 files changed, 17 insertions(+) > > diff --

Re: [libvirt] [PATCH 06/12] virsh: Create macros for VSH_OT_ARGV "domain" option

2018-05-04 Thread Peter Krempa
On Fri, May 04, 2018 at 17:25:27 +0800, Lin Ma wrote: > Signed-off-by: Lin Ma > --- > tools/virsh-domain-monitor.c | 3 +++ > tools/virsh-domain.c | 3 +++ > tools/virsh-snapshot.c | 3 +++ > tools/virsh.h| 9 + > 4 files changed, 18 insertions(+) > > diff -

Re: [libvirt] [PATCH 12/12] virsh: Add event name completion to 'event' command

2018-05-04 Thread Peter Krempa
On Fri, May 04, 2018 at 17:25:33 +0800, Lin Ma wrote: > Signed-off-by: Lin Ma > --- > tools/virsh-completer.c | 36 > tools/virsh-completer.h | 3 +++ > tools/virsh-domain.c| 1 + > 3 files changed, 40 insertions(+) > > diff --git a/tools/virsh-complete

Re: [libvirt] [PATCH 11/12] domain_event: Introduce function virDomainEventGetName

2018-05-04 Thread Peter Krempa
On Fri, May 04, 2018 at 17:25:32 +0800, Lin Ma wrote: > It will be used in next patch for event name completion. > > Signed-off-by: Lin Ma > --- > src/conf/domain_event.c | 62 > > src/conf/domain_event.h | 3 +++ > src/libvirt_private.syms |

[libvirt] [dbus PATCH v2] Implement SetGuestVcpus method for Domain Interface

2018-05-04 Thread Katerina Koukiou
Signed-off-by: Katerina Koukiou --- Fixed conditions since v1 was creating incorrect vcpumap. If all vcpus will be passed False the API will not work, since '' is not valid cpumap but this scenario should not be used. data/org.libvirt.Domain.xml | 7 + src/domain.c| 62 +

Re: [libvirt] [PATCH 10/12] virsh: Introduce some VIR_DOMAIN_EVENT_* macros representing domain event names

2018-05-04 Thread Peter Krempa
On Fri, May 04, 2018 at 17:25:31 +0800, Lin Ma wrote: > Signed-off-by: Lin Ma > --- > include/libvirt/libvirt-domain.h | 201 > +++ > tools/virsh-domain.c | 50 +- > 2 files changed, 226 insertions(+), 25 deletions(-) > > diff --git a/inc

Re: [libvirt] [PATCH 7/7] qemu: stats: Display net count, type and source even if domain is inactive

2018-05-04 Thread Peter Krempa
On Fri, May 04, 2018 at 17:28:54 +0800, Lin Ma wrote: > Signed-off-by: Lin Ma > --- > src/qemu/qemu_driver.c | 15 --- > 1 file changed, 8 insertions(+), 7 deletions(-) The network is not enabled so there's no stats to report when the VM is offline so I don't think this is justified.

Re: [libvirt] [PATCH 3/7] po: fix typo: remove a redundant Chinese character

2018-05-04 Thread Daniel P . Berrangé
On Fri, May 04, 2018 at 12:07:39PM +0200, Peter Krempa wrote: > On Fri, May 04, 2018 at 17:28:50 +0800, Lin Ma wrote: > > Signed-off-by: Lin Ma > > --- > > NACK > > This needs to be fixed in Zanata where we pull the translations from > since it would be overwritten by the next sync. To save tim

Re: [libvirt] [PATCH 6/7] qemu: stats: Display the net type and net source in bulk stats

2018-05-04 Thread Peter Krempa
On Fri, May 04, 2018 at 17:28:53 +0800, Lin Ma wrote: > Signed-off-by: Lin Ma > --- Could you justify this? This is really configuration and will not change during the lifetime of the interface, thus there's no pressing need to report it in the stats which should report only data which is changin

Re: [libvirt] [PATCH 3/7] po: fix typo: remove a redundant Chinese character

2018-05-04 Thread Peter Krempa
On Fri, May 04, 2018 at 17:28:50 +0800, Lin Ma wrote: > Signed-off-by: Lin Ma > --- NACK This needs to be fixed in Zanata where we pull the translations from since it would be overwritten by the next sync. signature.asc Description: PGP signature -- libvir-list mailing list libvir-list@redhat.

[libvirt] [dbus PATCH] Add detail argument to DomainEvent signal

2018-05-04 Thread Katerina Koukiou
Adjust all DomainEvent tests to do detail type checking. Signed-off-by: Katerina Koukiou --- This commit is rebased on top of unmerged patches for removing enum<->string translation. data/org.libvirt.Connect.xml | 1 + src/events.c | 4 ++-- tests/libvirttest.py | 55 +

[libvirt] [PATCH 5/7] virsh: Simplify control flow for 'qemu-agent-command' command

2018-05-04 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-domain.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 65170225a7..598d2fa4a4 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -9796,19 +9796,17 @@ cmdQemuAgen

[libvirt] [PATCH 0/7] Couple of tiny fixes for virsh and translation.

2018-05-04 Thread Lin Ma
Lin Ma (7): virsh: Error out while domain not found for 'qemu-monitor-event' command virsh: Error out while domain not found for 'event' command po: fix typo: remove a redundant Chinese character virsh: Simplify control flow for 'desc' command virsh: Simplify control flow for 'qemu-ag

[libvirt] [PATCH 6/7] qemu: stats: Display the net type and net source in bulk stats

2018-05-04 Thread Lin Ma
Signed-off-by: Lin Ma --- src/libvirt-domain.c | 2 ++ src/qemu/qemu_driver.c | 4 tools/virsh.pod| 2 ++ 3 files changed, 8 insertions(+) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index 2d86e48979..e317ca00d0 100644 --- a/src/libvirt-domain.c +++ b/src/libvirt-doma

[libvirt] [PATCH 1/7] virsh: Error out while domain not found for 'qemu-monitor-event' command

2018-05-04 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-domain.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 2b775fc4cc..3b2a34f936 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -9661,7 +9661,9 @@ cmdQemuMonitorEvent(vsh

[libvirt] [PATCH 4/7] virsh: Simplify control flow for 'desc' command

2018-05-04 Thread Lin Ma
Just like the commit 8941c800, It does the similar thing. Signed-off-by: Lin Ma --- tools/virsh-domain.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 1f3ea0c939..65170225a7 100644 --- a/tools/virsh-domain.c ++

[libvirt] [PATCH 2/7] virsh: Error out while domain not found for 'event' command

2018-05-04 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-domain.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 3b2a34f936..1f3ea0c939 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -13445,7 +13445,9 @@ cmdEvent(vshControl *

[libvirt] [PATCH 3/7] po: fix typo: remove a redundant Chinese character

2018-05-04 Thread Lin Ma
Signed-off-by: Lin Ma --- po/zh_CN.mini.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/po/zh_CN.mini.po b/po/zh_CN.mini.po index c5574cf1df..0e47184c93 100644 --- a/po/zh_CN.mini.po +++ b/po/zh_CN.mini.po @@ -15340,7 +15340,7 @@ msgid "entry was missing 'type'" msgstr "条目

[libvirt] [PATCH 7/7] qemu: stats: Display net count, type and source even if domain is inactive

2018-05-04 Thread Lin Ma
Signed-off-by: Lin Ma --- src/qemu/qemu_driver.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 7a9a2bcf97..33ae68129d 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -19804,9 +19804,6 @

[libvirt] [PATCH 09/12] virsh: Enable multiple --event flags to 'event' command

2018-05-04 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-domain.c | 76 +++- 1 file changed, 39 insertions(+), 37 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 89aefbf86a..b35c9adaaa 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-do

[libvirt] [PATCH 12/12] virsh: Add event name completion to 'event' command

2018-05-04 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-completer.c | 36 tools/virsh-completer.h | 3 +++ tools/virsh-domain.c| 1 + 3 files changed, 40 insertions(+) diff --git a/tools/virsh-completer.c b/tools/virsh-completer.c index e3b8234b41..a188a8d7ab 100644 ---

[libvirt] [PATCH 04/12] virsh: Apply macro for current VSH_OT_STRING "domain" options

2018-05-04 Thread Lin Ma
These VSH_OT_STRING "domain" options support domain name completion now. Signed-off-by: Lin Ma --- tools/virsh-domain.c | 18 +- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 8a63761fab..689f9d686b 100644 --- a/to

[libvirt] [PATCH 01/12] virsh: Add domain name completion to 'migrate-postcopy' command

2018-05-04 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-domain.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 2b775fc4cc..6601f94a12 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -11219,11 +11219,7 @@ static const vshCm

[libvirt] [PATCH 11/12] domain_event: Introduce function virDomainEventGetName

2018-05-04 Thread Lin Ma
It will be used in next patch for event name completion. Signed-off-by: Lin Ma --- src/conf/domain_event.c | 62 src/conf/domain_event.h | 3 +++ src/libvirt_private.syms | 1 + 3 files changed, 66 insertions(+) diff --git a/src/conf/domain_e

[libvirt] [PATCH 10/12] virsh: Introduce some VIR_DOMAIN_EVENT_* macros representing domain event names

2018-05-04 Thread Lin Ma
Signed-off-by: Lin Ma --- include/libvirt/libvirt-domain.h | 201 +++ tools/virsh-domain.c | 50 +- 2 files changed, 226 insertions(+), 25 deletions(-) diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h index

[libvirt] [PATCH 08/12] vshReadlineOptionsGenerator: Add already provided VSH_OT_ARGV options to list

2018-05-04 Thread Lin Ma
It's helpful for users while they type certain kind of VSH_OT_ARGV options. e.g. $ virsh domstats --domain sles12sp3 --d Signed-off-by: Lin Ma --- tools/vsh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/vsh.c b/tools/vsh.c index 5a9916cbb0..9cfd4d92b8 100644 --- a/

[libvirt] [PATCH 03/12] virsh: Create macros for VSH_OT_STRING "domain" option

2018-05-04 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-domain-monitor.c | 3 +++ tools/virsh-domain.c | 3 +++ tools/virsh-snapshot.c | 3 +++ tools/virsh.h| 8 4 files changed, 17 insertions(+) diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain-monitor.c index

  1   2   >