From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "Markus Armbruster" <armbru@redhat.com>,
qemu-devel@nongnu.org, stefanha@redhat.com,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Peter Krempa" <pkrempa@redhat.com>
Subject: Re: [PULL 35/35] docs: mark '-mon' as deprecated in favour of -object
Date: Mon, 24 Aug 2026 12:39:58 +0100 [thread overview]
Message-ID: <aowtji-323FFQ5AH@redhat.com> (raw)
In-Reply-To: <CAFEAcA-bN5aRaZPsiZoT_zpoZkiTgUupGnCn4OaWNG_rMRw7=g@mail.gmail.com>
On Mon, Aug 24, 2026 at 11:58:52AM +0100, Peter Maydell wrote:
> On Mon, 24 Aug 2026 at 11:48, Markus Armbruster <armbru@redhat.com> wrote:
> > Peter Maydell <peter.maydell@linaro.org> writes:
> > > Can we be more precise in deprecation messages of this kind, please?
> > > This warning is not enough for the user to be able to figure out how
> > > to change their existing command line.
> > >
> > > I had to look into deprecated.rst, check the git history to see which
> > > commit added the deprecation, then find out how this commit was adjusting
> > > the examples in the tree.
> > >
> > > Notably, "-object monitor-hmp" appears to require an "id=" despite
> > > nothing actually caring what that ID is,
> >
> > Yes, -object requires @id regardless of object type. It calls
> > object_new_with_props_from_qdict() via user_creatable_add_qapi().
> > Together, they create the object at /objects/ID.
>
> Yes, but usually you need the ID because it's going to plug into
> some other option somewhere else; other options like -drive
> can take an id=, but don't insist on it if you don't need it, and
> some options like chardev are only useful if you connect them to
> something else by using the ID elsewhere in the command line, so
> whether they require id= or not never comes up. So the idea of an
> option requiring an ID even though it is never referenced anywhere
> else may well be new to the user.
FYI, the ID for the monitor can be used with object-del QMP/HMP
commands.
> Mostly I mention it because otherwise I think the typical user is
> going to do what I did, i.e. replace "-mon" with "-object monitor-hmp"
> and then immediately get a different error from QEMU. The warning
> being more precise could save them a step.
I was thinking that the user would do 'man qemu' where we have
docs for "-object", for each object type including "monitor-hmp/qmp",
which are shown taking an ID parameter.
>
> > > and the warning message
> > > doesn't say how to determine whether your existing -mon option
> > > should be changed to monitor-hmp or monitor-qmp. The deprecated.rst
> > > docs do say that part, but don't mention the ID bit.
> >
> > Fair points.
> >
> > Is this just "do better in the future", or are you also asking for a
> > patch to improve this warning?
>
> Both, preferably :-)
>
> There's an argument that the deprecation warning could look at the
> option the user actually provided and emit the exact right new
> option to use instead. But I don't think that's something we've
> ever done before for deprecations.
Essentially we have three distinct places with info - the deprecation
message at runtime, the deprecated.rst docs, and the qemu.1 manual
page. It is a trade off between how much effort we want to put into
each area.
For humans I anticipated they'd be mostly using -monitor / -qmp
convenience options, with -mon mostly used by machines which are
already familiar with -object usage already.
With regards,
Daniel
--
|: https://berrange.com ~~ https://hachyderm.io/@berrange :|
|: https://libvirt.org ~~ https://entangle-photo.org :|
|: https://pixelfed.art/berrange ~~ https://fstop138.berrange.com :|
next prev parent reply other threads:[~2026-08-24 11:40 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-07 11:02 [PULL 00/35] Monitor patches for 2026-07-07 Markus Armbruster
2026-07-07 11:02 ` [PULL 01/35] qom: replace 'can_be_deleted' with 'prepare_delete' Markus Armbruster
2026-07-07 11:02 ` [PULL 02/35] monitor: replace 'common' with 'parent_obj' in MonitorHMP Markus Armbruster
2026-07-07 11:02 ` [PULL 03/35] monitor: replace 'common' with 'parent_obj' in MonitorQMP Markus Armbruster
2026-07-07 11:02 ` [PULL 04/35] monitor: rename monitor_init* to monitor_new* Markus Armbruster
2026-07-07 11:02 ` [PULL 05/35] monitor: minimal conversion of monitors to QOM Markus Armbruster
2026-07-07 11:02 ` [PULL 06/35] monitor: pass chardev ID into monitor constructor instead of object Markus Armbruster
2026-07-07 11:02 ` [PULL 07/35] monitor: add 'chardev' property to Monitor base class Markus Armbruster
2026-07-07 11:02 ` [PULL 08/35] monitor: add 'readline' property to HMP Monitor class Markus Armbruster
2026-07-07 11:02 ` [PULL 09/35] monitor: add 'pretty' property to QMP " Markus Armbruster
2026-07-07 11:02 ` [PULL 10/35] monitor: remove 'skip_flush' field Markus Armbruster
2026-07-07 11:02 ` [PULL 11/35] monitor: move monitor_data_(init|destroy) into QOM init/finalize Markus Armbruster
2026-07-07 11:02 ` [PULL 12/35] monitor: use class methods for monitor_vprintf Markus Armbruster
2026-07-07 11:02 ` [PULL 13/35] monitor: use class methods for monitor_qapi_event_emit Markus Armbruster
2026-07-07 11:02 ` [PULL 14/35] monitor: use class methods for monitor_accept_input Markus Armbruster
2026-07-07 11:02 ` [PULL 15/35] monitor: use class method for I/O thread request Markus Armbruster
2026-07-07 11:02 ` [PULL 16/35] monitor: use dynamic cast in monitor_qmp_requests_pop_any_with_lock Markus Armbruster
2026-07-07 11:02 ` [PULL 17/35] util: use dynamic cast in error vreport Markus Armbruster
2026-07-07 11:02 ` [PULL 18/35] monitor: drop unused monitor_cur_is_qmp Markus Armbruster
2026-07-07 11:02 ` [PULL 19/35] monitor: use dynamic cast in QMP commands Markus Armbruster
2026-07-07 11:02 ` [PULL 20/35] monitor: use dynamic cast in monitor_is_hmp_non_interactive Markus Armbruster
2026-07-07 11:02 ` [PULL 21/35] monitor: drop unused monitor_is_qmp method Markus Armbruster
2026-07-07 11:02 ` [PULL 22/35] monitor: eliminate monitor_is_hmp_non_interactive method Markus Armbruster
2026-07-07 11:02 ` [PULL 23/35] monitor: implement "user creatable" interface for adding monitors Markus Armbruster
2026-07-07 11:02 ` [PULL 24/35] monitor: convert from oneshot BH to persistent BH Markus Armbruster
2026-07-07 11:02 ` [PULL 25/35] monitor: reject attempts to delete the current monitor Markus Armbruster
2026-07-07 11:02 ` [PULL 26/35] monitor: protect qemu_chr_fe_accept_input with monitor lock Markus Armbruster
2026-07-07 11:02 ` [PULL 27/35] monitor: implement support for deleting QMP objects Markus Armbruster
2026-07-07 11:02 ` [PULL 28/35] tests/qtest: add tests for dynamic monitor add/remove Markus Armbruster
2026-07-07 11:02 ` [PULL 29/35] tests/functional: add e2e test for dynamic QMP monitor hotplug Markus Armbruster
2026-07-07 11:02 ` [PULL 30/35] tests/functional: add a stress test for monitor hot unplug Markus Armbruster
2026-07-07 11:02 ` [PULL 31/35] qom: add trace events for user creatable create/delete APIs Markus Armbruster
2026-07-07 11:02 ` [PULL 32/35] monitor: add support for auto-deleting monitors upon close Markus Armbruster
2026-07-07 11:02 ` [PULL 33/35] tests: switch from -mon to -object monitor-qmp Markus Armbruster
2026-07-07 11:02 ` [PULL 34/35] qemu-options: document new monitor-hmp and monitor-qmp objects Markus Armbruster
2026-07-07 11:03 ` [PULL 35/35] docs: mark '-mon' as deprecated in favour of -object Markus Armbruster
2026-08-24 10:26 ` Peter Maydell
2026-08-24 10:48 ` Markus Armbruster
2026-08-24 10:58 ` Peter Maydell
2026-08-24 11:39 ` Daniel P. Berrangé [this message]
2026-08-24 11:59 ` Peter Maydell
2026-07-08 5:53 ` [PULL 00/35] Monitor patches for 2026-07-07 Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aowtji-323FFQ5AH@redhat.com \
--to=berrange@redhat.com \
--cc=armbru@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=pkrempa@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.