[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [Qemu-devel] [libvirt] [PATCH 2/2] qapi: deprecate impl

From: John Snow
Subject: Re: [Qemu-block] [Qemu-devel] [libvirt] [PATCH 2/2] qapi: deprecate implicit filters
Date: Thu, 29 Aug 2019 13:57:42 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0

On 8/29/19 12:45 PM, Christophe de Dinechin wrote:
> Markus Armbruster writes:
>> Peter Krempa <address@hidden> 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: <address@hidden>
>>     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,

I started replying to this thread to the other mail you sent; I think
this is going to be fairly involved. I wouldn't mind being proven wrong

> 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()?

Where's that get routed to? just an error_vprintf style situation?

> 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?

How do you correlate them?

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

I think it's not libvirt's job to pass it along, exactly -- libvirt made
the decision for which features to engage in QEMU, not the end user.

If the user upgrades QEMU but not libvirt, it's not really anything they
have control over and they shouldn't be pestered with such things.

However, if libvirt accidentally released a version that engages
deprecated behavior (and were unaware of it), it'd be nice to get user
reports, surely?

Logging messages for libvirt might be the best that can be done there in
that case.

In contrast, power user tools like QMP libraries, qmp-shell and others
allow more direct and meaningful access to QMP, so those should report
deprecation messages to the user.

> [1] https://lists.nongnu.org/archive/html/qemu-devel/2018-10/msg06131.html
> --
> Cheers,
> Christophe de Dinechin (IRC c3d)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]