Re: [libvirt] Release of libvirt-2.1.0

2016-08-04 Thread Jiri Denemark
On Tue, Aug 02, 2016 at 10:57:17 +0200, Daniel Veillard wrote: >Sorry I didn't push an rc2 on Friday, finishing my move, but not seeing any > issue raised by rc1, I though it was better to push the final release now and > free > up the tree for pending development. As a result 2.1.0 is tagged

[libvirt] Libvirt's DomainGetInfo Function Development

2016-08-04 Thread Aleem Akhtar
I am trying to get stats of Domains running under XEN hypervisor. I used Libvirt function for this purpose. I am trying to understand output for Memory. Domain running is Fedora-22 with 1GB Ram. Here is my code y = virDomainGetInfo(allDomain, ); if (y == -1) printf("Errorl\n"); else {

[libvirt] [PATCH] storage: Don't remove the pool for buildPool failure in storagePoolCreate

2016-08-04 Thread John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1362349 When adding the ability to build the pool during the start pool processing using the similar flags as buildPool processing would use, the code was essentially cut-n-pasted from storagePoolCreateXML. However, that included a call to

[libvirt] [PATCH] tests: Fix broken build

2016-08-04 Thread John Ferlan
Commit id 'f522b7d2' caused a build failure : GEN check-augeas-virtlogd Test failure:test_libvirtd_qemu.aug:69.3-147.28: Expected: { ... { "nvram" { "1" = "/usr/share/OVMF/OVMF_CODE.fd:/usr/share/OVMF/OVMF_VARS.fd" } { "2" =

Re: [libvirt] [PATCH 3/5] Introduce @secure attribute to os loader element

2016-08-04 Thread Pavel Hrdina
On Thu, Aug 04, 2016 at 05:11:11PM +0200, Michal Privoznik wrote: > On 04.08.2016 12:19, Pavel Hrdina wrote: > > On Wed, Jul 27, 2016 at 10:43:50AM +0200, Michal Privoznik wrote: > >> This element will control secure boot implemented by some > >> firmwares. If the firmware used in does support

Re: [libvirt] [PATCH] qemu: fix capability counting

2016-08-04 Thread Andrea Bolognani
On Thu, 2016-08-04 at 17:13 +0200, Boris Fiuczynski wrote: > Signed-off-by: Boris Fiuczynski > --- >  src/qemu/qemu_capabilities.c | 4 ++-- >  src/qemu/qemu_capabilities.h | 2 +- >  2 files changed, 3 insertions(+), 3 deletions(-) >  > diff --git

Re: [libvirt] [PATCH 0/5] Enable secure boot

2016-08-04 Thread Michal Privoznik
On 27.07.2016 10:43, Michal Privoznik wrote: > We have UEFI enabled guests for a while now. But only recently > qemu introduced secure boot. We should reflect that in our code > too. > > Michal Privoznik (5): > qemuBuildMachineCommandLine: Follow our pattern > Introduce SMM feature >

Re: [libvirt] [PATCH RFC 0/8] qemu: allow disabling certain virtio revisions

2016-08-04 Thread Laine Stump
On 08/04/2016 11:11 AM, Andrea Bolognani wrote: On Mon, 2016-08-01 at 10:02 -0400, Laine Stump wrote: 2) To assure that the actual device presented to the guest doesn't change in the future when defaults are changed, we may want to autofill "version" even when none is specified. (We would of

[libvirt] [PATCH v5 4/9] qemu: Add the ability to hotplug the TLS X.509 environment

2016-08-04 Thread John Ferlan
If the incoming XML defined a path to a TLS X.509 certificate environment, add the necessary 'tls-creds-x509' object to the VIR_DOMAIN_CHR_TYPE_TCP character device. Likewise, if the environment exists the hot unplug needs adjustment as well. Note that all the return ret were changed to goto

[libvirt] [PATCH v5 1/9] conf: Add new default TLS X.509 certificate default directory

2016-08-04 Thread John Ferlan
Rather than specify perhaps multiple TLS X.509 certificate directories, let's create a "default" directory which can then be used if the service (e.g. for now vnc and spice) does not supply a default directory. Since the default for vnc and spice may have existed before without being supplied,

[libvirt] [PATCH v5 9/9] qemu: Add the ability to hotplug a secret object for TCP chardev TLS

2016-08-04 Thread John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1300776 Complete the implementation of support for TLS encryption on chardev TCP transports by adding the hotplug ability of a secret to generate the passwordid for the TLS object Likewise, add the ability to hot unplug that secret object as well

[libvirt] [PATCH v5 5/9] conf: Add new secret type "tls"

2016-08-04 Thread John Ferlan
Add a new secret usage type known as "tls" - it will handle adding the secret objects for various TLS objects that need to provide some sort of passphrase in order to access the credentials. The format is: ... ... mumblyfratz Signed-off-by: John Ferlan

[libvirt] [PATCH v5 6/9] conf: Add new secret element for tcp chardev

2016-08-04 Thread John Ferlan
Define, parse, and format a key secret element for a chardev tcp backend. This secret will be used in conjunction with the chartcp_tls_x509_cert_dir in order to provide the secret to the TLS encrypted TCP chardev. Signed-off-by: John Ferlan ---

[libvirt] [PATCH v5 2/9] conf: Introduce chartcp_tls_x509_cert_dir

2016-08-04 Thread John Ferlan
Add a new TLS X.509 certificate type - "chardev". This will handle the creation of a TLS certificate capability (and possibly repository) for properly configured character device TCP backends. Unlike the vnc and spice there is no "listen" or "passwd" associated. The credentials will be handled

[libvirt] [PATCH v5 8/9] qemu: Add a secret object to/for a chardev tcp with secret

2016-08-04 Thread John Ferlan
Add the secret object prior to the chardev tcp so the 'passwordid=' can be added if the domain XML has a for the chardev TLS. Signed-off-by: John Ferlan --- src/qemu/qemu_command.c| 31 - src/qemu/qemu_command.h

[libvirt] [PATCH v5 7/9] qemu: Introduce qemuDomainChardevPrivatePtr

2016-08-04 Thread John Ferlan
Modeled after the qemuDomainHostdevPrivatePtr (commit id '27726d8c'), create a privateData pointer in the _virDomainChardevDef to allow storage of private data for a hypervisor in order to at least temporarily store secret data for usage during qemuBuildCommandLine. NB: Since the

[libvirt] [PATCH v5 3/9] qemu: Add support for TLS X.509 path to TCP chardev backend

2016-08-04 Thread John Ferlan
When building a chardev device string for tcp, add the necessary pieces to access provide the TLS X.509 path to qemu. This includes generating the 'tls-creds-x509' object and then adding the 'tls-creds' parameter to the VIR_DOMAIN_CHR_TYPE_TCP command line. Finally add the tests for the qemu

[libvirt] [PATCH v5 0/9] Add native TLS encrypted chardev TCP support

2016-08-04 Thread John Ferlan
v4: http://www.redhat.com/archives/libvir-list/2016-June/msg01709.html Since I have it on a branch and have been updating, I figured I'd post the most recent stuff. Patches 1-4 were "partially" ACK'd in v2 of this series, but there's been changes to the conf handling upstream. Patch 5 adds a new

Re: [libvirt] [PATCH 1/8] Fix indentation

2016-08-04 Thread Andrea Bolognani
On Fri, 2016-07-29 at 15:37 +0200, Ján Tomko wrote: > --- >  src/conf/domain_conf.c | 2 +- >  1 file changed, 1 insertion(+), 1 deletion(-) >  > diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c > index a56e0f5..4999dea 100644 > --- a/src/conf/domain_conf.c > +++

[libvirt] [PATCH] qemu: fix capability counting

2016-08-04 Thread Boris Fiuczynski
Signed-off-by: Boris Fiuczynski --- src/qemu/qemu_capabilities.c | 4 ++-- src/qemu/qemu_capabilities.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 002fbe3..73d8536 100644 ---

Re: [libvirt] [PATCH RFC 0/8] qemu: allow disabling certain virtio revisions

2016-08-04 Thread Andrea Bolognani
On Mon, 2016-08-01 at 10:02 -0400, Laine Stump wrote: > 2) To assure that the actual device presented to the guest doesn't > change in the future when defaults are changed, we may want to autofill > "version" even when none is specified. (We would of course be stuck with > the unfortunate problem

Re: [libvirt] [PATCH 3/5] Introduce @secure attribute to os loader element

2016-08-04 Thread Michal Privoznik
On 04.08.2016 12:19, Pavel Hrdina wrote: > On Wed, Jul 27, 2016 at 10:43:50AM +0200, Michal Privoznik wrote: >> This element will control secure boot implemented by some >> firmwares. If the firmware used in does support the >> feature we must tell it to the underlying hypervisor. However, we >>

Re: [libvirt] [PATCH 4/5] qemu: Enable secure boot

2016-08-04 Thread Laszlo Ersek
On 08/04/16 16:39, Pavel Hrdina wrote: > On Thu, Aug 04, 2016 at 03:45:39PM +0200, Laszlo Ersek wrote: >> On 08/04/16 15:14, Pavel Hrdina wrote: >>> On Wed, Jul 27, 2016 at 05:11:59PM +0200, Laszlo Ersek wrote: On 07/27/16 10:43, Michal Privoznik wrote: > In qemu, enabling this feature

[libvirt] [PATCH jenkins-ci 06/19] jobs: add a template for Perl Module::Build

2016-08-04 Thread Daniel P. Berrange
Add a template for projects using the Perl Module::Build framework Signed-off-by: Daniel P. Berrange --- jobs/perl-modulebuild.yaml | 104 + 1 file changed, 104 insertions(+) create mode 100644 jobs/perl-modulebuild.yaml diff

[libvirt] [PATCH jenkins-ci 16/19] projects: add the virt-viewer package

2016-08-04 Thread Daniel P. Berrange
Add a project defining the virt-viewer package build jobs Signed-off-by: Daniel P. Berrange --- projects/virt-viewer.yaml | 19 +++ 1 file changed, 19 insertions(+) create mode 100644 projects/virt-viewer.yaml diff --git a/projects/virt-viewer.yaml

[libvirt] [PATCH jenkins-ci 03/19] jobs: add a template for GNU autotools

2016-08-04 Thread Daniel P. Berrange
Add a template for projects using the GNU autotools framework --- jobs/autotools.yaml | 198 1 file changed, 198 insertions(+) create mode 100644 jobs/autotools.yaml diff --git a/jobs/autotools.yaml b/jobs/autotools.yaml new file mode 100644

[libvirt] [PATCH jenkins-ci 19/19] Add README explaining how to use it

2016-08-04 Thread Daniel P. Berrange
--- README | 34 ++ 1 file changed, 34 insertions(+) create mode 100644 README diff --git a/README b/README new file mode 100644 index 000..9871cfc --- /dev/null +++ b/README @@ -0,0 +1,34 @@ +Libvirt Jenkins CI +== + +This package

[libvirt] [PATCH jenkins-ci 00/19] Use jenkins-job-builder for CI

2016-08-04 Thread Daniel P. Berrange
We are using the CentOS Jenkins server for running CI tasks. Currently those tasks are maintained by people manually updating the Jenkins web UI. This is a horrible interface that requires 100's of mouse clicks to achieve even the simplest things. It is also incredibly hard to compare the config

[libvirt] [PATCH jenkins-ci 04/19] jobs: add a template for Python distutils

2016-08-04 Thread Daniel P. Berrange
Add a template for projects using the python distutils framework Signed-off-by: Daniel P. Berrange --- jobs/python-distutils.yaml | 99 ++ 1 file changed, 99 insertions(+) create mode 100644 jobs/python-distutils.yaml diff --git

[libvirt] [PATCH jenkins-ci 13/19] projects: add the osinfo-db-tools package

2016-08-04 Thread Daniel P. Berrange
Add a project defining the osinfo-db-tools package build jobs Signed-off-by: Daniel P. Berrange --- projects/osinfo-db-tools.yaml | 19 +++ 1 file changed, 19 insertions(+) create mode 100644 projects/osinfo-db-tools.yaml diff --git

[libvirt] [PATCH jenkins-ci 02/19] jobs: add a template for generic build process

2016-08-04 Thread Daniel P. Berrange
Add a template for projects which don't fit into any of the special purpose templates. Signed-off-by: Daniel P. Berrange --- jobs/generic.yaml | 124 ++ 1 file changed, 124 insertions(+) create mode 100644

[libvirt] [PATCH jenkins-ci 10/19] projects: add the libvirt-tck package

2016-08-04 Thread Daniel P. Berrange
Add a project defining the libvirt-tck package build jobs Signed-off-by: Daniel P. Berrange --- projects/libvirt-tck.yaml | 16 1 file changed, 16 insertions(+) create mode 100644 projects/libvirt-tck.yaml diff --git a/projects/libvirt-tck.yaml

[libvirt] [PATCH jenkins-ci 07/19] projects: add the libvirt package

2016-08-04 Thread Daniel P. Berrange
Add a project defining the libvirt package build jobs Signed-off-by: Daniel P. Berrange --- projects/libvirt.yaml | 44 1 file changed, 44 insertions(+) create mode 100644 projects/libvirt.yaml diff --git

[libvirt] [PATCH jenkins-ci 09/19] projects: add the libvirt-perl package

2016-08-04 Thread Daniel P. Berrange
Add a project defining the libvirt-perl package build jobs Signed-off-by: Daniel P. Berrange --- projects/libvirt-perl.yaml | 18 ++ 1 file changed, 18 insertions(+) create mode 100644 projects/libvirt-perl.yaml diff --git a/projects/libvirt-perl.yaml

[libvirt] [PATCH jenkins-ci 12/19] projects: add the libvirt-sandbox package

2016-08-04 Thread Daniel P. Berrange
Add a project defining the libvirt-sandbox package build jobs Signed-off-by: Daniel P. Berrange --- projects/libvirt-sandbox.yaml | 19 +++ 1 file changed, 19 insertions(+) create mode 100644 projects/libvirt-sandbox.yaml diff --git

[libvirt] [PATCH jenkins-ci 01/19] jobs: add global default variables

2016-08-04 Thread Daniel P. Berrange
Add some global default variable definitions Signed-off-by: Daniel P. Berrange --- jobs/defaults.yaml | 11 +++ 1 file changed, 11 insertions(+) create mode 100644 jobs/defaults.yaml diff --git a/jobs/defaults.yaml b/jobs/defaults.yaml new file mode 100644 index

[libvirt] [PATCH jenkins-ci 17/19] projects: add the virt-manager package

2016-08-04 Thread Daniel P. Berrange
Add a project defining the virt-manager package build jobs Signed-off-by: Daniel P. Berrange --- projects/virt-manager.yaml | 19 +++ 1 file changed, 19 insertions(+) create mode 100644 projects/virt-manager.yaml diff --git a/projects/virt-manager.yaml

[libvirt] [PATCH jenkins-ci 18/19] projects: add the libosinfo package

2016-08-04 Thread Daniel P. Berrange
Add a project defining the libosinfo package build jobs Signed-off-by: Daniel P. Berrange --- projects/libosinfo.yaml | 20 1 file changed, 20 insertions(+) create mode 100644 projects/libosinfo.yaml diff --git a/projects/libosinfo.yaml

[libvirt] [PATCH jenkins-ci 08/19] projects: add the libvirt-python package

2016-08-04 Thread Daniel P. Berrange
Add a project defining the libvirt-python package build jobs Signed-off-by: Daniel P. Berrange --- projects/libvirt-python.yaml | 18 ++ 1 file changed, 18 insertions(+) create mode 100644 projects/libvirt-python.yaml diff --git

[libvirt] [PATCH jenkins-ci 05/19] jobs: add a template for Perl ExtUtils::MakeMaker

2016-08-04 Thread Daniel P. Berrange
Add a template for projects using the Perl ExtUtils::MakeMaker setup Signed-off-by: Daniel P. Berrange --- jobs/perl-makemaker.yaml | 105 +++ 1 file changed, 105 insertions(+) create mode 100644 jobs/perl-makemaker.yaml diff

[libvirt] [PATCH jenkins-ci 15/19] projects: add the libvirt-cim package

2016-08-04 Thread Daniel P. Berrange
Add a project defining the libvirt-cim package build jobs Signed-off-by: Daniel P. Berrange --- projects/libvirt-cim.yaml | 24 1 file changed, 24 insertions(+) create mode 100644 projects/libvirt-cim.yaml diff --git a/projects/libvirt-cim.yaml

[libvirt] [PATCH jenkins-ci 14/19] projects: add the osinfo-db package

2016-08-04 Thread Daniel P. Berrange
Add a project defining the osinfo-db package build jobs Signed-off-by: Daniel P. Berrange --- projects/osinfo-db.yaml | 24 1 file changed, 24 insertions(+) create mode 100644 projects/osinfo-db.yaml diff --git a/projects/osinfo-db.yaml

[libvirt] [PATCH jenkins-ci 11/19] projects: add the libvirt-glib package

2016-08-04 Thread Daniel P. Berrange
Add a project defining the libvirt-glib package build jobs Signed-off-by: Daniel P. Berrange --- projects/libvirt-glib.yaml | 20 1 file changed, 20 insertions(+) create mode 100644 projects/libvirt-glib.yaml diff --git a/projects/libvirt-glib.yaml

[libvirt] [PATCH] lxcDomainCreateXMLWithFiles: Avoid crash

2016-08-04 Thread Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=1363773 Imagine that you're creating a transient domain, but for some reason, starting it fails. That is virLXCProcessStart() returns an error. With current code, in the error handling code the domain object is removed from the domain object list, @vm

Re: [libvirt] [PATCH 8/9] qemu: domain: Reflect USB controller model in guest XML

2016-08-04 Thread Andrea Bolognani
On Thu, 2016-08-04 at 14:32 +0200, Ján Tomko wrote: > > +} else if (cont->type == VIR_DOMAIN_CONTROLLER_TYPE_USB && > > +   cont->model == -1) { > > +/* Pick a suitable default model for the USB controller if none > > + * has been selected by the

Re: [libvirt] [PATCH] rpm: set TLS priority to @LIBVIRT, SYSTEM on Fedora >= 25

2016-08-04 Thread Cole Robinson
On 08/04/2016 03:57 AM, Daniel P. Berrange wrote: > With newest gnutls available in Fedora 25/rawhide, it is > possible to have TLS priority fallbacks, so we can finally > use --tls-priority=@LIBVIRT,SYSTEM > > Signed-off-by: Daniel P. Berrange > --- > libvirt.spec.in | 10

Re: [libvirt] [PATCH 4/5] qemu: Enable secure boot

2016-08-04 Thread Pavel Hrdina
On Thu, Aug 04, 2016 at 03:45:39PM +0200, Laszlo Ersek wrote: > On 08/04/16 15:14, Pavel Hrdina wrote: > > On Wed, Jul 27, 2016 at 05:11:59PM +0200, Laszlo Ersek wrote: > >> On 07/27/16 10:43, Michal Privoznik wrote: > >>> In qemu, enabling this feature boils down to adding the following > >>>

Re: [libvirt] [PATCH 4/5] qemu: Enable secure boot

2016-08-04 Thread Laszlo Ersek
On 08/04/16 15:14, Pavel Hrdina wrote: > On Wed, Jul 27, 2016 at 05:11:59PM +0200, Laszlo Ersek wrote: >> On 07/27/16 10:43, Michal Privoznik wrote: >>> In qemu, enabling this feature boils down to adding the following >>> onto the command line: >>> >>> -global

Re: [libvirt] [PATCH v2 0/3] New vCPU hotplug prequel

2016-08-04 Thread John Ferlan
On 08/04/2016 06:40 AM, Peter Krempa wrote: > Few of the patches needed more significant changes. > > Peter Krempa (3): > internal: Introduce macro for stealing pointers > qemu: monitor: Return structures from qemuMonitorGetCPUInfo > qemu: monitor: Return struct from

Re: [libvirt] [PATCH 1/6] virqemu: Reflect return type of virJSONValueArraySize()

2016-08-04 Thread Michal Privoznik
On 04.08.2016 09:54, Peter Krempa wrote: > On Thu, Aug 04, 2016 at 09:47:45 +0200, Michal Privoznik wrote: >> The virJSONValueArraySize() function return ssize_t (with >> possibly returning -1 if the passed json is not an array). >> Storing the return value into size_t is possibly dangerous then.

Re: [libvirt] [PATCH 4/5] qemu: Enable secure boot

2016-08-04 Thread Pavel Hrdina
On Wed, Jul 27, 2016 at 05:11:59PM +0200, Laszlo Ersek wrote: > On 07/27/16 10:43, Michal Privoznik wrote: > > In qemu, enabling this feature boils down to adding the following > > onto the command line: > > > > -global driver=cfi.pflash01,property=secure,value=on > > > > However, there are

Re: [libvirt] [PATCH 6/9] tests: qemuxml2xml: Use DO_TEST() for most tests

2016-08-04 Thread Andrea Bolognani
On Thu, 2016-08-04 at 13:09 +0200, Ján Tomko wrote: > > +DO_TEST("pci-bridge", > > +QEMU_CAPS_DEVICE_PCI_BRIDGE); > > +DO_TEST("pci-bridge-many-disks", > > +QEMU_CAPS_DEVICE_PCI_BRIDGE); > > +DO_TEST("pci-autoadd-addr", > > +

[libvirt] [PATCH libvirt-sanbox] image: ignore OSError on listdir()

2016-08-04 Thread marcandre . lureau
From: Marc-André Lureau If the directory to list is missing, don't raise an exception but return empty list instead. This fixes for example running "virt-sandbox-image list" without a ~/.local/share/libvirt/templates/virt-builder. Signed-off-by: Marc-André Lureau

Re: [libvirt] [PATCH libvirt-sanbox] image: ignore OSError on listdir()

2016-08-04 Thread Daniel P. Berrange
On Thu, Aug 04, 2016 at 05:01:37PM +0400, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > If the directory to list is missing, don't raise an exception but > return empty list instead. This fixes for example running > "virt-sandbox-image list"

[libvirt] an AB deadlock or libvirtd crash problem in virsh console and virsh destroy

2016-08-04 Thread weifuqiang
Hi all: I encountered with an AB deadlock and libvirtd crash problem the other day. The process to generate the problems: 1 use the command "virsh create ***.xml" to create a vm 2 after vm is running , use the command "virsh console ***" to connect vm with console 3 after connection,

Re: [libvirt] [PATCH 9/9] qemu: command: Simplify USB controller model selection

2016-08-04 Thread Ján Tomko
On Fri, Jul 29, 2016 at 07:46:29PM +0200, Andrea Bolognani wrote: Since we now pick the default USB controller model when parsing the guest XML, we can get rid of some duplicated code so that the default model selection happens in one place only. Add some comments as well. ---

Re: [libvirt] [PATCH 8/9] qemu: domain: Reflect USB controller model in guest XML

2016-08-04 Thread Ján Tomko
On Fri, Jul 29, 2016 at 07:46:28PM +0200, Andrea Bolognani wrote: When the user doesn't specify any model for a USB controller, we use an architecture-dependent default, but we don't reflect it in the guest XML. Pick the default USB controller model when parsing the guest XML instead of when

Re: [libvirt] [PATCH] storage: Fix a NULL ptr dereference in virStorageBackendCreateQemuImg

2016-08-04 Thread Andrea Bolognani
On Thu, 2016-08-04 at 07:46 -0400, John Ferlan wrote: > > Should we check to make sure that vol and vol->target are > > non-NULL as well? >  > Well by this point vol would have already been dereferenced by the > callers virStorageBackendGetBuildVolFromFunction or >

Re: [libvirt] [PATCH] storage: Fix a NULL ptr dereference in virStorageBackendCreateQemuImg

2016-08-04 Thread John Ferlan
On 08/04/2016 04:48 AM, Andrea Bolognani wrote: > On Wed, 2016-08-03 at 12:27 +0200, Erik Skultety wrote: >> There was a missing check for vol->target.encryption being NULL >> at one particular place (modified by commit a48c71411) which caused a crash >> when user attempted to create a raw

Re: [libvirt] [PATCH 7/9] tests: qemuxml2xml: Add some USB test cases

2016-08-04 Thread Ján Tomko
On Fri, Jul 29, 2016 at 07:46:27PM +0200, Andrea Bolognani wrote: All these configurations are already covered for qemuxml2argv, but there were no equivalent tests for qemuxml2xml. --- .../qemuxml2xmlout-ppc64-usb-controller-legacy.xml | 31 ++

Re: [libvirt] [PATCH 6/9] tests: qemuxml2xml: Use DO_TEST() for most tests

2016-08-04 Thread Ján Tomko
On Fri, Jul 29, 2016 at 07:46:26PM +0200, Andrea Bolognani wrote: Now that DO_TEST() can be passed capabilities, there is little need to use DO_TEST_FULL() instead of DO_TEST(). --- tests/qemuxml2xmltest.c | 353 ++-- 1 file changed, 158 insertions(+),

Re: [libvirt] [PATCH 5/9] tests: qemuxml2xml: Pass capabilities to DO_TEST()

2016-08-04 Thread Ján Tomko
On Fri, Jul 29, 2016 at 07:46:25PM +0200, Andrea Bolognani wrote: This will allow us to remove most DO_TEST_FULL() usages. For the time being, just add the extra argument to all DO_TEST() calls. --- An alternative would be to add DO_TEST_CAPS with that semantics, but we already have enough

Re: [libvirt] [PATCH 3/9] tests: qemuxml2xml: Fix disk-mirror

2016-08-04 Thread Ján Tomko
It's not really broken. Maybe s/Fix/clean up/? On Fri, Jul 29, 2016 at 07:46:23PM +0200, Andrea Bolognani wrote: Instead of testing it twice using WHEN_ACTIVE and WHEN_INACTIVE separately, just use WHEN_BOTH. --- tests/qemuxml2xmltest.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)

[libvirt] [PATCH v2 1/3] internal: Introduce macro for stealing pointers

2016-08-04 Thread Peter Krempa
VIR_STEAL_PTR copies the pointer from the second argument into the first argument and then sets the second to NULL. --- src/internal.h | 12 1 file changed, 12 insertions(+) diff --git a/src/internal.h b/src/internal.h index 0dc34c7..d8cc5ad 100644 --- a/src/internal.h +++

[libvirt] [PATCH v2 3/3] qemu: monitor: Return struct from qemuMonitor(Text|Json)QueryCPUs

2016-08-04 Thread Peter Krempa
Prepare to extract more data by returning a array of structs rather than just an array of thread ids. Additionally report fatal errors separately from qemu not being able to produce data. --- src/qemu/qemu_monitor.c | 31 -- src/qemu/qemu_monitor.h | 6

[libvirt] [PATCH v2 0/3] New vCPU hotplug prequel

2016-08-04 Thread Peter Krempa
Few of the patches needed more significant changes. Peter Krempa (3): internal: Introduce macro for stealing pointers qemu: monitor: Return structures from qemuMonitorGetCPUInfo qemu: monitor: Return struct from qemuMonitor(Text|Json)QueryCPUs src/internal.h | 12 +++

[libvirt] [PATCH v2 2/3] qemu: monitor: Return structures from qemuMonitorGetCPUInfo

2016-08-04 Thread Peter Krempa
The function will gradually add more returned data. Return a struct for every vCPU containing the data. --- src/qemu/qemu_domain.c | 25 +- src/qemu/qemu_monitor.c | 57 +++-- src/qemu/qemu_monitor.h | 13 ++- 3 files

Re: [libvirt] [PATCH 3/5] Introduce @secure attribute to os loader element

2016-08-04 Thread Pavel Hrdina
On Wed, Jul 27, 2016 at 10:43:50AM +0200, Michal Privoznik wrote: > This element will control secure boot implemented by some > firmwares. If the firmware used in does support the > feature we must tell it to the underlying hypervisor. However, we > can't know whether loader does support it or

Re: [libvirt] [PATCH 6/6] virObjectEventNew: Use virObjectUnref() to free virObjectEvent

2016-08-04 Thread Peter Krempa
On Thu, Aug 04, 2016 at 09:47:50 +0200, Michal Privoznik wrote: > While no leak was observed yet, there might be one if > virObjectEventClass is ever derived from another class. Because > in that case plain VIR_FREE() will not call dispose() from parent > classes possibly leaking some memory. > >

Re: [libvirt] [PATCH 4/6] virshConnect: Don't leak polkit agent

2016-08-04 Thread Peter Krempa
On Thu, Aug 04, 2016 at 09:47:48 +0200, Michal Privoznik wrote: > In our attempts to reconnect, we may create a polkit daemon. > However, it may happen that we would rewrite the variable that > already holds pointer to the agent. > > Signed-off-by: Michal Privoznik > --- >

Re: [libvirt] [PATCH 2/6] qemuMigrationCookieStatisticsXMLParse: Check for retvals of virXPath*()

2016-08-04 Thread Peter Krempa
On Thu, Aug 04, 2016 at 09:47:46 +0200, Michal Privoznik wrote: > There's no critical bug fix in here, but if there's ever a bug in > our code and we send some gibberish in migration cookie, the > other side doesn't check if conversion from string to integer > was successful or not. > >

Re: [libvirt] [PATCH 2/5] Introduce SMM feature

2016-08-04 Thread Pavel Hrdina
On Wed, Jul 27, 2016 at 10:43:49AM +0200, Michal Privoznik wrote: > Since its release of 2.4.0 qemu is able to enable System > Management Module in the firmware, or disable it. We should > expose this capability in the XML. Unfortunately, there's no good > way to determine whether the binary we

Re: [libvirt] [PATCH] storage: Fix a NULL ptr dereference in virStorageBackendCreateQemuImg

2016-08-04 Thread Andrea Bolognani
On Wed, 2016-08-03 at 12:27 +0200, Erik Skultety wrote: > There was a missing check for vol->target.encryption being NULL > at one particular place (modified by commit a48c71411) which caused a crash > when user attempted to create a raw volume using a non-raw file volume as > source. >  >

Re: [libvirt] [PATCH 0/5] Introduce NVDIMM support

2016-08-04 Thread Stefan Hajnoczi
On Mon, Aug 1, 2016 at 4:10 PM, Michal Privoznik wrote: > NVDIMM was introduced to qemu in v2.6.0-rc0~248^2~25. So it's > been a while since then. > > It's not the next big thing, but it is very interesting feature > enabling higher performance as reading/writing to the

Re: [libvirt] [PATCH 1/5] qemuBuildMachineCommandLine: Follow our pattern

2016-08-04 Thread Pavel Hrdina
On Wed, Jul 27, 2016 at 10:43:48AM +0200, Michal Privoznik wrote: > We use 'goto cleanup' for a reason. If a function can exit at > many places but doesn't follow the pattern, it has to copy the > free code in multiple places. > > Signed-off-by: Michal Privoznik > --- >

Re: [libvirt] [PATCH 09/10] qemu: monitor: Return structures from qemuMonitorGetCPUInfo

2016-08-04 Thread Peter Krempa
On Wed, Aug 03, 2016 at 09:21:28 -0400, John Ferlan wrote: > > > On 08/03/2016 04:11 AM, Peter Krempa wrote: > > The function will gradually add more returned data. Return a struct for > > every vCPU containing the data. > > --- > > src/qemu/qemu_domain.c | 26 ++- > >

Re: [libvirt] [PATCH 5/6] libxlDoMigrateReceive: Drop useless check for !vm

2016-08-04 Thread Peter Krempa
On Thu, Aug 04, 2016 at 09:47:49 +0200, Michal Privoznik wrote: > In the cleanup path, @vm cannot be possibly NULL. If it were so, > we would receive SIGSEGV much earlier. At the beginning of the > function we do libxlDomainObjBeginJob(.., vm, ..); and so on. > > Signed-off-by: Michal Privoznik

[libvirt] [PATCH] rpm: set TLS priority to @LIBVIRT, SYSTEM on Fedora >= 25

2016-08-04 Thread Daniel P. Berrange
With newest gnutls available in Fedora 25/rawhide, it is possible to have TLS priority fallbacks, so we can finally use --tls-priority=@LIBVIRT,SYSTEM Signed-off-by: Daniel P. Berrange --- libvirt.spec.in | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-)

Re: [libvirt] [PATCH 3/6] securityselinuxlabeltest: Prefer virGetLastErrorMessage() over virGetLastError

2016-08-04 Thread Peter Krempa
On Thu, Aug 04, 2016 at 09:47:47 +0200, Michal Privoznik wrote: > At the beginning of the test, some preparation work is done. For > instance new virSecurityManager is created. If this fails for > whatever reason, we try to fetch the latest error and print the > error message contained in it.

Re: [libvirt] [PATCH 1/6] virqemu: Reflect return type of virJSONValueArraySize()

2016-08-04 Thread Peter Krempa
On Thu, Aug 04, 2016 at 09:47:45 +0200, Michal Privoznik wrote: > The virJSONValueArraySize() function return ssize_t (with > possibly returning -1 if the passed json is not an array). > Storing the return value into size_t is possibly dangerous then. Not in this case. All code paths calling this

[libvirt] [PATCH 0/6] Couple of small fixes

2016-08-04 Thread Michal Privoznik
Some of these were found by coverity, some by me going through code. Michal Privoznik (6): virqemu: Reflect return type of virJSONValueArraySize() qemuMigrationCookieStatisticsXMLParse: Check for retvals of virXPath*() securityselinuxlabeltest: Prefer virGetLastErrorMessage() over

[libvirt] [PATCH 3/6] securityselinuxlabeltest: Prefer virGetLastErrorMessage() over virGetLastError

2016-08-04 Thread Michal Privoznik
At the beginning of the test, some preparation work is done. For instance new virSecurityManager is created. If this fails for whatever reason, we try to fetch the latest error and print the error message contained in it. However, if there's a bug in our code and no error is reported, this

[libvirt] [PATCH 2/6] qemuMigrationCookieStatisticsXMLParse: Check for retvals of virXPath*()

2016-08-04 Thread Michal Privoznik
There's no critical bug fix in here, but if there's ever a bug in our code and we send some gibberish in migration cookie, the other side doesn't check if conversion from string to integer was successful or not. Signed-off-by: Michal Privoznik --- src/qemu/qemu_migration.c

[libvirt] [PATCH 4/6] virshConnect: Don't leak polkit agent

2016-08-04 Thread Michal Privoznik
In our attempts to reconnect, we may create a polkit daemon. However, it may happen that we would rewrite the variable that already holds pointer to the agent. Signed-off-by: Michal Privoznik --- tools/virsh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[libvirt] [PATCH 1/6] virqemu: Reflect return type of virJSONValueArraySize()

2016-08-04 Thread Michal Privoznik
The virJSONValueArraySize() function return ssize_t (with possibly returning -1 if the passed json is not an array). Storing the return value into size_t is possibly dangerous then. Signed-off-by: Michal Privoznik --- src/util/virqemu.c | 2 +- 1 file changed, 1

[libvirt] [PATCH 6/6] virObjectEventNew: Use virObjectUnref() to free virObjectEvent

2016-08-04 Thread Michal Privoznik
While no leak was observed yet, there might be one if virObjectEventClass is ever derived from another class. Because in that case plain VIR_FREE() will not call dispose() from parent classes possibly leaking some memory. Signed-off-by: Michal Privoznik ---

[libvirt] [PATCH 5/6] libxlDoMigrateReceive: Drop useless check for !vm

2016-08-04 Thread Michal Privoznik
In the cleanup path, @vm cannot be possibly NULL. If it were so, we would receive SIGSEGV much earlier. At the beginning of the function we do libxlDomainObjBeginJob(.., vm, ..); and so on. Signed-off-by: Michal Privoznik --- src/libxl/libxl_migration.c | 2 +- 1 file