Re: [libvirt] [PATCH V3] Expose resource control capabilites on cache bank

2017-04-06 Thread Eli Qiao
On Thursday, 6 April 2017 at 9:04 PM, Martin Kletzander wrote: > On Thu, Apr 06, 2017 at 01:25:35PM +0100, Daniel P. Berrange wrote: > > On Thu, Apr 06, 2017 at 08:20:56PM +0800, Eli Qiao wrote: > > > This patch is based on Martin's cache branch. > > > > > > This patch amends the cache bank

Re: [libvirt] [PATCH V3] Expose resource control capabilites on cache bank

2017-04-06 Thread Eli Qiao
On Thursday, 6 April 2017 at 8:46 PM, Martin Kletzander wrote: > On Thu, Apr 06, 2017 at 08:20:56PM +0800, Eli Qiao wrote: > > This patch is based on Martin's cache branch. > > > > This patch amends the cache bank capability as follow: > > It helps a lot if you wait for a conclusion on a

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

2017-04-06 Thread Wojtek Porczyk
On Tue, Apr 04, 2017 at 03:31:27PM +0100, Daniel P. Berrange wrote: > $ python3 ./examples/event-test.py --loop=asyncio --timeout=30 qemu:///session Thank you for this update. I tested it backported to 3.1.0 with xen:/// using event-test.py and also with our own code. Looks good to me. I

[libvirt] [libvirt-3.2] NBD-based storage migration fails with "error: invalid argument: monitor must not be NULL"

