Re: [libvirt] [PATCH v2 3/3] conf: Allow users to define UUID for devices

2017-10-03 Thread Martin Kletzander
On Tue, Oct 03, 2017 at 03:10:48PM +0100, Daniel P. Berrange wrote: On Tue, Oct 03, 2017 at 04:03:20PM +0200, Martin Kletzander wrote: On Tue, Oct 03, 2017 at 02:53:46PM +0100, Daniel P. Berrange wrote: > On Tue, Oct 03, 2017 at 02:11:44PM +0200, Martin Kletzander wrote: > > On Tue, Oct 03, 2017

Re: [libvirt] New QEMU daemon for persistent reservations

2017-10-03 Thread Paolo Bonzini
On 03/10/2017 18:39, Daniel P. Berrange wrote: > On Tue, Oct 03, 2017 at 06:35:03PM +0200, Paolo Bonzini wrote: >> And later on we might have other ways to implement persistent >> reservations in QEMU. So while I'm not a big fan(*) of the >> driver='helper' moniker, I don't think an attribute is e

Re: [libvirt] New QEMU daemon for persistent reservations

2017-10-03 Thread Daniel P. Berrange
On Tue, Oct 03, 2017 at 06:35:03PM +0200, Paolo Bonzini wrote: > On 03/10/2017 18:17, Daniel P. Berrange wrote: > > On Tue, Oct 03, 2017 at 06:07:53PM +0200, Paolo Bonzini wrote: > >> Yes, but OTOH if libvirtd starts the daemon, nobody cares about the > >> source type, so perhaps > >> > >> > >>

Re: [libvirt] New QEMU daemon for persistent reservations

2017-10-03 Thread Paolo Bonzini
On 03/10/2017 18:17, Daniel P. Berrange wrote: > On Tue, Oct 03, 2017 at 06:07:53PM +0200, Paolo Bonzini wrote: >> Yes, but OTOH if libvirtd starts the daemon, nobody cares about the >> source type, so perhaps >> >> >> >> >> >> (mandatory source) vs. >> >> >> /path/to/qemu-pr

Re: [libvirt] New QEMU daemon for persistent reservations

2017-10-03 Thread Paolo Bonzini
On 03/10/2017 17:59, Michal Privoznik wrote: > Ah, this breaks my design. I guess > > > > > > > > is pure madness, isn't it? Yes, but OTOH if libvirtd starts the daemon, nobody cares about the source type, so perhaps (mandatory source) vs. /path/t

Re: [libvirt] New QEMU daemon for persistent reservations

2017-10-03 Thread Daniel P. Berrange
On Tue, Oct 03, 2017 at 06:07:53PM +0200, Paolo Bonzini wrote: > On 03/10/2017 17:59, Michal Privoznik wrote: > > Ah, this breaks my design. I guess > > > > > > > > > > > > > > > > is pure madness, isn't it? > > Yes, but OTOH if libvirtd starts the daemon, nobody cares abo

Re: [libvirt] [Qemu-devel] libvirt/QEMU/SEV interaction

2017-10-03 Thread Brijesh Singh
Hi Laszlo, On 10/01/2017 04:56 AM, Laszlo Ersek wrote: On 10/01/17 11:17, Laszlo Ersek wrote: (3) Implement SEV encryption for pflash. A pflash chip can be in one of two modes: (a) it reads and executes as ROM, or (b) it behaves like a programmable (r/w) device with MMIO registers. Switching

Re: [libvirt] New QEMU daemon for persistent reservations

2017-10-03 Thread Michal Privoznik
On 09/10/2017 11:38 AM, Paolo Bonzini wrote: > On 28/08/2017 13:11, Michal Privoznik wrote: >> On 08/25/2017 12:41 AM, Paolo Bonzini wrote: >>> On 22/08/2017 18:27, Paolo Bonzini wrote: Hi all, >> >>> >>> The XML to use the helper with a predefined socket could be: >>> >>> >>>/pa

