Re: [libvirt] creating stream

2017-04-05 Thread Michal Privoznik
On 04/05/2017 09:11 PM, Vasiliy Tolstov wrote: 2017-04-05 17:53 GMT+03:00 Andrea Bolognani : That is true as long as you stick with the public API. If you start messing with the internal RPC and a change in libvirt breaks your code, you get to keep both pieces. I think

Re: [libvirt] [PATCH 3/3] virISCSIGetSession: Don't leak memory

2017-04-05 Thread Michal Privoznik
On 04/05/2017 10:34 PM, John Ferlan wrote: > > > On 04/05/2017 04:16 PM, Martin Kletzander wrote: >> On Wed, Apr 05, 2017 at 03:11:52PM -0400, John Ferlan wrote: >>> >>> >>> On 04/05/2017 04:50 AM, Michal Privoznik wrote: This function runs an iscsi command and parses its output.

Re: [libvirt] [PATCH v2 12/12] tests: Add resctrl test for vircaps2xmltest

2017-04-05 Thread Eli Qiao
On Wednesday, 5 April 2017 at 10:36 PM, Martin Kletzander wrote: > Add info from yet another machine, this time with resctrl data so that > we can extend tests easily in a test-driven way. > > Signed-off-by: Martin Kletzander (mailto:mklet...@redhat.com)> > --- >

Re: [libvirt] [PATCH 3/3] virISCSIGetSession: Don't leak memory

2017-04-05 Thread John Ferlan
On 04/05/2017 04:16 PM, Martin Kletzander wrote: > On Wed, Apr 05, 2017 at 03:11:52PM -0400, John Ferlan wrote: >> >> >> On 04/05/2017 04:50 AM, Michal Privoznik wrote: >>> This function runs an iscsi command and parses its output. >>> However, due to the nature of things,

Re: [libvirt] [PATCH 3/3] virISCSIGetSession: Don't leak memory

2017-04-05 Thread Martin Kletzander
On Wed, Apr 05, 2017 at 03:11:52PM -0400, John Ferlan wrote: On 04/05/2017 04:50 AM, Michal Privoznik wrote: This function runs an iscsi command and parses its output. However, due to the nature of things, virISCSIExtractSession() callback can be called multiple times. In each run it would

Re: [libvirt] creating stream

2017-04-05 Thread Vasiliy Tolstov
2017-04-05 17:53 GMT+03:00 Andrea Bolognani : > That is true as long as you stick with the public API. > > If you start messing with the internal RPC and a change > in libvirt breaks your code, you get to keep both pieces. I think in case of internal rpc i need to monitor

Re: [libvirt] [PATCH 3/3] virISCSIGetSession: Don't leak memory

2017-04-05 Thread John Ferlan
On 04/05/2017 04:50 AM, Michal Privoznik wrote: > This function runs an iscsi command and parses its output. > However, due to the nature of things, virISCSIExtractSession() > callback can be called multiple times. In each run it would > allocate new memory and overwrite the variable where we

Re: [libvirt] [PATCH] storage: Avoid leak in virStorageUtilGlusterExtractPoolSources()

2017-04-05 Thread John Ferlan
On 04/05/2017 12:28 PM, Andrea Bolognani wrote: > The contents of volname would be leaked if the function were > to be passed an invalid pooltype by the caller. > > Make sure the memory is released instead. > --- > Initializing volname to NULL is strictly speaking not > necessary, but I like it

Re: [libvirt] [PATCH] qemu: Fix VPATH syntax-check for qemuSecurity wrappers enforcment

2017-04-05 Thread Michal Privoznik
On 04/04/2017 05:25 PM, Boris Fiuczynski wrote: > Fixing make syntax-check broken by commit 4da534c0b9. > > Signed-off-by: Boris Fiuczynski > Reviewed-by: Marc Hartmayer > Reviewed-by: Bjoern Walk > --- > cfg.mk

[libvirt] [PATCH] storage: Avoid leak in virStorageUtilGlusterExtractPoolSources()

