[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 36/40] job: Add lifecycle QMP commands
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] [PATCH v2 36/40] job: Add lifecycle QMP commands |
Date: |
Tue, 22 May 2018 12:40:08 +0200 |
User-agent: |
Mutt/1.9.1 (2017-09-22) |
Am 18.05.2018 um 20:12 hat Eric Blake geschrieben:
> On 05/18/2018 08:21 AM, Kevin Wolf wrote:
> > This adds QMP commands that control the transition between states of the
> > job lifecycle.
> >
> > Signed-off-by: Kevin Wolf <address@hidden>
> > ---
> > qapi/job.json | 99 +++++++++++++++++++++++++++++++++++++++++++
> > job-qmp.c | 134
> > ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> > MAINTAINERS | 1 +
> > Makefile.objs | 1 +
> > trace-events | 9 ++++
> > 5 files changed, 244 insertions(+)
> > create mode 100644 job-qmp.c
> >
> > +##
> > +# @job-dismiss:
> > +#
> > +# Deletes a job that is in the CONCLUDED state. This command only needs to
> > be
> > +# run explicitly for jobs that don't have automatic dismiss enabled.
>
> Did we decide whether it is valid to expect a job with automatic dismiss
> enabled (old-style block jobs) to use the new job control commands?
"job control commands" is a pretty broad term, so I'd say yes, it's
expected that you can use job-* commands on any job. For example,
job-pause/resume make perfect sense on a job with auto-dismiss=true.
> Or would it be reasonable to require that 'job-dismiss' is an error on
> jobs with auto-dismiss enabled
This, too, but only because it implicitly follows from the condition
specified above: You'll never catch a job in the CONCLUDED state when
you have auto-dismiss=true because it will immediately move on to NULL.
> (as in, if you're going to use new style jobs, you are guaranteed to
> also have auto-dismiss false, because we don't expose a way to change
> that flag in new-style jobs; and if you use old style jobs, all
> management of the job should be done through the old interfaces).
I'm not completely convinced that auto-dismiss=false is the only
"correct" setting. That might be the case for libvirt, but possibly not
for simple ad-hoc scripts with lower requirements.
We don't have any new jobs yet, so whether we expose the auto-* flags
there is a decision yet to be made.
Kevin
- [Qemu-devel] [PATCH v2 26/40] job: Move transactions to Job, (continued)
- [Qemu-devel] [PATCH v2 26/40] job: Move transactions to Job, Kevin Wolf, 2018/05/18
- [Qemu-devel] [PATCH v2 27/40] job: Move completion and cancellation to Job, Kevin Wolf, 2018/05/18
- [Qemu-devel] [PATCH v2 30/40] job: Add job_dismiss(), Kevin Wolf, 2018/05/18
- [Qemu-devel] [PATCH v2 32/40] job: Add job_transition_to_ready(), Kevin Wolf, 2018/05/18
- [Qemu-devel] [PATCH v2 31/40] job: Add job_is_ready(), Kevin Wolf, 2018/05/18
- [Qemu-devel] [PATCH v2 34/40] job: Introduce qapi/job.json, Kevin Wolf, 2018/05/18
- [Qemu-devel] [PATCH v2 36/40] job: Add lifecycle QMP commands, Kevin Wolf, 2018/05/18
- [Qemu-devel] [PATCH v2 37/40] job: Add query-jobs QMP command, Kevin Wolf, 2018/05/18
- [Qemu-devel] [PATCH v2 33/40] job: Move progress fields to Job, Kevin Wolf, 2018/05/18
- [Qemu-devel] [PATCH v2 39/40] iotests: Move qmp_to_opts() to VM, Kevin Wolf, 2018/05/18
- [Qemu-devel] [PATCH v2 38/40] blockjob: Remove BlockJob.driver, Kevin Wolf, 2018/05/18
- [Qemu-devel] [PATCH v2 40/40] qemu-iotests: Test job-* with block jobs, Kevin Wolf, 2018/05/18
- [Qemu-devel] [PATCH v2 35/40] job: Add JOB_STATUS_CHANGE QMP event, Kevin Wolf, 2018/05/18