Re: [libvirt] [PATCH alt] conf: Allow user define their own alias

2017-10-03 Thread Daniel P. Berrange
On Tue, Oct 03, 2017 at 05:08:53PM +0200, Michal Privoznik wrote: > On 10/03/2017 04:19 PM, Daniel P. Berrange wrote: > > On Fri, Sep 29, 2017 at 09:06:01AM +0200, Michal Privoznik wrote: > >> https://bugzilla.redhat.com/show_bug.cgi?id=1434451 > >> > >> It comes handy for management application to

Re: [libvirt] [PATCH alt] conf: Allow user define their own alias

2017-10-03 Thread Michal Privoznik
On 10/03/2017 04:19 PM, Daniel P. Berrange wrote: > On Fri, Sep 29, 2017 at 09:06:01AM +0200, Michal Privoznik wrote: >> https://bugzilla.redhat.com/show_bug.cgi?id=1434451 >> >> It comes handy for management application to be able to have a >> per-device label so that it can uniquely identify devi

Re: [libvirt] [PATCH alt] conf: Allow user define their own alias

2017-10-03 Thread Daniel P. Berrange
On Fri, Sep 29, 2017 at 09:06:01AM +0200, Michal Privoznik wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1434451 > > It comes handy for management application to be able to have a > per-device label so that it can uniquely identify devices it > cares about. The advantage of this approach is

Re: [libvirt] [PATCH v2 3/3] conf: Allow users to define UUID for devices

2017-10-03 Thread Daniel P. Berrange
On Tue, Oct 03, 2017 at 04:03:20PM +0200, Martin Kletzander wrote: > On Tue, Oct 03, 2017 at 02:53:46PM +0100, Daniel P. Berrange wrote: > > On Tue, Oct 03, 2017 at 02:11:44PM +0200, Martin Kletzander wrote: > > > On Tue, Oct 03, 2017 at 12:58:59PM +0200, Michal Privoznik wrote: > > > > https://bug

Re: [libvirt] [PATCH v2 3/3] conf: Allow users to define UUID for devices

2017-10-03 Thread Martin Kletzander
On Tue, Oct 03, 2017 at 02:53:46PM +0100, Daniel P. Berrange wrote: On Tue, Oct 03, 2017 at 02:11:44PM +0200, Martin Kletzander wrote: On Tue, Oct 03, 2017 at 12:58:59PM +0200, Michal Privoznik wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1434451 > > It comes handy for management applica

Re: [libvirt] [PATCH] tests: Do not ignore mode parameter in mocked open()

2017-10-03 Thread Martin Kletzander
On Tue, Oct 03, 2017 at 02:07:18PM +0200, Jiri Denemark wrote: From: Luyao Huang This is normally not an issue since the tests which use mocked open() do not create files. But once coverage build is enabled, gcov_open will use O_CREATE and real_open will read random data rather than the actual

Re: [libvirt] [PATCH v2 3/3] conf: Allow users to define UUID for devices

2017-10-03 Thread Daniel P. Berrange
On Tue, Oct 03, 2017 at 02:11:44PM +0200, Martin Kletzander wrote: > On Tue, Oct 03, 2017 at 12:58:59PM +0200, Michal Privoznik wrote: > > https://bugzilla.redhat.com/show_bug.cgi?id=1434451 > > > > It comes handy for management application to be able to have a > > per-device label so that it can

Re: [libvirt] [PATCH] spec: Delay supported_platform check

2017-10-03 Thread Daniel P. Berrange
On Tue, Oct 03, 2017 at 01:48:04PM +0200, Jiri Denemark wrote: > Building RPM should only be allowed on a supported platform, but > unpacking the source and applying all patches can be done anywhere. > > Signed-off-by: Jiri Denemark > --- > libvirt.spec.in | 9 + > 1 file changed, 5 inse

Re: [libvirt] [PATCH] spec: Delay supported_platform check

2017-10-03 Thread Martin Kletzander
On Tue, Oct 03, 2017 at 01:48:04PM +0200, Jiri Denemark wrote: Building RPM should only be allowed on a supported platform, but unpacking the source and applying all patches can be done anywhere. Signed-off-by: Jiri Denemark --- libvirt.spec.in | 9 + 1 file changed, 5 insertions(+), 4 d

Re: [libvirt] [PATCH v2 3/3] conf: Allow users to define UUID for devices

2017-10-03 Thread Martin Kletzander
On Tue, Oct 03, 2017 at 12:58:59PM +0200, Michal Privoznik wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1434451 It comes handy for management application to be able to have a per-device label so that it can uniquely identify devices it cares about. The advantage of this approach is that we

Re: [libvirt] [PATCH v2 1/3] virDomainDeviceInfoParseXML: Separate address parsing into separate func

2017-10-03 Thread Michal Privoznik
On 10/03/2017 01:52 PM, Martin Kletzander wrote: > On Tue, Oct 03, 2017 at 12:58:57PM +0200, Michal Privoznik wrote: >> There's one 'return' in the middle of the function body. It's >> very easy to miss and so it makes adding new code harder. Also >> the function doesn't follow our style 100%. >> >

[libvirt] [PATCH] tests: Do not ignore mode parameter in mocked open()

2017-10-03 Thread Jiri Denemark
From: Luyao Huang This is normally not an issue since the tests which use mocked open() do not create files. But once coverage build is enabled, gcov_open will use O_CREATE and real_open will read random data rather than the actual mode argument. Signed-off-by: Jiri Denemark --- tests/virfilew

Re: [libvirt] [PATCH v2 1/3] virDomainDeviceInfoParseXML: Separate address parsing into separate func

2017-10-03 Thread Martin Kletzander
On Tue, Oct 03, 2017 at 12:58:57PM +0200, Michal Privoznik wrote: There's one 'return' in the middle of the function body. It's very easy to miss and so it makes adding new code harder. Also the function doesn't follow our style 100%. Signed-off-by: Michal Privoznik --- src/conf/domain_conf.c |

[libvirt] [PATCH] spec: Delay supported_platform check

2017-10-03 Thread Jiri Denemark
Building RPM should only be allowed on a supported platform, but unpacking the source and applying all patches can be done anywhere. Signed-off-by: Jiri Denemark --- libvirt.spec.in | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in ind

[libvirt] [PATCH v2 3/3] conf: Allow users to define UUID for devices

2017-10-03 Thread Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=1434451 It comes handy for management application to be able to have a per-device label so that it can uniquely identify devices it cares about. The advantage of this approach is that we don't have to generate aliases at define time (non trivial amount o

Re: [libvirt] [PATCH v2 2/3] virDomainDeviceInfoParseXML: Clear whole @info on failure

2017-10-03 Thread Martin Kletzander
On Tue, Oct 03, 2017 at 12:58:58PM +0200, Michal Privoznik wrote: Currently, if parsing of device info fails info->alias is freed. It doesn't make much sense to leave the rest of the struct behind. Signed-off-by: Michal Privoznik --- src/conf/domain_conf.c | 2 +- 1 file changed, 1 insertion(+),

[libvirt] [PATCH v2 1/3] virDomainDeviceInfoParseXML: Separate address parsing into separate func

2017-10-03 Thread Michal Privoznik
There's one 'return' in the middle of the function body. It's very easy to miss and so it makes adding new code harder. Also the function doesn't follow our style 100%. Signed-off-by: Michal Privoznik --- src/conf/domain_conf.c | 174 ++--- 1 file chan

[libvirt] [PATCH v2 0/3] Allow users to define UUID for devices

2017-10-03 Thread Michal Privoznik
v2 of: https://www.redhat.com/archives/libvir-list/2017-September/msg01077.html diff to v1: - Switched from arbitrary string to UUID - Moved UUID to separate element - Added docs Michal Privoznik (3): virDomainDeviceInfoParseXML: Separate address parsing into separate func virDomainDevic

Re: [libvirt] [PATCH 1/3] hyperv: Fix hypervInitConnection error reporting

2017-10-03 Thread Ladi Prosek
On Tue, Oct 3, 2017 at 12:14 PM, Daniel P. Berrange wrote: > On Tue, Oct 03, 2017 at 11:04:56AM +0200, Ladi Prosek wrote: >> "%s is not a Hyper-V server" is not a correct generalization of all possible >> error conditions of hypervEnumAndPull. For example: >> >> $ virsh --connect hyperv://localh

Re: [libvirt] [PATCH alt] conf: Allow user define their own alias

2017-10-03 Thread Michal Privoznik
On 10/02/2017 05:52 PM, Roman Mohr wrote: > On Fri, Sep 29, 2017 at 3:49 PM, Michal Privoznik > wrote: > >> On 09/29/2017 01:16 PM, Peter Krempa wrote: >>> On Fri, Sep 29, 2017 at 12:57:29 +0200, Michal Privoznik wrote: On 09/29/2017 09:52 AM, Peter Krempa wrote: > On Fri, Sep 29, 2017 a

[libvirt] [PATCH v2 2/3] virDomainDeviceInfoParseXML: Clear whole @info on failure

2017-10-03 Thread Michal Privoznik
Currently, if parsing of device info fails info->alias is freed. It doesn't make much sense to leave the rest of the struct behind. Signed-off-by: Michal Privoznik --- src/conf/domain_conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conf/domain_conf.c b/src/conf/dom

Re: [libvirt] [libvirt-jenkins-ci PATCH 05/18] ansible: Add libvirt-cim project

2017-10-03 Thread Andrea Bolognani
On Tue, 2017-10-03 at 10:02 +0100, Daniel P. Berrange wrote: > In the very last patch you add a bunch of files which define aliases for > the various dependancies, and map those to the distro specific package > name eg > > +cyrus-sasl: > + - cyrus-sasl # FreeBSD > + - cyrus-sasl-devel # C

Re: [libvirt] [PATCH 1/3] hyperv: Fix hypervInitConnection error reporting

2017-10-03 Thread Daniel P. Berrange
On Tue, Oct 03, 2017 at 11:04:56AM +0200, Ladi Prosek wrote: > "%s is not a Hyper-V server" is not a correct generalization of all possible > error conditions of hypervEnumAndPull. For example: > > $ virsh --connect hyperv://localhost/?transport=http > Enter username for localhost [administrat

Re: [libvirt] [libvirt-jenkins-ci PATCH 03/18] ansible: Add libosinfo project

2017-10-03 Thread Andrea Bolognani
On Tue, 2017-10-03 at 09:59 +0100, Daniel P. Berrange wrote: > > I'm not adamant on keeping this around, as it was mainly a tool > > for me to use during development, but I figure it might come in > > handy later on when some project picks up new (optional) build > > dependencies or we need to add

[libvirt] [PATCH 3/3] hyperv: Map Limit to max_memory and VirtualQuantity to cur_balloon

2017-10-03 Thread Ladi Prosek
Hyper-V uses its own specific memory management so no mapping is going to be perfect. However, it is more correct to map Limit to max_memory (it really is the upper limit of what the VM may potentially use) and keep cur_balloon equal to total_memory. The typical value returned from Hyper-V in Limi

[libvirt] [PATCH 2/3] hyperv: Escape WQL queries

2017-10-03 Thread Ladi Prosek
The code was vulnerable to SQL injection. Likely not a security issue due to WMI SQL and other constraints but still lame. For example: virsh # dominfo \" error: failed to get domain '"' error: internal error: SOAP fault during enumeration: code 's:Sender', subcode 'n:CannotProcessFilter',

