Re: [libvirt] RFC: Exposing "ready" bool (of `query-block-jobs`) or QMP BLOCK_JOB_READY event

2016-10-07 Thread Eric Blake
On 10/07/2016 02:09 AM, Peter Krempa wrote: >> The existing virDomainGetBlockJobInfo() can't be extended, but it can be >> fixed to quit reporting cur==end when ready:false. > > Yes, I agree about this one (although I don't really like it [1]), but > this one will actually fix software not listen

Re: [libvirt] RFC: Exposing "ready" bool (of `query-block-jobs`) or QMP BLOCK_JOB_READY event

2016-10-07 Thread Peter Krempa
On Thu, Oct 06, 2016 at 15:51:38 -0500, Eric Blake wrote: > On 10/06/2016 10:06 AM, Kashyap Chamarthy wrote: > > On Thu, Oct 06, 2016 at 09:25:26AM -0500, Eric Blake wrote: > >> On 10/06/2016 06:34 AM, Peter Krempa wrote: > > > > [...] > > > >>> We expose the state of the copy job in the XML and

Re: [libvirt] RFC: Exposing "ready" bool (of `query-block-jobs`) or QMP BLOCK_JOB_READY event

2016-10-06 Thread Eric Blake
On 10/06/2016 10:06 AM, Kashyap Chamarthy wrote: > On Thu, Oct 06, 2016 at 09:25:26AM -0500, Eric Blake wrote: >> On 10/06/2016 06:34 AM, Peter Krempa wrote: > > [...] > >>> We expose the state of the copy job in the XML and forward the READY >>> event from qemu to the users. >> >> I was not awar

Re: [libvirt] RFC: Exposing "ready" bool (of `query-block-jobs`) or QMP BLOCK_JOB_READY event

2016-10-06 Thread John Snow
On 10/06/2016 10:25 AM, Eric Blake wrote: On 10/06/2016 06:34 AM, Peter Krempa wrote: Currently libvirt block APIs (& consequently higher-level applications like Nova which use these APIs) rely on polling for job completion via libvirt is _not_ polling the data. Libvirt relies on the events

Re: [libvirt] RFC: Exposing "ready" bool (of `query-block-jobs`) or QMP BLOCK_JOB_READY event

2016-10-06 Thread Kashyap Chamarthy
On Thu, Oct 06, 2016 at 09:25:26AM -0500, Eric Blake wrote: > On 10/06/2016 06:34 AM, Peter Krempa wrote: [...] > > We expose the state of the copy job in the XML and forward the READY > > event from qemu to the users. > > I was not aware of that when I was chatting on IRC yesterday; that's > us

Re: [libvirt] RFC: Exposing "ready" bool (of `query-block-jobs`) or QMP BLOCK_JOB_READY event

2016-10-06 Thread Eric Blake
On 10/06/2016 06:34 AM, Peter Krempa wrote: >> Currently libvirt block APIs (& consequently higher-level applications >> like Nova which use these APIs) rely on polling for job completion via > > libvirt is _not_ polling the data. Libvirt relies on the events from > qemu which are also exposed as

Re: [libvirt] RFC: Exposing "ready" bool (of `query-block-jobs`) or QMP BLOCK_JOB_READY event

2016-10-06 Thread Kashyap Chamarthy
On Thu, Oct 06, 2016 at 01:34:59PM +0200, Peter Krempa wrote: > On Thu, Oct 06, 2016 at 12:26:50 +0200, Kashyap Chamarthy wrote: [...] > > And, libvirt was fixed to use the above field in this commit (available > > in libvirt v1.2.18 or above): > > > > http://libvirt.org/git/?p=libvirt.git;a

Re: [libvirt] RFC: Exposing "ready" bool (of `query-block-jobs`) or QMP BLOCK_JOB_READY event

2016-10-06 Thread Peter Krempa
On Thu, Oct 06, 2016 at 12:26:50 +0200, Kashyap Chamarthy wrote: > Backround > - > > For QEMU block device jobs, the "ready" boolean field (part of QMP > `query-block-jobs`) was introduced in commit ef6dbf1 (available in QEMU > v2.2.0 or above): > > http://git.qemu.org/?p=qemu.git;a=c

[libvirt] RFC: Exposing "ready" bool (of `query-block-jobs`) or QMP BLOCK_JOB_READY event

2016-10-06 Thread Kashyap Chamarthy
Backround - For QEMU block device jobs, the "ready" boolean field (part of QMP `query-block-jobs`) was introduced in commit ef6dbf1 (available in QEMU v2.2.0 or above): http://git.qemu.org/?p=qemu.git;a=commitdiff;h=ef6dbf1e4 -- blockjob: Add "ready" field "When a block job s