2017-04-05 Thread Andrea Bolognani
The contents of volname would be leaked if the function were to be passed an invalid pooltype by the caller. Make sure the memory is released instead. --- Initializing volname to NULL is strictly speaking not necessary, but I like it better that way :) src/storage/storage_util.c | 12

Re: [libvirt] creating stream

2017-04-05 Thread Andrea Bolognani
On Wed, 2017-04-05 at 16:17 +0300, Vasiliy Tolstov wrote: > I know that, but also i know that libvirt does not break compatibility > with older clients =). That is true as long as you stick with the public API. If you start messing with the internal RPC and a change in libvirt breaks your code,

[libvirt] [PATCH 4/4] conf: Check for storage conflicts across pool types

2017-04-05 Thread John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1233129 The virStoragePoolObjSourceFindDuplicate logic used by PoolCreateXML and PoolDefineXML avoids comparing the new definition against "other" pool types. This can cause unexpected corruption if two different pool source types used the same source

[libvirt] [PATCH 1/4] conf: Introduce virStoragePoolObjSourceMatchTypeDIR

2017-04-05 Thread John Ferlan
Refactor virStoragePoolObjSourceFindDuplicate into smaller units separated by the "supported" pool source type. The DIR, GLUSTER, and NETFS pools all can use "...

[libvirt] [PATCH 2/4] conf: Introduce virStoragePoolObjSourceMatchTypeISCSI

2017-04-05 Thread John Ferlan
In the effort to reduce the virStoragePoolObjSourceFindDuplicate logic, create a new helper which will handle all the ISCSI type differences. Alter things just a little bit to return NULL or pool rather than using breaks and matchpool = pool, then break. Also rather than creating variables

[libvirt] [PATCH 3/4] conf: Introduce virStoragePoolObjSourceMatchTypeDEVICE

2017-04-05 Thread John Ferlan
Refactor virStoragePoolObjSourceFindDuplicate into smaller units separated by the "supported" pool source type. The ISCSI, FS, LOGICAL, DISK, and ZFS pools can use "...

[libvirt] [PATCH 0/4] Allow some cross pool type source device path checks

2017-04-05 Thread John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1233129 Refactor the virStoragePoolSourceFindDuplicateDevices code a bit to make it a bit easier to read, then allow pool def type's that use a pool source device to define the source device to perform cross pool source device conflicts. John Ferlan

[libvirt] [PATCH v2 05/12] util: Remove virsysfs and instead enhance virFileReadValue* functions

2017-04-05 Thread Martin Kletzander
It is no longer needed thanks to the great virfilemock.c. And this way we don't have to add a new set of functions for each prefixed path. While on that, add two functions that weren't there before, string and scaled integer reading ones. Also increase the length of the string being read by one

[libvirt] [PATCH v2 11/12] tests: Add support for more complicated hierarchies in vircaps2xmltest

2017-04-05 Thread Martin Kletzander
More directories will need to be mocked, so let's prepare for that. Signed-off-by: Martin Kletzander --- tests/vircaps2xmltest.c | 20 +--- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/tests/vircaps2xmltest.c b/tests/vircaps2xmltest.c index

[libvirt] [PATCH v2 04/12] tests: Add virfilemock -- the new super mock

2017-04-05 Thread Martin Kletzander
This mock (which is actually not mock at all, see later) can redirect all accesses to a path into another path. There is no need to create mocks for particular directories, you just create a directory with all the data a redirect the test there. In the future, this should also be able to

[libvirt] [PATCH v2 07/12] tests: Add missing cache data for vircaps2xmltest

2017-04-05 Thread Martin Kletzander
Commit a0fdd2f6f9a0cc77ae285c289e2c16d314b6a907 added some data from the system but forgot 3 files for each cache. Signed-off-by: Martin Kletzander --- tests/vircaps2xmldata/linux-caches/cpu/cpu0/cache/index0/id | 1 +

[libvirt] [PATCH v2 03/12] util: Add virStringTrimOptionalNewline