[libvirt] [PATCH 1/3] hyperv: Fix hypervInitConnection error reporting

2017-10-03 Thread Ladi Prosek
"%s is not a Hyper-V server" is not a correct generalization of all possible error conditions of hypervEnumAndPull. For example: $ virsh --connect hyperv://localhost/?transport=http Enter username for localhost [administrator]: Enter administrator's password for localhost: error: failed t

[libvirt] [PATCH 0/3] Hyper-V driver fixes

2017-10-03 Thread Ladi Prosek
Fixes a couple of minor issues in the Hyper-V driver found by code inspection. Ladi Prosek (3): hyperv: Fix hypervInitConnection error reporting hyperv: Escape WQL queries hyperv: Map Limit to max_memory and VirtualQuantity to cur_balloon src/hyperv/hyperv_driver.c | 104 ++

Re: [libvirt] [libvirt-jenkins-ci PATCH 05/18] ansible: Add libvirt-cim project

2017-10-03 Thread Daniel P. Berrange
On Tue, Oct 03, 2017 at 09:18:32AM +0200, Andrea Bolognani wrote: > On Mon, 2017-10-02 at 16:57 +0100, Daniel P. Berrange wrote: > > > +packages: > > > + - libcmpiutil-devel > > > + - libconfig-devel > > > + - libuuid-devel > > > + - libxml2-devel > > > + - libxslt > > > + - wget > > > + > >

Re: [libvirt] [libvirt-jenkins-ci PATCH 03/18] ansible: Add libosinfo project

2017-10-03 Thread Daniel P. Berrange
On Tue, Oct 03, 2017 at 09:07:15AM +0200, Andrea Bolognani wrote: > On Mon, 2017-10-02 at 17:04 +0100, Daniel P. Berrange wrote: > > > +- name: '{{ project }}: Run sanity checks' > > > + command: '{{ make }} -j{{ smp }} syntax-check' > > > + args: > > > +chdir: '{{ project }}' > > > + when:

Re: [libvirt] [PATCH 2/3] virmacaddr: Track if MAC address is autogenerated

2017-10-03 Thread Erik Skultety
On Mon, Oct 02, 2017 at 01:01:19PM +0200, Michal Privoznik wrote: > It will come handy to know if the MAC address was generated (e.g. > during XML parse) or if it was parsed since provided by user in > the XML. > > Signed-off-by: Michal Privoznik We definitely should track whether the MAC was or

Re: [libvirt] [PATCH 1/3] qemuParseCommandLineNet: Make more readable

2017-10-03 Thread Erik Skultety
On Mon, Oct 02, 2017 at 01:01:18PM +0200, Michal Privoznik wrote: > Signed-off-by: Michal Privoznik > --- > src/qemu/qemu_parse_command.c | 32 > 1 file changed, 12 insertions(+), 20 deletions(-) Reviewed-by: Erik Skultety -- libvir-list mailing list libvir-lis

Re: [libvirt] [libvirt-jenkins-ci PATCH 03/18] ansible: Add libosinfo project

2017-10-03 Thread Andrea Bolognani
On Mon, 2017-10-02 at 17:04 +0100, Daniel P. Berrange wrote: > > +- name: '{{ project }}: Run sanity checks' > > + command: '{{ make }} -j{{ smp }} syntax-check' > > + args: > > +chdir: '{{ project }}' > > + when: > > +- project == 'libosinfo' > > This looks like its duplicating the rul

Re: [libvirt] [libvirt-jenkins-ci PATCH 05/18] ansible: Add libvirt-cim project

2017-10-03 Thread Andrea Bolognani
On Mon, 2017-10-02 at 16:57 +0100, Daniel P. Berrange wrote: > > +packages: > > + - libcmpiutil-devel > > + - libconfig-devel > > + - libuuid-devel > > + - libxml2-devel > > + - libxslt > > + - wget > > + > > +extra_packages: > > + - libvirt-devel > > This isn't right - we should never inst