2017-04-06 Thread Kashyap Chamarthy
[Filed this bug -- https://bugzilla.redhat.com/show_bug.cgi?id=1439841] Easy reproducer: $ virsh migrate --verbose --copy-storage-all \ --p2p --live l2-f25 qemu+ssh://root@devstack-a/system error: invalid argument: monitor must not be NULL - - - This is a nested Fedora-25

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

2017-04-06 Thread Daniel P. Berrange
On Thu, Apr 06, 2017 at 05:40:09PM +0200, Martin Kletzander wrote: > On Thu, Apr 06, 2017 at 04:27:25PM +0200, Andrea Bolognani wrote: > > On Wed, 2017-04-05 at 06:53 -0400, John Ferlan wrote: > > > > I thought that John still had a nightly coverity job running that > > > > would trigger the

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

2017-04-06 Thread Martin Kletzander
On Thu, Apr 06, 2017 at 04:27:25PM +0200, Andrea Bolognani wrote: On Wed, 2017-04-05 at 06:53 -0400, John Ferlan wrote: > I thought that John still had a nightly coverity job running that > would trigger the -DSTATIC_ANALYSIS codepaths. If that's not the case, then we'd wnat to look > at

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

2017-04-06 Thread Andrea Bolognani
On Wed, 2017-04-05 at 06:53 -0400, John Ferlan wrote: > > I thought that John still had a nightly coverity job running that > > would trigger the -DSTATIC_ANALYSIS codepaths. If that's not the case, then > > we'd wnat to look > > at enabling that in one of the centos CI jobs. >  > I still have a

[libvirt] [RFC PATCH 3/8] util: Generate a common internal only error print

2017-04-06 Thread John Ferlan
If virObjectIsClass fails "internally" to virobject.c, create a macro to generate the VIR_WARN describing what the problem is. Also improve the checks and message a bit to indicate which was the failure - whether the obj was NULL or just not the right class Signed-off-by: John Ferlan

[libvirt] [PATCH 2/3] interface: Introduce virInterfaceObjGetNames

2017-04-06 Thread John Ferlan
Unlike other drivers, this is a test driver only API. Still combining the logic of testConnectListInterfaces and testConnectListDefinedInterfaces makes things a bit easier in the long run. Signed-off-by: John Ferlan --- src/conf/virinterfaceobj.c | 34

[libvirt] [PATCH 3/3] interface: Clean up Interface section of test_driver

2017-04-06 Thread John Ferlan
Clean up the code to adhere to more of the standard two spaces between functions, separate lines for type and function name, one argument per line. Signed-off-by: John Ferlan --- src/test/test_driver.c | 81 +++--- 1 file changed,

[libvirt] [PATCH 0/3] interface: Create common virInterface* APIs

2017-04-06 Thread John Ferlan
Effectively move code from test_driver.c into virinterfaceobj to count the number of devices and to return a list of names. Patch 3 is a bit out of order from my norm, but at least I didn't forget... FWIW: This is part of the common driver objects code I've been working through. I figured I will

[libvirt] [PATCH 1/3] interface: Introduce virInterfaceObjNumOfInterfaces

2017-04-06 Thread John Ferlan
Unlike other drivers, this is a test driver only API. Still combining the logic of testConnectNumOfInterfaces and testConnectNumOfDefinedInterfaces makes things a bit easier in the long run. Signed-off-by: John Ferlan --- src/conf/virinterfaceobj.c | 20

Re: [libvirt] [PATCH V3] Expose resource control capabilites on cache bank

2017-04-06 Thread Martin Kletzander
On Thu, Apr 06, 2017 at 01:25:35PM +0100, Daniel P. Berrange wrote: On Thu, Apr 06, 2017 at 08:20:56PM +0800, Eli Qiao wrote: This patch is based on Martin's cache branch. This patch amends the cache bank capability as follow: Why do we need to report 'type' on both bank &

Re: [libvirt] [PATCH V3] Expose resource control capabilites on cache bank

2017-04-06 Thread Daniel P. Berrange
On Thu, Apr 06, 2017 at 02:46:10PM +0200, Martin Kletzander wrote: > On Thu, Apr 06, 2017 at 08:20:56PM +0800, Eli Qiao wrote: > > This patch is based on Martin's cache branch. > > > > This patch amends the cache bank capability as follow: > > > > It helps a lot if you wait for a conclusion on

Re: [libvirt] [PATCH V3] Expose resource control capabilites on cache bank

2017-04-06 Thread Martin Kletzander
On Thu, Apr 06, 2017 at 08:20:56PM +0800, Eli Qiao wrote: This patch is based on Martin's cache branch. This patch amends the cache bank capability as follow: It helps a lot if you wait for a conclusion on a patch before sending another version as soon as you can change one line.

Re: [libvirt] [PATCH] qemu: Fix regression when hyperv/vendor_id feature is used

2017-04-06 Thread Jiri Denemark
On Thu, Apr 06, 2017 at 14:28:09 +0200, Peter Krempa wrote: > On Thu, Apr 06, 2017 at 14:20:39 +0200, Jiri Denemark wrote: > > qemuProcessVerifyHypervFeatures is supposed to check whether all > > requested hyperv features were actually honored by QEMU/KVM. This is > > done by checking the

Re: [libvirt] creating stream

2017-04-06 Thread Vasiliy Tolstov
2017-04-06 15:18 GMT+03:00 Daniel P. Berrange : > Sure you're free to check if you don't believe me. I'm just making suggestion > to save you wasting your time. Ok =) -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] [PATCH] qemu: Fix regression when hyperv/vendor_id feature is used

2017-04-06 Thread Peter Krempa
On Thu, Apr 06, 2017 at 14:20:39 +0200, Jiri Denemark wrote: > qemuProcessVerifyHypervFeatures is supposed to check whether all > requested hyperv features were actually honored by QEMU/KVM. This is > done by checking the corresponding CPUID bits reported by the virtual > CPU. In other words, it

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

2017-04-06 Thread Martin Kletzander
On Thu, Apr 06, 2017 at 01:32:13PM +0200, Erik Skultety wrote: On Wed, Apr 05, 2017 at 04:36:26PM +0200, Martin Kletzander wrote: And use it in virFileRead* Signed-off-by: Martin Kletzander --- src/util/virfile.c| 18 +++--- src/util/virhostcpu.c | 4

Re: [libvirt] [PATCH V3] Expose resource control capabilites on cache bank

2017-04-06 Thread Daniel P. Berrange
On Thu, Apr 06, 2017 at 08:20:56PM +0800, Eli Qiao wrote: > This patch is based on Martin's cache branch. > > This patch amends the cache bank capability as follow: > > > > > Why do we need to report 'type' on both bank & control elements. Are they really expected to have different

[libvirt] [PATCH] qemu: Fix regression when hyperv/vendor_id feature is used

2017-04-06 Thread Jiri Denemark
qemuProcessVerifyHypervFeatures is supposed to check whether all requested hyperv features were actually honored by QEMU/KVM. This is done by checking the corresponding CPUID bits reported by the virtual CPU. In other words, it doesn't work for string properties, such as

[libvirt] [PATCH V3] Expose resource control capabilites on cache bank

2017-04-06 Thread Eli Qiao
This patch is based on Martin's cache branch. This patch amends the cache bank capability as follow: Along with vircaps2xmltest case updated. Signed-off-by: Eli Qiao --- src/conf/capabilities.c | 120

Re: [libvirt] creating stream

2017-04-06 Thread Daniel P. Berrange
On Thu, Apr 06, 2017 at 03:16:44PM +0300, Vasiliy Tolstov wrote: > 2017-04-06 15:09 GMT+03:00 Daniel P. Berrange : > > Hiding multiple hosts behind the libvirt API doesn't really work for the > > majority of our API objects, as the object model is designed around a > > single

Re: [libvirt] creating stream

2017-04-06 Thread Vasiliy Tolstov
2017-04-06 15:09 GMT+03:00 Daniel P. Berrange : > Hiding multiple hosts behind the libvirt API doesn't really work for the > majority of our API objects, as the object model is designed around a > single host concept. You need a different level of API abstraction to >

Re: [libvirt] creating stream

2017-04-06 Thread Daniel P. Berrange
On Thu, Apr 06, 2017 at 03:09:12PM +0300, Vasiliy Tolstov wrote: > 2017-04-06 15:06 GMT+03:00 Vasiliy Tolstov : > >> We already have a fine grained access control system that can be used to > >> restrict feature access... > > > Also i don't think that libvirt access control

[libvirt] [RFC PATCH 4/8] util: Add magic_marker for all virObjects

2017-04-06 Thread John Ferlan
The virObject logic "assumes" that whatever is passed to its API's would be some sort of virObjectPtr; however, if it is not then some really bad things can happen. So far there's been only virObject{Ref|Unref}, virObject{Lock|Unlock}, and virObjectIsClass and the virObject and virObjectLockable

[libvirt] [RFC PATCH 5/8] util: Introduce virObjectPoolableHashTable

2017-04-06 Thread John Ferlan
Add the initial infrastructure to define a new object which will be a child of the virObjectLockable class that can be used to create an object that has two hash tables for object consumers to be able to utilize to store elements in one or two hash tables depending on the need to have more than

[libvirt] [RFC PATCH 6/8] util: Add the hash tables to virObjectPoolableHashTable

2017-04-06 Thread John Ferlan
Add a pair of hash tables to the object - a primary and a secondary one. If the consumer requested only a primary, then only it will be created. Signed-off-by: John Ferlan --- src/libvirt_private.syms | 2 ++ src/util/virobject.c | 78

[libvirt] [RFC PATCH 2/8] util: Introduce virObjectGetLockableObj

2017-04-06 Thread John Ferlan
Split out the object fetch in virObject{Lock|Unlock} into a helper Signed-off-by: John Ferlan --- src/util/virobject.c | 31 +-- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/src/util/virobject.c b/src/util/virobject.c index

[libvirt] [RFC PATCH 1/8] util: Formatting cleanups to virobject API

2017-04-06 Thread John Ferlan
Alter to use more recent formatting guidelines Signed-off-by: John Ferlan --- src/util/virobject.c | 64 ++-- src/util/virobject.h | 59 2 files changed, 82 insertions(+), 41

[libvirt] [RFC PATCH 7/8] util: Introduce virObjectPoolableHashElement

2017-04-06 Thread John Ferlan
Add a new virObjectLockable child which will be used to describe elements that would be inserted into the virObjectPoolableHashTable. Each virObjectPoolableHashElement will have a primaryKey and a secondaryKey which can be used to insert the same object into both of the hash tables that are part

[libvirt] [RFC PATCH 8/8] util: Add virObjectPoolableHashElementGet*Key

2017-04-06 Thread John Ferlan
Signed-off-by: John Ferlan --- src/libvirt_private.syms | 2 ++ src/util/virobject.c | 51 src/util/virobject.h | 6 ++ 3 files changed, 59 insertions(+) diff --git a/src/libvirt_private.syms

[libvirt] [RFC PATCH 0/8] util: virObject fixes and enhancements

2017-04-06 Thread John Ferlan
Posted as RFC mainly for the benefit of patches 5-8. The first 4 patches could be considered non-RFC material, but posting half of each just didn't seem reasonable. Before I get "too far" into this virobject adjustment and inheritance model, I wanted to be sure the chosen names were suitable and

Re: [libvirt] creating stream

2017-04-06 Thread Daniel P. Berrange
On Thu, Apr 06, 2017 at 03:06:49PM +0300, Vasiliy Tolstov wrote: > 2017-04-06 15:05 GMT+03:00 Daniel P. Berrange : > > We already have a fine grained access control system that can be used to > > restrict feature access... > > > I know, but i need to proxy - say have one

Re: [libvirt] creating stream

2017-04-06 Thread Vasiliy Tolstov
2017-04-06 15:06 GMT+03:00 Vasiliy Tolstov : >> We already have a fine grained access control system that can be used to >> restrict feature access... Also i don't think that libvirt access control have ability to deny access based on function and payload. For example i need

Re: [libvirt] creating stream

2017-04-06 Thread Vasiliy Tolstov
2017-04-06 15:05 GMT+03:00 Daniel P. Berrange : > We already have a fine grained access control system that can be used to > restrict feature access... I know, but i need to proxy - say have one endpoint for array of libvirt hosts. Not worry this is fun and i think for

Re: [libvirt] [PATCH V2] Expose resource control capabilites on cache bank

2017-04-06 Thread Daniel P. Berrange
On Thu, Apr 06, 2017 at 08:09:35PM +0800, Eli Qiao wrote: > > > On Thursday, 6 April 2017 at 7:56 PM, Daniel P. Berrange wrote: > > > On Thu, Apr 06, 2017 at 07:32:59PM +0800, Eli Qiao wrote: > > > This patch is based on Martin's cache branch. > > > > > > This patch amends the cache bank

Re: [libvirt] [PATCH V2] Expose resource control capabilites on cache bank

2017-04-06 Thread Eli Qiao
On Thursday, 6 April 2017 at 7:56 PM, Daniel P. Berrange wrote: > On Thu, Apr 06, 2017 at 07:32:59PM +0800, Eli Qiao wrote: > > This patch is based on Martin's cache branch. > > > > This patch amends the cache bank capability as follow: > > > > > > > > > > > > > > > > > > > This

Re: [libvirt] creating stream

2017-04-06 Thread Daniel P. Berrange
On Thu, Apr 06, 2017 at 03:01:40PM +0300, Vasiliy Tolstov wrote: > 2017-04-06 14:59 GMT+03:00 Michal Privoznik : > > That is not going to be enough. The RPC protocol is spread among other files > > too. You really should not hook into our RPC protocol. > > > My question is

Re: [libvirt] creating stream

2017-04-06 Thread Vasiliy Tolstov
2017-04-06 14:59 GMT+03:00 Michal Privoznik : > That is not going to be enough. The RPC protocol is spread among other files > too. You really should not hook into our RPC protocol. > My question is still > unanswered though - why do you need it anyway? Now only for fun,

Re: [libvirt] creating stream

2017-04-06 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 V2] Expose resource control capabilites on cache bank

