Re: [libvirt] [PATCH v2] lib: Add note that bulk stats API queries may overrun RPC buffers

2017-05-24 Thread Michal Privoznik
On 05/24/2017 09:30 PM, Martin Kletzander wrote: > On Wed, May 24, 2017 at 05:12:06PM +0200, Michal Privoznik wrote: >> On 05/24/2017 04:58 PM, Richard W.M. Jones wrote: >>> On Wed, May 24, 2017 at 04:16:45PM +0200, Michal Privoznik wrote: On 05/24/2017 02:47 PM, Richard W.M. Jones wrote:

Re: [libvirt] [PATCH v2] lib: Add note that bulk stats API queries may overrun RPC buffers

2017-05-24 Thread Martin Kletzander
On Wed, May 24, 2017 at 05:12:06PM +0200, Michal Privoznik wrote: On 05/24/2017 04:58 PM, Richard W.M. Jones wrote: On Wed, May 24, 2017 at 04:16:45PM +0200, Michal Privoznik wrote: On 05/24/2017 02:47 PM, Richard W.M. Jones wrote: On Wed, May 24, 2017 at 12:49:58PM +0200, Michal Privoznik wr

Re: [libvirt] [PATCH v2] lib: Add note that bulk stats API queries may overrun RPC buffers

2017-05-24 Thread Michal Privoznik
On 05/24/2017 04:58 PM, Richard W.M. Jones wrote: > On Wed, May 24, 2017 at 04:16:45PM +0200, Michal Privoznik wrote: >> On 05/24/2017 02:47 PM, Richard W.M. Jones wrote: >>> >>> On Wed, May 24, 2017 at 12:49:58PM +0200, Michal Privoznik wrote: That's quite exact. I mean the word 'guessing'. W

Re: [libvirt] [PATCH v2] lib: Add note that bulk stats API queries may overrun RPC buffers

2017-05-24 Thread Richard W.M. Jones
On Wed, May 24, 2017 at 04:16:45PM +0200, Michal Privoznik wrote: > On 05/24/2017 02:47 PM, Richard W.M. Jones wrote: > > > > On Wed, May 24, 2017 at 12:49:58PM +0200, Michal Privoznik wrote: > >> That's quite exact. I mean the word 'guessing'. We can't really provide > >> reliable way of dealing

Re: [libvirt] [PATCH v2] lib: Add note that bulk stats API queries may overrun RPC buffers

2017-05-24 Thread Martin Kletzander
On Wed, May 24, 2017 at 04:09:35PM +0200, Michal Privoznik wrote: On 05/24/2017 02:42 PM, Richard W.M. Jones wrote: On Tue, May 23, 2017 at 05:07:40PM +0200, Michal Privoznik wrote: Because: https://www.redhat.com/archives/libvir-list/2017-May/msg00088.html I don't think this is a reason at

Re: [libvirt] [PATCH v2] lib: Add note that bulk stats API queries may overrun RPC buffers

2017-05-24 Thread Michal Privoznik
On 05/24/2017 02:47 PM, Richard W.M. Jones wrote: > > On Wed, May 24, 2017 at 12:49:58PM +0200, Michal Privoznik wrote: >> That's quite exact. I mean the word 'guessing'. We can't really provide >> reliable way of dealing with what you're suggesting (unless we cut the >> limit really small) nor we

Re: [libvirt] [PATCH v2] lib: Add note that bulk stats API queries may overrun RPC buffers

2017-05-24 Thread Michal Privoznik
On 05/24/2017 02:42 PM, Richard W.M. Jones wrote: > On Tue, May 23, 2017 at 05:07:40PM +0200, Michal Privoznik wrote: >> Because: >> >> https://www.redhat.com/archives/libvir-list/2017-May/msg00088.html > > I don't think this is a reason at all. > > Libguestfs uses an RPC system which was modelle

Re: [libvirt] [PATCH v2] lib: Add note that bulk stats API queries may overrun RPC buffers

