Re: [RFC PATCH 2/3] qemu: conf: Add 'deprecated_debug' setting to qemu.conf

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

 



On Thu, Apr 30, 2020 at 04:13:43PM +0200, Peter Krempa wrote:
> New QEMU supports an harsh, but hard to ignore way to notify that the
> QMP user used an deprecated command. This is useful e.g. for developers
> to see that something needs to be fixed.
> 
> This patch introduces a qemu.conf option to enable the setting in cases
> when qemu supports it so that developers and continiuous integration
> efforts are notified about use of deprecated fields while it's not late.

> ---
>  src/qemu/libvirtd_qemu.aug         |  1 +
>  src/qemu/qemu.conf                 | 11 +++++++++++
>  src/qemu/qemu_conf.c               |  2 ++
>  src/qemu/qemu_conf.h               |  2 ++
>  src/qemu/test_libvirtd_qemu.aug.in |  1 +
>  5 files changed, 17 insertions(+)
> 
> diff --git a/src/qemu/libvirtd_qemu.aug b/src/qemu/libvirtd_qemu.aug
> index 404498b611..4cf700346f 100644
> --- a/src/qemu/libvirtd_qemu.aug
> +++ b/src/qemu/libvirtd_qemu.aug
> @@ -118,6 +118,7 @@ module Libvirtd_qemu =
> 
>     let debug_level_entry = int_entry "gluster_debug_level"
>                   | bool_entry "virtiofsd_debug"
> +                 | bool_entry "deprecated_debug"
> 
>     let memory_entry = str_entry "memory_backing_dir"
> 
> diff --git a/src/qemu/qemu.conf b/src/qemu/qemu.conf
> index abdbf07fec..558731da0f 100644
> --- a/src/qemu/qemu.conf
> +++ b/src/qemu/qemu.conf
> @@ -852,3 +852,14 @@
>  # may change across versions.
>  #
>  #capability_filters = [ "capname" ]
> +
> +# 'deprecated_debug' setting controls whether qemu should be instructed to crash
> +# when libvirt uses deprecated commands or arguments and at the same time to
> +# stop including deprecated fields in replies. This setting is meant for
> +# developers and continious-integration efforts to make it obvious when
> +# we rely on features which may go away. In cases when qemu doesn't support
> +# dealing with deprecated fields the setting is ignored.
> +#
> +# DO NOT use in production.
> +#
> +#deprecated_debug = 1

Calling it "debug" when the result is to "crash" is a bit misleading !
I think this behaviour is a bit too harsh. As a developer I would be
happy to enable an option in my qemu.conf to causes log messages to
printed to stderr for all my dev servers & VMs, or gracefully rejects
a QMP command with an error. I'm very unlikely to ever enable an
option that is going to hard crash my VMs, because that risks data
loss to me.

So I think we ought to make this a tri-state like

  "qemu_deprecations = ignore|error|crash"


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux