[libvirt] [PATCH] qemu: Fix numatune nodeset reporting

2015-05-18 Thread Martin Kletzander
Since af2a1f0587d88656f2c14265a63fbc11ecbd924e, qemuDomainGetNumaParameters() returns invalid value for a running guest. The problem is that it is getting the information from cgroups, but the parent cgroup is being left alone since the mentioned commit. Since the running guest's XML is in sync wi

[libvirt] [libvirt-python 3/3] Sort tuples on both items

2015-05-18 Thread Guido Günther
In order to achieve reproducible builds[0] we want the items within enums always generated in the same order so sort on both items in the tuple. [0] https://wiki.debian.org/ReproducibleBuilds/About --- generator.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/generato

[libvirt] [libvirt-python 0/3] reproducible builds

2015-05-18 Thread Guido Günther
Debian tries to make builds reporducible[0] therefore we need predictable output (i.e. no timestamps, predictable iteration over hashes, etc.). This patch (mostly by Chris Lamb) to libvirt-python makes the necessary changes. [0] https://wiki.debian.org/ReproducibleBuilds Guido Günther (3): Sort

[libvirt] [libvirt-python 2/3] Simplify sorting

2015-05-18 Thread Guido Günther
funcs.keys() can't be None, only the empty array --- generator.py | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/generator.py b/generator.py index c14b0d4..861f166 100755 --- a/generator.py +++ b/generator.py @@ -931,10 +931,7 @@ def buildStubs(module, api_xml): wrapp

[libvirt] [libvirt-python 1/3] Sort dictionary keys

2015-05-18 Thread Guido Günther
In order to achive reproducible builds[0] we want functions and enums always generated in the same order. [0] https://wiki.debian.org/ReproducibleBuilds/About --- generator.py | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/generator.py b/generator.py index 78082e8..c1

[libvirt] RFC: exposing qemu's block-set-write-threshold

2015-05-18 Thread Eric Blake
I'm trying to wire up libvirt to do event reporting based on qemu 2.3's BLOCK_WRITE_THRESHOLD event. Doing this will allow management applications to do event-based notification on when to enlarge LVM (or other) storage underlying a qcow2 volume, rather than their current requirement to frequently

Re: [libvirt] cpuset / numa and qemu in TCG mode

2015-05-18 Thread Guido Günther
Hi, On Wed, May 13, 2015 at 03:31:09PM +, Serge Hallyn wrote: > Quoting Guido Günther (a...@sigxcpu.org): > > On Tue, May 12, 2015 at 11:14:09AM +0200, Martin Kletzander wrote: > > > On Tue, May 12, 2015 at 05:27:34PM +1000, Tony Breeds wrote: > > > >On Mon, May 11, 2015 at 01:14:58PM +0200, Ma

Re: [libvirt] [PATCH 0/4] xenconfig: fix SPICE parsing/formatting

2015-05-18 Thread Jim Fehlig
On 05/18/2015 04:34 AM, Michal Privoznik wrote: On 09.05.2015 00:00, Jim Fehlig wrote: This series fixes several bugs related to SPICE parsing and formatting code in xenconfig. The bugs are mostly due to misinterpretation of the Xen documenation, which I failed to notice when reviewing the init

Re: [libvirt] [PATCH 3/3] virSysinfo: Introduce SMBIOS type 2 support

2015-05-18 Thread John Ferlan
On 05/12/2015 10:56 AM, Michal Privoznik wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1220527 > > This type of information defines attributes of a system > baseboard. With one caveat: in qemu they call it family, while > in the specification it's referred to as type. I'm sticking with

Re: [libvirt] [PATCH 2/3] virSysinfoDef: Exempt SYSTEM variables

2015-05-18 Thread John Ferlan
On 05/12/2015 10:56 AM, Michal Privoznik wrote: > Move all the system_* fields into a separate struct. Not only this > simplifies the code a bit it also helps us to identify whether BIOS > info is present. We don't have to check all the four variables for > being not-NULL, but we can just check t

Re: [libvirt] [PATCH 1/3] virSysinfoDef: Exempt BIOS variables

2015-05-18 Thread John Ferlan
On 05/12/2015 10:56 AM, Michal Privoznik wrote: > Move all the bios_* fields into a separate struct. Not only this > simplifies the code a bit it also helps us to identify whether BIOS > info is present. We don't have to check all the four variables for > being not-NULL, but we can just check the

[libvirt] [PATCH 3/3] parallels: fix possible crash in case of errors in prlsdkLoadDomain

2015-05-18 Thread Maxim Nestratov
Cleanup code in prlsdkLoadDomain doesn't take into account the fact if private domain freeing function is assigned or not. In case it is, we shouldn't call it manually because virDomainObjListRemove calls it. Also, allocated def structure should be freed only if it's not assigned to domain. Otherwi

[libvirt] [PATCH 0/3] parallels: fix prlsdkLoadDomain and prlsdkAddDomain

2015-05-18 Thread Maxim Nestratov
Maxim Nestratov (3): parallels: fix prlsdkAddDomain parallels: move up updating autostart parameter in prlsdkLoadDomain parallels: fix possible crash in case of errors in prlsdkLoadDomain src/parallels/parallels_sdk.c | 39 ++- 1 file changed, 26 insertio

[libvirt] [PATCH 2/3] parallels: move up updating autostart parameter in prlsdkLoadDomain

2015-05-18 Thread Maxim Nestratov
It is better to get all necessary parameters and check them on newly created configuration before actually creating a domain with them or applying them to an existing domain. Signed-off-by: Maxim Nestratov --- src/parallels/parallels_sdk.c | 18 +- 1 file changed, 9 insertions(+)

[libvirt] [PATCH 1/3] parallels: fix prlsdkAddDomain

2015-05-18 Thread Maxim Nestratov
Don't forget to unlock domain on error path Signed-off-by: Maxim Nestratov --- src/parallels/parallels_sdk.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/parallels/parallels_sdk.c b/src/parallels/parallels_sdk.c index 786e0ad..faae1ae 100644 --- a/src/parallels/para

Re: [libvirt] [PATCH 0/6] node_device: update sriov/iommu info before dumpxml of a device

2015-05-18 Thread Laine Stump
On 05/18/2015 06:07 AM, Michal Privoznik wrote: > On 15.05.2015 17:04, Laine Stump wrote: >> Patch 5/6 resolves this bug: >> >>https://bugzilla.redhat.com/show_bug.cgi?id=981546 >> >> (filed against RHEL7, but existing in every version of libvirt that >> supports reporting of SRIOV virtual func

[libvirt] [libvirt-glib] storage-pool: API to get/set autostart flag

2015-05-18 Thread Zeeshan Ali (Khattak)
Add binding for virStoragePoolGetAutostart & virStoragePoolSetAutostart. --- libvirt-gobject/libvirt-gobject-storage-pool.c | 52 ++ libvirt-gobject/libvirt-gobject-storage-pool.h | 5 +++ libvirt-gobject/libvirt-gobject.sym| 6 +++ 3 files changed, 63 inserti

[libvirt] [PATCH 5/3] qemu: Resolve Coverity RESOURCE_LEAK

2015-05-18 Thread John Ferlan
Recent changes to the -M/--machine processing code in qemuParseCommandLine caused Coverity to determine there was a possible resource leak with how the 'list' is managed. Rather than try to add virStringFreeList calls everywhere - just promote list to the top of the variables and free it within the

[libvirt] [PATCH 4/3] conf: Resolve Coverity NEGATIVE_RETURNS

2015-05-18 Thread John Ferlan
Commit id '73eda710' added virDomainKeyWrapDefParseXML which uses virXPathNodeSet, but does not handle a -1 return thus causing a possible loop condition exit problem later when the return value is used. Change the logic to return the value from virXPathNodeSet if <= 0 Signed-off-by: John Ferlan

Re: [libvirt] [PATCH 1/3] Introduce virDomainSetUserPassword API

2015-05-18 Thread Daniel P. Berrange
On Mon, May 18, 2015 at 02:43:48PM +0200, Ján Tomko wrote: > For setting passwords of users inside the domain. > > With the VIR_DOMAIN_PASSWORD_CRYPTED flag set, the password > is assumed to be already encrypted by crypt(3). > > https://bugzilla.redhat.com/show_bug.cgi?id=1174177 > --- > include

Re: [libvirt] [PATCH v2 2/4] libvirt: conf: parse XML for protected key management ops

2015-05-18 Thread John Ferlan
On 05/15/2015 10:43 AM, Michal Privoznik wrote: ... Coverity complaint... > +static int > +virDomainKeyWrapDefParseXML(virDomainDefPtr def, xmlXPathContextPtr ctxt) > +{ > +size_t i; > +int ret = -1; > +xmlNodePtr *nodes = NULL; > +int n; > + > +if (!(n = virXPathNodeSet("./

[libvirt] [PATCH 3/3] qemu: wire up virDomainSetUserPassword

2015-05-18 Thread Ján Tomko
Base-64 encode the password and pass it to the guest agent via the 'guest-set-user-password' command. https://bugzilla.redhat.com/show_bug.cgi?id=1174177 --- src/qemu/qemu_agent.c | 39 +++ src/qemu/qemu_agent.h | 4 src/qemu/qemu_driver.c | 55

[libvirt] [PATCH 1/3] Introduce virDomainSetUserPassword API

2015-05-18 Thread Ján Tomko
For setting passwords of users inside the domain. With the VIR_DOMAIN_PASSWORD_CRYPTED flag set, the password is assumed to be already encrypted by crypt(3). https://bugzilla.redhat.com/show_bug.cgi?id=1174177 --- include/libvirt/libvirt-domain.h | 9 src/access/viraccessperm.c |

[libvirt] [PATCH 2/3] virsh: add set-user-password command

2015-05-18 Thread Ján Tomko
Expose the virDomainSetUserPassword API in virsh: virsh set-user-password dom 123456 user For root, the username can be omitted: virsh set-user-password dom 123456 --- tools/virsh-domain.c | 76 tools/virsh.pod | 11 2 files chang

[libvirt] [PATCH 0/3] Support changing user passwords in the guest

2015-05-18 Thread Ján Tomko
The guest-set-user-password command was added to qemu-agent in the 2.3.0 release by Daniel Berrange (some of you might have heard of him): commit 215a2771a7b6b29037ee8deba484815d816b6fdd qga: add guest-set-user-password command http://git.qemu.org/?p=qemu.git;a=commitdiff;h=215a277 This mini-

Re: [libvirt] [python PATCHv2] examples: Add example to make guest agent lifecycle event useful

2015-05-18 Thread Michal Privoznik
On 11.05.2015 10:46, Peter Krempa wrote: > This example allows to use the guest agent event and metadata to track > vCPU count set via the guest agent (agent-based onlining/offlining) and > keep it persistent accross domain restarts. > > The daemon listens for the agent lifecycle event, and if it'

Re: [libvirt] [PATCH 0/4] xenconfig: fix SPICE parsing/formatting

2015-05-18 Thread Michal Privoznik
On 09.05.2015 00:00, Jim Fehlig wrote: > This series fixes several bugs related to SPICE parsing and formatting > code in xenconfig. The bugs are mostly due to misinterpretation of the > Xen documenation, which I failed to notice when reviewing the initial > submission. > > Jim Fehlig (4): > xe

[libvirt] [PATCH] Fix to list online cpus using virsh capabilities

2015-05-18 Thread Kothapally Madhu Pavan
Virsh capabilities will list offline cpus as online when libvirt is compiled with numactl option disabled. This fix will list correct set of online cpus. Signed-off-by: Kothapally Madhu Pavan --- src/nodeinfo.c | 36 1 file changed, 24 insertions(+), 12 del

Re: [libvirt] [PATCH 0/6] node_device: update sriov/iommu info before dumpxml of a device

2015-05-18 Thread Michal Privoznik
On 15.05.2015 17:04, Laine Stump wrote: > Patch 5/6 resolves this bug: > >https://bugzilla.redhat.com/show_bug.cgi?id=981546 > > (filed against RHEL7, but existing in every version of libvirt that > supports reporting of SRIOV virtual function info via the NodeDevice > APIs - 0.7.5, believe i

Re: [libvirt] [PATCH 1/3] virsh: Improve error message on integer value parsing failure.

2015-05-18 Thread Michal Privoznik
On 15.05.2015 18:14, Andrea Bolognani wrote: > Replace more than 30 ad-hoc error messages with a single, generic one > that contains the name of the option being processed and some hints > to help the user understand what could have gone wrong. > > Resolves: https://bugzilla.redhat.com/show_bug.cg

Re: [libvirt] [PATCH 0/3] virsh: Fix and enhance handling of numeric options

2015-05-18 Thread Michal Privoznik
On 15.05.2015 18:14, Andrea Bolognani wrote: > The first commit improves error messages by making them much more > consistent and a little bit more helpful to the user. > > The other two commits contain smaller fixes and enhancement. > > Andrea Bolognani (3): > virsh: Improve error message on i

Re: [libvirt] [PATCH] libxl: provide impl for nodeGetSecurityModel

2015-05-18 Thread Michal Privoznik
On 15.05.2015 20:52, Jim Fehlig wrote: > Currently, the libxl driver does not support any security drivers. > When the qemu driver has no security driver configued, > nodeGetSecurityModel succeeds but returns an empty virSecurityModel > object. Do the same in the libxl driver instead of reporting

Re: [libvirt] [PATCH v2 0/4] Enable support for s390 crypto key mgmt operations

2015-05-18 Thread Michal Privoznik
On 15.05.2015 16:43, Michal Privoznik wrote: > I've taken Tony's patches from here: > > https://www.redhat.com/archives/libvir-list/2015-April/msg01395.html > > polished them a bit, and resend. > > Tony Krowiak (4): > libvirt: docs: XML to enable/disable protected key mgmt ops > libvirt: con