2017-05-24 Thread Martin Kletzander
On Wed, May 24, 2017 at 01:42:44PM +0100, Richard W.M. Jones wrote: On Tue, May 23, 2017 at 05:07:40PM +0200, Michal Privoznik wrote: Because: https://www.redhat.com/archives/libvir-list/2017-May/msg00088.html I don't think this is a reason at all. Libguestfs uses an RPC system which was mod

Re: [libvirt] [PATCH v2] lib: Add note that bulk stats API queries may overrun RPC buffers

2017-05-24 Thread Richard W.M. Jones
On Wed, May 24, 2017 at 12:49:58PM +0200, Michal Privoznik wrote: > That's quite exact. I mean the word 'guessing'. We can't really provide > reliable way of dealing with what you're suggesting (unless we cut the > limit really small) nor we can guarantee atomicity. Therefore I think it > would be

Re: [libvirt] [PATCH v2] lib: Add note that bulk stats API queries may overrun RPC buffers

2017-05-24 Thread Richard W.M. Jones
On Tue, May 23, 2017 at 05:07:40PM +0200, Michal Privoznik wrote: > Because: > > https://www.redhat.com/archives/libvir-list/2017-May/msg00088.html I don't think this is a reason at all. Libguestfs uses an RPC system which was modelled on the libvirt one, and has exactly the same problem with me

Re: [libvirt] [PATCH v2] lib: Add note that bulk stats API queries may overrun RPC buffers

2017-05-24 Thread Michal Privoznik
On 05/24/2017 12:55 PM, Martin Kletzander wrote: > > > No, this has nothing to do with RPC. Let me "pseudocode" this: > > > int > virConnectGetAllDomainStats(virConnectPtr conn, >..., >unsigned int flags) > { >bool legacy = flags & VI

Re: [libvirt] [PATCH v2] lib: Add note that bulk stats API queries may overrun RPC buffers

2017-05-24 Thread Martin Kletzander
On Wed, May 24, 2017 at 12:54:26PM +0200, Peter Krempa wrote: On Wed, May 24, 2017 at 12:49:58 +0200, Michal Privoznik wrote: On 05/24/2017 12:32 PM, Martin Kletzander wrote: > On Tue, May 23, 2017 at 05:29:52PM +0200, Peter Krempa wrote: >> On Tue, May 23, 2017 at 17:19:53 +0200, Martin Kletzan

Re: [libvirt] [PATCH v2] lib: Add note that bulk stats API queries may overrun RPC buffers

2017-05-24 Thread Martin Kletzander
On Tue, May 23, 2017 at 05:29:28PM +0200, Michal Privoznik wrote: On 05/23/2017 05:19 PM, Martin Kletzander wrote: On Tue, May 23, 2017 at 05:07:40PM +0200, Michal Privoznik wrote: On 05/23/2017 04:35 PM, Martin Kletzander wrote: On Tue, May 23, 2017 at 04:23:30PM +0200, Peter Krempa wrote: H

Re: [libvirt] [PATCH v2] lib: Add note that bulk stats API queries may overrun RPC buffers

2017-05-24 Thread Peter Krempa
On Wed, May 24, 2017 at 12:49:58 +0200, Michal Privoznik wrote: > On 05/24/2017 12:32 PM, Martin Kletzander wrote: > > On Tue, May 23, 2017 at 05:29:52PM +0200, Peter Krempa wrote: > >> On Tue, May 23, 2017 at 17:19:53 +0200, Martin Kletzander wrote: > >>> On Tue, May 23, 2017 at 05:07:40PM +0200,

Re: [libvirt] [PATCH v2] lib: Add note that bulk stats API queries may overrun RPC buffers

2017-05-24 Thread Michal Privoznik
On 05/24/2017 12:32 PM, Martin Kletzander wrote: > On Tue, May 23, 2017 at 05:29:52PM +0200, Peter Krempa wrote: >> On Tue, May 23, 2017 at 17:19:53 +0200, Martin Kletzander wrote: >>> On Tue, May 23, 2017 at 05:07:40PM +0200, Michal Privoznik wrote: >>> > On 05/23/2017 04:35 PM, Martin Kletzander

Re: [libvirt] [PATCH v2] lib: Add note that bulk stats API queries may overrun RPC buffers

2017-05-24 Thread Peter Krempa
On Wed, May 24, 2017 at 12:32:05 +0200, Martin Kletzander wrote: > On Tue, May 23, 2017 at 05:29:52PM +0200, Peter Krempa wrote: > > On Tue, May 23, 2017 at 17:19:53 +0200, Martin Kletzander wrote: > > > On Tue, May 23, 2017 at 05:07:40PM +0200, Michal Privoznik wrote: > > > > On 05/23/2017 04:35 P

Re: [libvirt] [PATCH v2] lib: Add note that bulk stats API queries may overrun RPC buffers

2017-05-24 Thread Martin Kletzander
On Tue, May 23, 2017 at 05:29:52PM +0200, Peter Krempa wrote: On Tue, May 23, 2017 at 17:19:53 +0200, Martin Kletzander wrote: On Tue, May 23, 2017 at 05:07:40PM +0200, Michal Privoznik wrote: > On 05/23/2017 04:35 PM, Martin Kletzander wrote: > > On Tue, May 23, 2017 at 04:23:30PM +0200, Peter

Re: [libvirt] [PATCH v2] lib: Add note that bulk stats API queries may overrun RPC buffers

2017-05-23 Thread Peter Krempa
On Tue, May 23, 2017 at 17:19:53 +0200, Martin Kletzander wrote: > On Tue, May 23, 2017 at 05:07:40PM +0200, Michal Privoznik wrote: > > On 05/23/2017 04:35 PM, Martin Kletzander wrote: > > > On Tue, May 23, 2017 at 04:23:30PM +0200, Peter Krempa wrote: [...] > > > > + * Note that this API is pro

Re: [libvirt] [PATCH v2] lib: Add note that bulk stats API queries may overrun RPC buffers

2017-05-23 Thread Michal Privoznik
On 05/23/2017 05:19 PM, Martin Kletzander wrote: > On Tue, May 23, 2017 at 05:07:40PM +0200, Michal Privoznik wrote: >> On 05/23/2017 04:35 PM, Martin Kletzander wrote: >>> On Tue, May 23, 2017 at 04:23:30PM +0200, Peter Krempa wrote: Hint that the users should limit the number of VMs queried

Re: [libvirt] [PATCH v2] lib: Add note that bulk stats API queries may overrun RPC buffers

2017-05-23 Thread Martin Kletzander
On Tue, May 23, 2017 at 05:07:40PM +0200, Michal Privoznik wrote: On 05/23/2017 04:35 PM, Martin Kletzander wrote: On Tue, May 23, 2017 at 04:23:30PM +0200, Peter Krempa wrote: Hint that the users should limit the number of VMs queried in the bulk stats API. --- v2: - added a suggestion of the

Re: [libvirt] [PATCH v2] lib: Add note that bulk stats API queries may overrun RPC buffers

2017-05-23 Thread Michal Privoznik
On 05/23/2017 04:35 PM, Martin Kletzander wrote: > On Tue, May 23, 2017 at 04:23:30PM +0200, Peter Krempa wrote: >> Hint that the users should limit the number of VMs queried in the bulk >> stats API. >> --- >> v2: >> - added a suggestion of the number of queried VMs (valid after bump to >> 32M mes

Re: [libvirt] [PATCH v2] lib: Add note that bulk stats API queries may overrun RPC buffers

2017-05-23 Thread Martin Kletzander
On Tue, May 23, 2017 at 04:23:30PM +0200, Peter Krempa wrote: Hint that the users should limit the number of VMs queried in the bulk stats API. --- v2: - added a suggestion of the number of queried VMs (valid after bump to 32M message) src/libvirt-domain.c | 8 1 file changed, 8 inserti

[libvirt] [PATCH v2] lib: Add note that bulk stats API queries may overrun RPC buffers

2017-05-23 Thread Peter Krempa
Hint that the users should limit the number of VMs queried in the bulk stats API. --- v2: - added a suggestion of the number of queried VMs (valid after bump to 32M message) src/libvirt-domain.c | 8 1 file changed, 8 insertions(+) diff --git a/src/libvirt-domain.c b/src/libvirt-domain