On 10/05/2016 01:49 PM, John Snow wrote: >> Here we have an additional caller in block/replication.c and qemu-img, >> so the parameters must stay. For qemu-img, nothing changes. For >> replication, the block job events are added as a side effect. >> >> Not sure if we want to emit such events for an internal block job, but >> if we do want the change, it should be explicit. >> > > Hmm, do we want to make it so some jobs are invisible and others are > not? Because as it stands right now, neither case is strictly true. We > only emit cancelled/completed events if it was started via QMP, however > we do emit events for error and ready regardless of who started the job.
Libvirt tries to mirror any block job event it receives to upper layers. But if it cannot figure out which upper-layer disk the event is associated with, it just drops the event. So I think that from the libvirt perspective, you are okay if if you always report job events, even for internal jobs. (Do we have a quick and easy way to set up an internal job event, to double-check if I can produce some sort of libvirt scenario to trigger the event and see that it gets safely ignored?) > > That didn't seem particularly consistent to me; either all events should > be controlled by the job layer itself or none of them should be. > > I opted for "all." > > For "internal" jobs that did not previously emit any events, is it not > true that these jobs still appear in the block job list and are > effectively public regardless? I'd argue that these messages may be of > value for management utilities who are still blocked by these jobs > whether or not they are 'internal' or not. > > I'll push for keeping it mandatory and explicit. If it becomes a > problem, we can always add a 'silent' job property that silences ALL qmp > events, including all completion, error, and ready notices. Completely silencing an internal job seems a little cleaner than having events for the job but not being able to query it. But if nothing breaks by exposing the internal jobs, that seems even easier than trying to decide which jobs are internal and hidden vs. user-requested and public. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature