qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Christophe de Dinechin <dinechin@redhat.com>
To: qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
	Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
	qemu-block@nongnu.org, libvir-list@redhat.com, mreitz@redhat.com,
	den@openvz.org, John Snow <jsnow@redhat.com>
Subject: Re: [Qemu-devel] [libvirt] [PATCH 2/2] qapi: deprecate implicit filters
Date: Thu, 29 Aug 2019 18:45:29 +0200	[thread overview]
Message-ID: <m1lfvbex92.fsf@redhat.com> (raw)
In-Reply-To: <87d0h6zfrt.fsf@dusky.pond.sub.org>


Markus Armbruster writes:

> Peter Krempa <pkrempa@redhat.com> writes:
>
[...]
>> From my experience users report non-fatal messages mostly only if it is
>> spamming the system log. One of instances are very unlikely to be
>> noticed.
>>
>> In my experience it's better to notify us in libvirt of such change and
>> we will try our best to fix it.
>
> How to best alert the layers above QEMU was one of the topic of the KVM
> Forum 2018 BoF on deprecating stuff.  Minutes:
>
>     Message-ID: <87mur0ls8o.fsf@dusky.pond.sub.org>
>     https://lists.nongnu.org/archive/html/qemu-devel/2018-10/msg05828.html
>
> Relevant part:
>
> * We need to communicate "you're using something that is deprecated".
>   How?  Right now, we print a deprecation message.  Okay when humans use
>   QEMU directly in a shell.  However, when QEMU sits at the bottom of a
>   software stack, the message will likely end up in a log file that is
>   effectively write-only.
>
>   - The one way to get people read log files is crashing their
>     application.  A command line option --future could make QEMU crash
>     right after printing a deprecation message.  This could help with
>     finding use of deprecated features in a testing environment.
>
>   - A less destructive way to grab people's attention is to make things
>     run really, really slow: have QEMU go to sleep for a while after
>     printing a deprecation message.
>
>   - We can also pass the buck to the next layer up: emit a QMP event.
>
>     Sadly, by the time the next layer connects to QMP, plenty of stuff
>     already happened.  We'd have to buffer deprecation events somehow.
>
>     What would libvirt do with such an event?  Log it, taint the domain,
>     emit a (libvirt) event to pass it on to the next layer up.
>
>   - A completely different idea is to have a configuratin linter.  To
>     support doing this at the libvirt level, QEMU could expose "is
>     deprecated" in interface introspection.  Feels feasible for QMP,
>     where we already have sufficiently expressive introspection.  For
>     CLI, we'd first have to provide that (but we want that anyway).
>
>   - We might also want to dispay deprecation messages in QEMU's GUI
>     somehow, or on serial consoles.

Sorry for catching up late, this mail thread happened during my PTO.

I remember bringing up at the time [1] that the correct solution needs
to take into account usage models that vary from

- a workstation case, where displaying an error box is easy and
  convenient,

- to local headless VMs where system-level notification would do the job
  better, allowing us to leverage things like system-wide email notifications

- to large-scale collections of VMs managed by some layered product,
  where the correct reporting would be through something like Insights,
  i.e. you don't scan individual logs, you want something like "913 VMs
  are using deprecated X"

To me, that implies that we need to have a clear division of roles, with
a standard way to

a) produce the errors,
b) propagate them,
c) consume them (at least up to libvirt)

Notice that this work has already been done for "real" errors,
i.e. there is a real QAPI notion of "errors". AFAICT, warn_report does
not connect to it, though, it goes through error_vprintf which is really
just basic logging.

So would it make sense to:

1. Add a deprecation_report() alongside warn_report()?

2. Connect warn_report() and all the error_vprintf output to QAPI,
   e.g. using John's suggestion of adding the messages using some
   "warning" or "deprecated" tag?

3. Teach libvirt how to consume that new tag and pass it along?


[1] https://lists.nongnu.org/archive/html/qemu-devel/2018-10/msg06131.html


--
Cheers,
Christophe de Dinechin (IRC c3d)


  reply	other threads:[~2019-08-29 16:47 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-14 10:07 [Qemu-devel] [PATCH 0/2] Deprecate implicit filters Vladimir Sementsov-Ogievskiy
2019-08-14 10:07 ` [Qemu-devel] [PATCH 1/2] qapi: deprecate drive-mirror and drive-backup Vladimir Sementsov-Ogievskiy
2019-08-14 19:22   ` John Snow
2019-08-15  7:44     ` [Qemu-devel] [libvirt] " Peter Krempa
2019-08-15 21:24       ` John Snow
2019-08-14 10:07 ` [Qemu-devel] [PATCH 2/2] qapi: deprecate implicit filters Vladimir Sementsov-Ogievskiy
2019-08-14 19:27   ` John Snow
2019-08-14 20:34     ` [Qemu-devel] [Qemu-block] " Maxim Levitsky
2019-08-15 10:49     ` [Qemu-devel] " Kevin Wolf
2019-08-15 11:45       ` [Qemu-devel] [libvirt] " Peter Krempa
2019-08-15 14:04         ` Markus Armbruster
2019-08-29 16:45           ` Christophe de Dinechin [this message]
2019-08-29 17:57             ` John Snow
2019-08-30 10:07               ` Christophe de Dinechin
2019-08-30 18:11                 ` John Snow
2019-09-02 12:04                   ` Kevin Wolf
2019-11-22  8:41             ` Markus Armbruster
2019-11-22 11:32               ` Christophe de Dinechin
2019-08-15 16:07       ` [Qemu-devel] " John Snow
2019-08-15 16:48         ` Kevin Wolf
2019-08-15 17:33           ` John Snow
2019-08-15 19:24           ` Markus Armbruster
2019-08-16  8:20             ` Kevin Wolf
2019-08-16 12:33               ` Markus Armbruster
2019-08-16 12:58                 ` Vladimir Sementsov-Ogievskiy
2019-08-15 14:16     ` [Qemu-devel] Exposing feature deprecation to machine clients (was: [PATCH 2/2] qapi: deprecate implicit filters) Markus Armbruster
2019-08-15 17:40       ` John Snow
2019-11-07 18:52         ` [Qemu-devel] Exposing feature deprecation to machine clients Philippe Mathieu-Daudé
2019-11-07 19:13           ` Vladimir Sementsov-Ogievskiy
2019-11-08  6:41             ` Deprecating stuff for 4.2 (was: [Qemu-devel] Exposing feature deprecation to machine clients) Markus Armbruster
2019-11-08  9:36               ` Deprecating stuff for 4.2 Vladimir Sementsov-Ogievskiy
2019-11-08  8:35             ` [Qemu-devel] Exposing feature deprecation to machine clients Max Reitz
2019-08-29 15:59     ` [Qemu-devel] [PATCH 2/2] qapi: deprecate implicit filters Christophe de Dinechin
2019-08-29 17:18       ` [Qemu-devel] [Qemu-block] " John Snow
2019-08-23  9:22   ` [Qemu-devel] " Vladimir Sementsov-Ogievskiy
2019-08-27 20:12     ` John Snow
2019-08-28  9:20       ` Vladimir Sementsov-Ogievskiy
2019-08-28 17:48         ` John Snow
2019-08-29 14:44           ` Peter Krempa
2019-08-29 15:17             ` Vladimir Sementsov-Ogievskiy
2019-08-29 17:50               ` John Snow
2019-08-29 15:00           ` Vladimir Sementsov-Ogievskiy
2019-08-29 15:16             ` Vladimir Sementsov-Ogievskiy
2019-09-02 12:14     ` Kevin Wolf

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=m1lfvbex92.fsf@redhat.com \
    --to=dinechin@redhat.com \
    --cc=den@openvz.org \
    --cc=jsnow@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=libvir-list@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=vsementsov@virtuozzo.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).