2017-04-06 Thread Daniel P. Berrange
On Thu, Apr 06, 2017 at 07:32:59PM +0800, Eli Qiao wrote: > This patch is based on Martin's cache branch. > > This patch amends the cache bank capability as follow: > > > > > > > This is still wrong per my previous comments. Regards, Daniel -- |: http://berrange.com

Re: [libvirt] [PATCH] Expose resource control capabilites on cache bank

2017-04-06 Thread Martin Kletzander
On Thu, Apr 06, 2017 at 06:56:09PM +0800, Eli Qiao wrote: On Thursday, 6 April 2017 at 5:49 PM, Martin Kletzander wrote: On Thu, Apr 06, 2017 at 04:20:06PM +0800, Eli Qiao wrote: > This patch is based on Martin's cache branch. > > This patch amends the cache bank capability as follow: > > >

[libvirt] [PATCH 5/7] storage: Introduce virStoragePoolObjGetNames

2017-04-06 Thread John Ferlan
Mostly code motion to move storageConnectList[Defined]StoragePools and similar test driver code into virstorageobj.c and rename to virStoragePoolObjGetNames. Also includes a couple of variable name adjustments to keep code consistent with other drivers. Signed-off-by: John Ferlan

[libvirt] [PATCH 6/7] storage: Pass driver arg by ref