2017-04-05 Thread Martin Kletzander
And use it in virFileRead* Signed-off-by: Martin Kletzander --- src/util/virfile.c| 18 +++--- src/util/virhostcpu.c | 4 ++-- src/util/virstring.h | 8 src/util/virsysfs.c | 2 ++ 4 files changed, 19 insertions(+), 13 deletions(-) diff --git

[libvirt] [PATCH] qemu: Move some functions to qemu_capspriv.h

2017-04-05 Thread Andrea Bolognani
This header file has been created so that we can expose internal functions to the test suite without making them public: those in qemu_capabilities.h bearing the comment /* Only for use by test suite */ are obvious candidates for being moved over. --- src/qemu/qemu_capabilities.h | 19

[libvirt] [PATCH v2 01/12] conf: Fix possible memleak in capabilities

2017-04-05 Thread Martin Kletzander
If formatting NUMA topology fails, the function returns immediatelly, but the buffer structure allocated on the stack references lot of heap-allocated memory and that would get lost in such case. Signed-off-by: Martin Kletzander --- src/conf/capabilities.c | 6 +- 1

[libvirt] [PATCH v2 06/12] tests: Test vircaps2xmldata XMLs in virschematest

2017-04-05 Thread Martin Kletzander
Signed-off-by: Martin Kletzander --- tests/virschematest.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/virschematest.c b/tests/virschematest.c index 119d4ba395e2..ffed2175fd37 100644 --- a/tests/virschematest.c +++ b/tests/virschematest.c @@

[libvirt] [PATCH v2 08/12] Add RNG schema for host cache information in capabilities

2017-04-05 Thread Martin Kletzander
Signed-off-by: Martin Kletzander --- docs/schemas/capability.rng | 34 ++ 1 file changed, 34 insertions(+) diff --git a/docs/schemas/capability.rng b/docs/schemas/capability.rng index 88e08d299ac9..208095302a63 100644 ---

[libvirt] [PATCH v2 09/12] Add host cache information into capabilities

2017-04-05 Thread Martin Kletzander
Signed-off-by: Martin Kletzander --- I'm adding only info about L3 caches, we can add more later, but for now that's more than enough. src/conf/capabilities.c | 200 src/conf/capabilities.h | 29

[libvirt] [PATCH v2 10/12] Init host cache info in drivers

2017-04-05 Thread Martin Kletzander
Added only in drivers that were already calling virCapabilitiesInitNUMA(). Instead of refactoring all the callers to behave the same way in case of error, just follow what the callers are doing for all the functions. Signed-off-by: Martin Kletzander --- src/lxc/lxc_conf.c

[libvirt] [PATCH v2 02/12] util: Fix virDirRead() description

2017-04-05 Thread Martin Kletzander
Signed-off-by: Martin Kletzander --- src/util/virfile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/virfile.c b/src/util/virfile.c index a91c2c349501..c0f448d3437d 100644 --- a/src/util/virfile.c +++ b/src/util/virfile.c @@ -2861,11

[libvirt] [PATCH v2 00/12] Rework sysfs handling

2017-04-05 Thread Martin Kletzander
So during a discussion [1] with Erik, I got an idea. And this is basically it. Reading and using kernel-interface-like files in an easy fashion and being able to easily mock them were two goals that, in my not so humble opinion, I reached. The previous version [2] is actually nor related to

Re: [libvirt] [PATCHv2] Split out -Wframe-larger-than warning from WARN_CLFAGS

2017-04-05 Thread Roman Bogorodskiy
Ján Tomko wrote: > Introduce STRICT_FRAME_LIMIT_CFLAGS that will be used for > the library code and RELAXED_FRAME_LIMIT_CFLAGS for daemon code > and the test code. > > Raising the limit for tests allows building them with clang > with optimizations disabled. > --- > v2: > * use the strict

Re: [libvirt] creating stream

2017-04-05 Thread Vasiliy Tolstov
2017-04-05 16:09 GMT+03:00 Michal Privoznik : > On 04/05/2017 12:35 AM, Vasiliy Tolstov wrote: >> Hi. I know that libvirt devs does not like devs that used internal rpc >> of libvirt... > > Not entirely true. We like all devs, but we just discourage people to > use our RPC as