2017-04-06 Thread John Ferlan
Alter virStoragePoolObjListExport in order to pass the drivers->pools by reference Signed-off-by: John Ferlan --- src/conf/virstorageobj.c | 8 src/conf/virstorageobj.h | 2 +- src/storage/storage_driver.c | 2 +- src/test/test_driver.c | 2 +- 4 files

[libvirt] [PATCH 4/7] storage: Introduce virStoragePoolObjNumOfStoragePools

2017-04-06 Thread John Ferlan
Unify the NumOf[Defined]StoragePools API into virstorageobj.c from storage_driver and test_driver. The only real difference between the two is the test driver doesn't call using the aclfilter API. Signed-off-by: John Ferlan --- src/conf/virstorageobj.c | 24

[libvirt] [PATCH 7/7] storage: Create helpers to perform FindByUUID and FindByName

2017-04-06 Thread John Ferlan
Create a couple of helpers that will perform the same call sequence. Signed-off-by: John Ferlan --- src/storage/storage_driver.c | 144 ++- 1 file changed, 59 insertions(+), 85 deletions(-) diff --git a/src/storage/storage_driver.c

[libvirt] [PATCH 3/7] storage: Introduce virStoragePoolObjVolumeListExport

2017-04-06 Thread John Ferlan
Essentially code motion to move the storage/test driver ListAllVolumes logic into virstorageobj.c Signed-off-by: John Ferlan --- src/conf/virstorageobj.c | 47 src/conf/virstorageobj.h | 7 +++

[libvirt] [PATCH 0/7] storage: Create common virStorageObj* APIs

2017-04-06 Thread John Ferlan
Merge code in storage_driver.c and test_driver into virstorageobj to count the number of volumes/pools, to return a list of names, return the collected list of objects for volumes/pools. For volumes, that's moved code, while for pools that's just changing the export API to take an address of

[libvirt] [PATCH 2/7] storage: Introduce virStoragePoolObjVolumeGetNames

2017-04-06 Thread John Ferlan
Mostly code motion to move storagePoolListVolumes code into virstorageobj.c and rename to virStoragePoolObjVolumeGetNames. Also includes a couple of variable name adjustments to keep code consistent with other drivers. Signed-off-by: John Ferlan --- src/conf/virstorageobj.c

[libvirt] [PATCH 1/7] storage: Introduce virStoragePoolObjNumOfVolumes

2017-04-06 Thread John Ferlan
Unify the NumOfVolumes API into virstorageobj.c from storage_driver and test_driver. The only real difference between the two is the test driver doesn't call using the aclfilter API. Signed-off-by: John Ferlan --- src/conf/virstorageobj.c | 19 +++

[libvirt] [PATCH 1/3] nwfilter: Introduce virNWFilterObjNumOfNWFilters

2017-04-06 Thread John Ferlan
Mostly code motion from nwfilter_driver to virnwfilterobj with one caveat to add the virNWFilterObjListFilter typedef and pass it as an 'aclfilter' argument to allow for future possible test driver adjustments to count the number of filters (similar to how node device has done this).

[libvirt] [PATCH 0/3] nwfilter: Create common virNWFilterObj* APIs

2017-04-06 Thread John Ferlan
Effectively move code from nwfilter_driver.c into virnwfiltereobj to count the number of devices, to return a list of names, and to return an array of filters. FWIW: This is part of the common driver objects code I've been working through. I figured I will post each driver separately rather than

[libvirt] [PATCH 2/3] nwfilter: Introduce virNWFilterObjGetNames

2017-04-06 Thread John Ferlan
Mostly code motion to move nwfilterConnectListNWFilters into nwfilterobj.c and rename to virNWFilterObjGetNames. Also includes a couple of variable name adjustments to keep code consistent with other drivers. Signed-off-by: John Ferlan --- src/conf/virnwfilterobj.c |

[libvirt] [PATCH 3/3] nwfilter: Introduce virNWFilterObjListExport

2017-04-06 Thread John Ferlan
Essentially code motion to move the ListExport function from nwfilter_driver into virnwfilterobj Signed-off-by: John Ferlan --- src/conf/virnwfilterobj.c | 50 ++ src/conf/virnwfilterobj.h | 6 + src/libvirt_private.syms

Re: [libvirt] [PATCH] Expose resource control capabilites on cache bank

2017-04-06 Thread Daniel P. Berrange
On Thu, Apr 06, 2017 at 07:31:00PM +0800, Eli Qiao wrote: > > > On Thursday, 6 April 2017 at 5:51 PM, Daniel P. Berrange wrote: > > > On Thu, Apr 06, 2017 at 11:49:14AM +0200, Martin Kletzander wrote: > > > On Thu, Apr 06, 2017 at 04:20:06PM +0800, Eli Qiao wrote: > > > > This patch is based on

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

2017-04-06 Thread Erik Skultety
On Wed, Apr 05, 2017 at 04:36:26PM +0200, Martin Kletzander wrote: > 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 >

[libvirt] [PATCH V2] Expose resource control capabilites on cache bank

2017-04-06 Thread Eli Qiao
This patch is based on Martin's cache branch. This patch amends the cache bank capability as follow: Along with vircaps2xmltest case updated. Signed-off-by: Eli Qiao --- src/conf/capabilities.c | 110 +++

[libvirt] [PATCH 0/3] nodedev: Create common virNodeDeviceObj* APIs

2017-04-06 Thread John Ferlan
Merge code in node_device_driver.c and test_driver into virnodedeviceobj to count the number of devices and to return a list of names. Also modify the export list API to take an address of 'devobjs' to follow other usages. FWIW: This is part of the common driver objects code I've been working

[libvirt] [PATCH 1/3] nodedev: Introduce virNodeDeviceObjNumOfDevices

2017-04-06 Thread John Ferlan
Unify the NumOfDevices API into virnodedeviceobj.c from node_device_driver and test_driver. The only real difference between the two is that the test driver doesn't call the aclfilter API. Signed-off-by: John Ferlan --- src/conf/virnodedeviceobj.c | 22

[libvirt] [PATCH 3/3] nodedev: Pass driver arg by ref

2017-04-06 Thread John Ferlan
Alter virNodeDeviceObjListExport in order to pass the drivers->devs by reference Signed-off-by: John Ferlan --- src/conf/virnodedeviceobj.c | 8 src/conf/virnodedeviceobj.h | 2 +- src/node_device/node_device_driver.c | 2 +- 3 files changed, 6

[libvirt] [PATCH 2/3] nodedev: Introduce virNodeDeviceObjGetNames

2017-04-06 Thread John Ferlan
Unify the *ListDevice API into virnodedeviceobj.c from node_device_driver and test_driver. The only real difference between the two is that the test driver doesn't call the aclfilter API. The name of the new API follows that of other drivers to "GetNames". NB: Change some variable names to match

Re: [libvirt] [PATCH] Expose resource control capabilites on cache bank

2017-04-06 Thread Eli Qiao
On Thursday, 6 April 2017 at 5:51 PM, Daniel P. Berrange wrote: > On Thu, Apr 06, 2017 at 11:49:14AM +0200, Martin Kletzander wrote: > > On Thu, Apr 06, 2017 at 04:20:06PM +0800, Eli Qiao wrote: > > > This patch is based on Martin's cache branch. > > > > > > This patch amends the cache bank

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

2017-04-06 Thread Andrea Bolognani
On Wed, 2017-04-05 at 15:04 +0200, 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. >

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

2017-04-06 Thread John Ferlan
>> >> So what's the output from a "iscsiadm --mode session" on Michal's >> machine? And then if there is a duplicate - how did it happen? > > # iscsiadm --mode session > tcp: [31] 10.34.126.253:3260,1 iqn.2017-03.com.mprivozn:server > tcp: [32] virt-iscsi-server.usersys.redhat.com:3260,1 >

Re: [libvirt] [PATCH] Expose resource control capabilites on cache bank

2017-04-06 Thread Eli Qiao
On Thursday, 6 April 2017 at 5:49 PM, Martin Kletzander wrote: > On Thu, Apr 06, 2017 at 04:20:06PM +0800, Eli Qiao wrote: > > This patch is based on Martin's cache branch. > > > > This patch amends the cache bank capability as follow: > > > > > > > > > > > > > > > Were we

Re: [libvirt] [PATCH] Expose resource control capabilites on cache bank

2017-04-06 Thread Daniel P. Berrange
On Thu, Apr 06, 2017 at 06:29:47PM +0800, Eli Qiao wrote: > > > On Thursday, 6 April 2017 at 6:10 PM, Daniel P. Berrange wrote: > > > On Thu, Apr 06, 2017 at 12:05:54PM +0200, Martin Kletzander wrote: > > > On Thu, Apr 06, 2017 at 10:51:44AM +0100, Daniel P. Berrange wrote: > > > > On Thu, Apr

Re: [libvirt] [PATCH] Expose resource control capabilites on cache bank

2017-04-06 Thread Eli Qiao
On Thursday, 6 April 2017 at 5:49 PM, Martin Kletzander wrote: > On Thu, Apr 06, 2017 at 04:20:06PM +0800, Eli Qiao wrote: > > This patch is based on Martin's cache branch. > > > > This patch amends the cache bank capability as follow: > > > > > > > > > > > > > > > Were we

Re: [libvirt] [PATCH] Expose resource control capabilites on cache bank

2017-04-06 Thread Eli Qiao
On Thursday, 6 April 2017 at 6:10 PM, Daniel P. Berrange wrote: > On Thu, Apr 06, 2017 at 12:05:54PM +0200, Martin Kletzander wrote: > > On Thu, Apr 06, 2017 at 10:51:44AM +0100, Daniel P. Berrange wrote: > > > On Thu, Apr 06, 2017 at 11:49:14AM +0200, Martin Kletzander wrote: > > > > On Thu,

Re: [libvirt] [PATCH] leasetime support per and

2017-04-06 Thread Daniel P. Berrange
Sorry, we missed this 2nd patch posting. FYI, when sending updated versions of patches, we generally recommend to send them as a new top level thread, with 'PATCH v2' in the subject line, not as reply to the v1 patch. We find that makes it less likely to miss the second version when processing

Re: [libvirt] [PATCH] Expose resource control capabilites on cache bank

2017-04-06 Thread Daniel P. Berrange
On Thu, Apr 06, 2017 at 12:05:54PM +0200, Martin Kletzander wrote: > On Thu, Apr 06, 2017 at 10:51:44AM +0100, Daniel P. Berrange wrote: > > On Thu, Apr 06, 2017 at 11:49:14AM +0200, Martin Kletzander wrote: > > > On Thu, Apr 06, 2017 at 04:20:06PM +0800, Eli Qiao wrote: > > > > This patch is

Re: [libvirt] [PATCH] Expose resource control capabilites on cache bank

2017-04-06 Thread Martin Kletzander
On Thu, Apr 06, 2017 at 10:51:44AM +0100, Daniel P. Berrange wrote: On Thu, Apr 06, 2017 at 11:49:14AM +0200, Martin Kletzander wrote: On Thu, Apr 06, 2017 at 04:20:06PM +0800, Eli Qiao wrote: > This patch is based on Martin's cache branch. > > This patch amends the cache bank capability as

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

2017-04-06 Thread Erik Skultety
On Thu, Apr 06, 2017 at 11:52:54AM +0200, Martin Kletzander wrote: > On Thu, Apr 06, 2017 at 11:29:21AM +0200, Erik Skultety wrote: > > On Thu, Apr 06, 2017 at 11:12:54AM +0200, Martin Kletzander wrote: > > > On Thu, Apr 06, 2017 at 09:50:49AM +0200, Erik Skultety wrote: > > > > On Wed, Apr 05,

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

2017-04-06 Thread Martin Kletzander
On Thu, Apr 06, 2017 at 11:33:03AM +0200, Andrea Bolognani wrote: On Thu, 2017-04-06 at 10:00 +0200, Martin Kletzander wrote: > @@ -8,6 +8,10 @@ > # include >  > # include "qemu/qemu_capabilities.h" > +# define __QEMU_CAPSPRIV_H_ALLOW__ > +# include "qemu/qemu_capspriv.h" > +# undef

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

2017-04-06 Thread Martin Kletzander
On Thu, Apr 06, 2017 at 11:29:21AM +0200, Erik Skultety wrote: On Thu, Apr 06, 2017 at 11:12:54AM +0200, Martin Kletzander wrote: On Thu, Apr 06, 2017 at 09:50:49AM +0200, Erik Skultety wrote: > On Wed, Apr 05, 2017 at 04:36:24PM +0200, Martin Kletzander wrote: > > If formatting NUMA topology

Re: [libvirt] [PATCH] Expose resource control capabilites on cache bank

2017-04-06 Thread Daniel P. Berrange
On Thu, Apr 06, 2017 at 11:49:14AM +0200, Martin Kletzander wrote: > On Thu, Apr 06, 2017 at 04:20:06PM +0800, Eli Qiao wrote: > > This patch is based on Martin's cache branch. > > > > This patch amends the cache bank capability as follow: > > > > > > > > > > Either the XML is malformed,

Re: [libvirt] [PATCH] Expose resource control capabilites on cache bank

2017-04-06 Thread Martin Kletzander
On Thu, Apr 06, 2017 at 04:20:06PM +0800, Eli Qiao wrote: This patch is based on Martin's cache branch. This patch amends the cache bank capability as follow: Were we exposing the number of CLoS IDs before? Was there a discussion about it? Do we want to expose them? Probably yes,

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

2017-04-06 Thread Ján Tomko
On Wed, Apr 05, 2017 at 04:41:57PM +0200, Andrea Bolognani wrote: 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

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

2017-04-06 Thread Andrea Bolognani
On Thu, 2017-04-06 at 10:00 +0200, Martin Kletzander wrote: > > @@ -8,6 +8,10 @@ > > # include > >  > > # include "qemu/qemu_capabilities.h" > > +# define __QEMU_CAPSPRIV_H_ALLOW__ > > +# include "qemu/qemu_capspriv.h" > > +# undef __QEMU_CAPSPRIV_H_ALLOW__ > > + >  > We should, ideally, make

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

2017-04-06 Thread Erik Skultety
On Thu, Apr 06, 2017 at 11:12:54AM +0200, Martin Kletzander wrote: > On Thu, Apr 06, 2017 at 09:50:49AM +0200, Erik Skultety wrote: > > On Wed, Apr 05, 2017 at 04:36:24PM +0200, Martin Kletzander wrote: > > > If formatting NUMA topology fails, the function returns immediatelly, > > > but the

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