[libvirt] [PATCH 0/8] qemu: Properly reset all migration capabilities

2017-04-05 Thread Jiri Denemark
We need to make sure to reset all migration parameters to prevent future operations calling the "migrate" QMP command from accidentally using stale parameters. This series resets only TLS parameters and all capabilities. A followup series will reset all other parameters (such as compression) too.

[libvirt] [PATCH 2/8] qemu: Drop resume label in qemuProcessRecoverMigrationOut

2017-04-05 Thread Jiri Denemark
Let's use a bool variable to create a single shared path returning 0. Signed-off-by: Jiri Denemark --- src/qemu/qemu_process.c | 31 --- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/src/qemu/qemu_process.c

[libvirt] [PATCH 3/8] qemu: Always reset TLS in qemuProcessRecoverMigrationOut

2017-04-05 Thread Jiri Denemark
qemuProcessRecoverMigrationOut doesn't explicitly call qemuMigrationResetTLS relying on two things: - qemuMigrationCancel resets TLS parameters - our migration code resets TLS before entering QEMU_MIGRATION_PHASE_PERFORM3_DONE phase But this is not obvious and the assumptions will

Re: [libvirt] creating stream

2017-04-05 Thread Michal Privoznik
On 04/05/2017 12:35 AM, Vasiliy Tolstov wrote: > Hi. I know that libvirt devs does not like devs that used internal rpc > of libvirt... Not entirely true. We like all devs, but we just discourage people to use our RPC as it's internal. It doesn't offer the full set of features provided by

[libvirt] [PATCH 6/8] qemu: Introduce qemuMigrationReset

2017-04-05 Thread Jiri Denemark
This new API is supposed to reset all migration parameters to make sure future migrations won't accidentally use them. This patch makes the first step and moves qemuMigrationResetTLS call inside qemuMigrationReset. Signed-off-by: Jiri Denemark --- src/qemu/qemu_migration.c

[libvirt] [PATCH 7/8] qemu: Simplify qemuMigrationResetTLS

2017-04-05 Thread Jiri Denemark
It's only called from qemuMigrationReset now so it doesn't need to be exported and {tls,sec}Alias are always NULL. Signed-off-by: Jiri Denemark --- src/qemu/qemu_migration.c | 37 + src/qemu/qemu_migration.h | 7 --- 2 files changed,

[libvirt] [PATCH 8/8] qemu: Properly reset all migration capabilities

2017-04-05 Thread Jiri Denemark
So far only QEMU_MONITOR_MIGRATION_CAPS_POSTCOPY was reset, but only in a single code path leaving post-copy enabled in quite a few cases. https://bugzilla.redhat.com/show_bug.cgi?id=1425003 Signed-off-by: Jiri Denemark --- src/qemu/qemu_migration.c | 10 +++--- 1 file

[libvirt] [PATCH 5/8] qemu: Don't reset TLS in qemuMigrationCancel

2017-04-05 Thread Jiri Denemark
Migration parameters are either reset by the main migration code path or from qemuProcessRecoverMigration* in case libvirtd is restarted during migration. Signed-off-by: Jiri Denemark --- src/qemu/qemu_migration.c | 3 --- 1 file changed, 3 deletions(-) diff --git

[libvirt] [PATCH 1/8] qemu: Properly reset TLS in qemuProcessRecoverMigrationIn

2017-04-05 Thread Jiri Denemark
There is no async job running when a freshly started libvirtd is trying to recover from an interrupted incoming migration. While at it, let's call qemuMigrationResetTLS every time we don't kill the domain. This is not strictly necessary since TLS is not supported when v2 migration protocol is

[libvirt] [PATCH 4/8] qemu: Don't reset TLS in qemuMigrationRun

2017-04-05 Thread Jiri Denemark
Finished qemuMigrationRun does not mean the migration itself finished (it might have just switched to post-copy mode). While resetting TLS parameters is probably OK at this point even if migration is still running, we want to consolidate the code which resets various migration parameters. Thus

[libvirt] [PATCHv2] Split out -Wframe-larger-than warning from WARN_CLFAGS

2017-04-05 Thread Ján Tomko
Introduce STRICT_FRAME_LIMIT_CFLAGS that will be used for the library code and RELAXED_FRAME_LIMIT_CFLAGS for daemon code and the test code. Raising the limit for tests allows building them with clang with optimizations disabled. --- v2: * use the strict limit for tools and daemon too * append

Re: [libvirt] [PATCH] qemu: Properly reset TLS in qemuProcessRecoverMigrationIn

2017-04-05 Thread Jiri Denemark
On Tue, Apr 04, 2017 at 19:51:26 +0200, Jiri Denemark wrote: > There is no async job running when a freshly started libvirtd is trying > to recover from an interrupted incoming migration. While at it, let's > call qemuMigrationResetTLS every time we don't kill the domain. This is > not strictly

Re: [libvirt] [PATCH v2 3/5] qemu: Advertise ACPI support for aarch64 guests

2017-04-05 Thread Andrea Bolognani
On Wed, 2017-04-05 at 12:00 +0200, Ján Tomko wrote: [...] > > @@ -4096,10 +4100,15 @@ virQEMUCapsInitHelp(virQEMUCapsPtr qemuCaps, uid_t > > runUid, gid_t runGid, const c > > qmperr) < 0) > > goto cleanup; > >  > > -/* -no-acpi is not supported on

Re: [libvirt] [PATCH] qemu: monitor: No need to debug-log the 'mon' pointer

2017-04-05 Thread Ján Tomko
On Wed, Apr 05, 2017 at 02:21:48PM +0200, Peter Krempa wrote: QEMU_CHECK_MONITOR_* already logs the object and vm name --- src/qemu/qemu_monitor.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) ACK Jan signature.asc Description: Digital signature -- libvir-list mailing list

[libvirt] [PATCH] qemu: monitor: No need to debug-log the 'mon' pointer

2017-04-05 Thread Peter Krempa
QEMU_CHECK_MONITOR_* already logs the object and vm name --- src/qemu/qemu_monitor.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index a4fa6eca6..2fc6192dc 100644 --- a/src/qemu/qemu_monitor.c +++

Re: [libvirt] [PATCH 14/14] cputest: Add tests for virCPUUpdateLive API

2017-04-05 Thread Jiri Denemark
On Wed, Apr 05, 2017 at 07:37:34 -0400, John Ferlan wrote: > > > On 03/17/2017 12:36 PM, Jiri Denemark wrote: > > The test takes > > > > x86-cpuid-Something-guest.xml CPU (the CPU libvirt would use for > > host-model on a CPU described by x86_64-cpuid-Something.xml without > > talking

Re: [libvirt] [PATCH v2 2/5] tests: Initialize basic capabilities properly

2017-04-05 Thread Andrea Bolognani
On Wed, 2017-04-05 at 12:04 +0200, Ján Tomko wrote: [...] > > @@ -510,6 +510,8 @@ int virQEMUCapsParseHelpStr(const char *qemu, > > const char *qmperr); > > /* Only for use by test suite */ > > int virQEMUCapsParseDeviceStr(virQEMUCapsPtr qemuCaps, const char *str); > >

Re: [libvirt] creating stream

2017-04-05 Thread Vasiliy Tolstov
2017-04-05 1:35 GMT+03:00 Vasiliy Tolstov : > Hi. I know that libvirt devs does not like devs that used internal rpc > of libvirt... I need to create stream to use with upload/download and > as i see it does not created via rpc call, can you suggest me what > files i need to

Re: [libvirt] [PATCH (RFC?)] Remove usage of __attribute__((nonnull))

2017-04-05 Thread Martin Kletzander
On Wed, Apr 05, 2017 at 12:29:03PM +0100, Daniel P. Berrange wrote: On Wed, Apr 05, 2017 at 12:38:23PM +0200, Martin Kletzander wrote: [...] How about we enable it by default for build with new enough GCC (so that it reports these errors without silently dropping the non-NULL checks)? Yes,