2017-04-06 Thread Martin Kletzander
On Thu, Apr 06, 2017 at 02:04:04PM +0800, Eli Qiao wrote: + +VIR_ENUM_IMPL(virCache, VIR_CACHE_TYPE_LAST, + "unified", + "instruction", + "data") + }; +typedef enum { + VIR_CACHE_TYPE_DATA, + VIR_CACHE_TYPE_INSTRUCTION, + VIR_CACHE_TYPE_UNIFIED, + + VIR_CACHE_TYPE_LAST +} virCacheType; +

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

2017-04-06 Thread Martin Kletzander
On Thu, Apr 06, 2017 at 09:50:49AM +0200, Erik Skultety wrote: On Wed, Apr 05, 2017 at 04:36:24PM +0200, Martin Kletzander wrote: If formatting NUMA topology fails, the function returns immediatelly, but the buffer structure allocated on the stack references lot of heap-allocated memory and

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

2017-04-06 Thread Martin Kletzander
On Thu, Apr 06, 2017 at 09:38:35AM +0800, Eli Qiao wrote: 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

[libvirt] [PATCH] Expose resource control capabilites on cache bank

2017-04-06 Thread Eli Qiao
This patch is based on Martin's cache branch. This patch amends the cache bank capability as follow: Along with vircaps2xmltest case updated. Signed-off-by: Eli Qiao --- src/conf/capabilities.c | 112 +--

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

2017-04-06 Thread Martin Kletzander
On Wed, Apr 05, 2017 at 04:41:57PM +0200, Andrea Bolognani wrote: 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

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

2017-04-06 Thread Peter Krempa
On Thu, Apr 06, 2017 at 09:50:49 +0200, Erik Skultety wrote: > On Wed, Apr 05, 2017 at 04:36:24PM +0200, Martin Kletzander wrote: > > If formatting NUMA topology fails, the function returns immediatelly, > > but the buffer structure allocated on the stack references lot of > > heap-allocated

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

2017-04-06 Thread Peter Krempa
On Thu, Apr 06, 2017 at 09:53:11 +0200, Andrea Bolognani wrote: > The contents of volname would be leaked if the function were > to be passed an invalid pooltype by the caller. Which won't ever happen. > Make sure the memory is released instead. > --- ACK signature.asc Description: PGP

[libvirt] [PATCH 9/8] qemu: Don't overwrite existing error in qemuMigrationReset

2017-04-06 Thread Jiri Denemark
https://bugzilla.redhat.com/show_bug.cgi?id=1439130 Signed-off-by: Jiri Denemark --- src/qemu/qemu_migration.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 1feb320b8..d8222fe3b

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

2017-04-06 Thread Erik Skultety
On Wed, Apr 05, 2017 at 04:36:25PM +0200, Martin Kletzander wrote: > 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

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

2017-04-06 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. --- Changes from v1: * use VIR_STEAL_PTR() instead of open-coding it. src/storage/storage_util.c | 8 1 file changed, 4

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

2017-04-06 Thread Erik Skultety
On Wed, Apr 05, 2017 at 04:36:24PM +0200, Martin Kletzander wrote: > 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

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

2017-04-06 Thread Andrea Bolognani
On Thu, 2017-04-06 at 08:29 +0200, Peter Krempa wrote: > > If you went with this option, then VIR_STEAL_PTR(src->dir, volname); and > > VIR_STEAL_PTR(src->name, volname); instead of inlining. >  > I vote for this. >  > > And as some would say the comment is "obvious". >  > And for this. Me too. I

Re: [libvirt] creating stream

2017-04-06 Thread Vasiliy Tolstov
2017-04-06 8:35 GMT+03:00 Michal Privoznik : > Still, you will lack support for some drivers (e.g. ESX, Hyperv, XEN, local > test driver). Why do you want to hook on the RPC anyway? My use case only qemu, so all the simple. Also i think that integration tests covers changes

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

2017-04-06 Thread Peter Krempa
On Wed, Apr 05, 2017 at 12:40:09 -0400, John Ferlan wrote: > > > 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. > > --- > >

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

2017-04-06 Thread Eli Qiao
> + > +VIR_ENUM_IMPL(virCache, VIR_CACHE_TYPE_LAST, > + "unified", > + "instruction", > + "data") > + > }; > > +typedef enum { > + VIR_CACHE_TYPE_DATA, > + VIR_CACHE_TYPE_INSTRUCTION, > + VIR_CACHE_TYPE_UNIFIED, > + > + VIR_CACHE_TYPE_LAST > +} virCacheType; > + The sequence is wrong, it