Re: [libvirt] [PATCH 14/14] cputest: Add tests for virCPUUpdateLive API

2017-04-05 Thread John Ferlan
On 03/17/2017 12:36 PM, Jiri Denemark wrote: > The test takes > > x86-cpuid-Something-guest.xml CPU (the CPU libvirt would use for > host-model on a CPU described by x86_64-cpuid-Something.xml without > talking to QEMU about what it supports on the host) > > and updates it according

[libvirt] [PATCH] docs: Add news.rng to EXTRA_DIST

2017-04-05 Thread Peter Krempa
--- Pushed under the build-breaker rule. docs/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/Makefile.am b/docs/Makefile.am index 62e069e15..105fe6894 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -220,6 +220,7 @@ news.html.in: \ fi EXTRA_DIST += \

Re: [libvirt] [PATCH (RFC?)] Remove usage of __attribute__((nonnull))

2017-04-05 Thread Daniel P. Berrange
On Wed, Apr 05, 2017 at 12:38:23PM +0200, Martin Kletzander wrote: > On Wed, Apr 05, 2017 at 10:06:22AM +0100, Daniel P. Berrange wrote: > > On Tue, Apr 04, 2017 at 09:51:47PM +0200, Martin Kletzander wrote: > > > On Tue, Apr 04, 2017 at 04:10:59PM +0100, Daniel P. Berrange wrote: > > > > On Tue,

Re: [libvirt] [PATCH (RFC?)] Remove usage of __attribute__((nonnull))

2017-04-05 Thread Martin Kletzander
On Wed, Apr 05, 2017 at 06:53:10AM -0400, John Ferlan wrote: On 04/05/2017 05:06 AM, Daniel P. Berrange wrote: On Tue, Apr 04, 2017 at 09:51:47PM +0200, Martin Kletzander wrote: On Tue, Apr 04, 2017 at 04:10:59PM +0100, Daniel P. Berrange wrote: On Tue, Mar 28, 2017 at 01:46:31PM +0200,

Re: [libvirt] [PATCH 0/3] Couple of small fixes

2017-04-05 Thread Martin Kletzander
On Wed, Apr 05, 2017 at 10:50:52AM +0200, Michal Privoznik wrote: Mostly mem leaks. However, the first one is an actual crasher. Michal Privoznik (3): virStorageSourceClear: Don't leave dangling pointers behind virNetworkObjDispose: Don't leak virMacMap object virISCSIGetSession: Don't leak

Re: [libvirt] [PATCH v3 5/5] storage: gluster: Use volume name as "" field in the XML

2017-04-05 Thread Peter Krempa
On Wed, Apr 05, 2017 at 07:03:39 -0400, John Ferlan wrote: > > > On 04/04/2017 08:20 AM, Peter Krempa wrote: > > For native gluster pools the field denotes a directory inside the > > pool. For the actual pool name the field has to be used. > > --- > > src/storage/storage_util.c

Re: [libvirt] [PATCH v3 5/5] storage: gluster: Use volume name as "" field in the XML

2017-04-05 Thread John Ferlan
On 04/04/2017 08:20 AM, Peter Krempa wrote: > For native gluster pools the field denotes a directory inside the > pool. For the actual pool name the field has to be used. > --- > src/storage/storage_util.c | 16 > ++-- >

Re: [libvirt] [PATCH (RFC?)] Remove usage of __attribute__((nonnull))

2017-04-05 Thread John Ferlan
On 04/05/2017 05:06 AM, Daniel P. Berrange wrote: > On Tue, Apr 04, 2017 at 09:51:47PM +0200, Martin Kletzander wrote: >> On Tue, Apr 04, 2017 at 04:10:59PM +0100, Daniel P. Berrange wrote: >>> On Tue, Mar 28, 2017 at 01:46:31PM +0200, Martin Kletzander wrote: The attribute (defined as

Re: [libvirt] [PATCH (RFC?)] Remove usage of __attribute__((nonnull))

2017-04-05 Thread Martin Kletzander
On Wed, Apr 05, 2017 at 10:06:22AM +0100, Daniel P. Berrange wrote: On Tue, Apr 04, 2017 at 09:51:47PM +0200, Martin Kletzander wrote: On Tue, Apr 04, 2017 at 04:10:59PM +0100, Daniel P. Berrange wrote: > On Tue, Mar 28, 2017 at 01:46:31PM +0200, Martin Kletzander wrote: > > The attribute

Re: [libvirt] [PATCH] storage: gluster: Implement 'checkPool' method so that state is restored

2017-04-05 Thread Ján Tomko
On Thu, Mar 30, 2017 at 02:06:33PM +0200, Peter Krempa wrote: After restart of libvirtd the 'checkPool' method is supposed to validate that the pool is online. Since libvirt then refreshes the pool contents anyways just return whether the pool was supposed to be online so that the code can be

Re: [libvirt] [PATCH v2 2/5] tests: Initialize basic capabilities properly

2017-04-05 Thread Ján Tomko
On Wed, Mar 29, 2017 at 04:08:53PM +0200, Andrea Bolognani wrote: The capabilities used in test cases should match those used during normal operation for the tests to make any sense. --- src/qemu/qemu_capabilities.c | 2 +- src/qemu/qemu_capabilities.h

Re: [libvirt] [PATCH v2 3/5] qemu: Advertise ACPI support for aarch64 guests

2017-04-05 Thread Ján Tomko
On Wed, Mar 29, 2017 at 04:08:54PM +0200, Andrea Bolognani wrote: So far, libvirt has assumed that only x86 supports ACPI, but that's inaccurate since aarch64 supports it too. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1429509 --- src/qemu/qemu_capabilities.c |

Re: [libvirt] [PATCH (RFC?)] Remove usage of __attribute__((nonnull))

2017-04-05 Thread Daniel P. Berrange
On Tue, Apr 04, 2017 at 09:51:47PM +0200, Martin Kletzander wrote: > On Tue, Apr 04, 2017 at 04:10:59PM +0100, Daniel P. Berrange wrote: > > On Tue, Mar 28, 2017 at 01:46:31PM +0200, Martin Kletzander wrote: > > > The attribute (defined as ATTRIBUTE_NONNULL) was added long time > > > ago (2009),

[libvirt] [PATCH 3/3] virISCSIGetSession: Don't leak memory

2017-04-05 Thread Michal Privoznik
This function runs an iscsi command and parses its output. However, due to the nature of things, virISCSIExtractSession() callback can be called multiple times. In each run it would allocate new memory and overwrite the variable where we keep pointer to it and thus leaking old allocations.

[libvirt] [PATCH 1/3] virStorageSourceClear: Don't leave dangling pointers behind

2017-04-05 Thread Michal Privoznik
Imagine that this function is called twice over the same disk source. While in the first run all allocated memory is freed, not all pointers are set to NULL (e.g. def->srcpool). So when called again, these poitners are freed again resulting in double free. Signed-off-by: Michal Privoznik

[libvirt] [PATCH 2/3] virNetworkObjDispose: Don't leak virMacMap object

2017-04-05 Thread Michal Privoznik
Even though the virMacMap object is not necessarily created at the same time as the network object, the former makes no sense without the latter and thus should be unref'd in the network object dispose function. Signed-off-by: Michal Privoznik --- src/conf/network_conf.c |

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

2017-04-05 Thread Michal Privoznik
Mostly mem leaks. However, the first one is an actual crasher. Michal Privoznik (3): virStorageSourceClear: Don't leave dangling pointers behind virNetworkObjDispose: Don't leak virMacMap object virISCSIGetSession: Don't leak memory src/conf/network_conf.c | 1 + src/util/viriscsi.c

Re: [libvirt] [RFC PATCH 00/11] Add mdev reporting capability to the nodedev driver

2017-04-05 Thread Daniel P. Berrange
On Wed, Apr 05, 2017 at 08:12:31AM +0200, Erik Skultety wrote: > On Tue, Apr 04, 2017 at 04:23:18PM +0100, Daniel P. Berrange wrote: > > On Wed, Mar 29, 2017 at 02:51:10PM +0200, Erik Skultety wrote: > > > This series enables the node device driver to report information about the > > > existing

Re: [libvirt] [PATCH] docs: Move news.rng out of docs/schemas

2017-04-05 Thread Peter Krempa
On Wed, Apr 05, 2017 at 09:13:00 +0100, Daniel Berrange wrote: > On Wed, Apr 05, 2017 at 09:56:13AM +0200, Peter Krempa wrote: > > docs/schemas directory is meant for schemas which are installed on the > > system. The schema for the news file does not need to be installed. > > Store it along with

Re: [libvirt] [PATCH] docs: Move news.rng out of docs/schemas

2017-04-05 Thread Daniel P. Berrange
On Wed, Apr 05, 2017 at 09:56:13AM +0200, Peter Krempa wrote: > docs/schemas directory is meant for schemas which are installed on the > system. The schema for the news file does not need to be installed. > Store it along with the file it describes for simplicity. > --- > Patch for the alternative

Re: [libvirt] [PATCH v3 0/7] Provide an standard asyncio event loop impl

2017-04-05 Thread Michal Privoznik
On 04/04/2017 04:31 PM, Daniel P. Berrange wrote: This patch series is a followup to Wojtek's v2 posting: https://www.redhat.com/archives/libvir-list/2017-March/msg00838.html It contains the fixes I pointed out in v1 / v2, along with a bunch of updates to the event-test.py example, so we can

[libvirt] [PATCH] docs: Move news.rng out of docs/schemas

2017-04-05 Thread Peter Krempa
docs/schemas directory is meant for schemas which are installed on the system. The schema for the news file does not need to be installed. Store it along with the file it describes for simplicity. --- Patch for the alternative of moving news rng to docs/ along with the file it should describe.

Re: [libvirt] [PATCH] docs: Document limitation of maximum vcpu count used with

2017-04-05 Thread Michal Privoznik
On 04/04/2017 04:05 PM, Peter Krempa wrote: qemu requires that the topology equals to the maximum vcpu count. Document this along with the API to set maximum vcpu count and the XML element. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1426220 --- docs/formatdomain.html.in | 5 -

Re: [libvirt] [PATCH] docs: don't install news.rng file

2017-04-05 Thread Bjoern Walk
Peter Krempa [2017-04-05, 08:44AM +0200]: On Wed, Apr 05, 2017 at 07:58:36 +0200, Bjoern Walk wrote: Daniel P. Berrange [2017-04-04, 07:24PM +0200]: > The news.rng file gets picked up by the wildcard match on docs/schemas, > and so gets installed into

Re: [libvirt] [PATCH] docs: don't install news.rng file

2017-04-05 Thread Peter Krempa
On Wed, Apr 05, 2017 at 07:58:36 +0200, Bjoern Walk wrote: > Daniel P. Berrange [2017-04-04, 07:24PM +0200]: > > The news.rng file gets picked up by the wildcard match on docs/schemas, > > and so gets installed into /usr/share/libvirt, along with the schemas > > for our API

Re: [libvirt] [PATCH] docs: don't install news.rng file

2017-04-05 Thread Peter Krempa
On Tue, Apr 04, 2017 at 18:24:07 +0100, Daniel Berrange wrote: > The news.rng file gets picked up by the wildcard match on docs/schemas, > and so gets installed into /usr/share/libvirt, along with the schemas > for our API objects. This then generated an RPM build failure, since > we don't have

Re: [libvirt] [RFC PATCH 00/11] Add mdev reporting capability to the nodedev driver

2017-04-05 Thread Erik Skultety
On Tue, Apr 04, 2017 at 04:23:18PM +0100, Daniel P. Berrange wrote: > On Wed, Mar 29, 2017 at 02:51:10PM +0200, Erik Skultety wrote: > > This series enables the node device driver to report information about the > > existing mediated devices on the host. There is no device creation involved > >