On Fri, Mar 19, 2021 at 07:33:51PM +0100, Peter Krempa wrote:
New QEMU supports an harsh, but hard to ignore way to notify that the
"a harsh" or just "harsh"
QMP user used an deprecated command. This is useful e.g. for
developers
"a deprecated"
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.
"before it's too late" sounds better
The option is deliberately stored as string and not validated to prevent
failures when downgrading qemu or libvirt versions. While we don't
support this, the knob isn't meant for public consumption anyways.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/libvirtd_qemu.aug | 1 +
src/qemu/qemu.conf | 31 ++++++++++++++++++++++++++++++
src/qemu/qemu_conf.c | 4 ++++
src/qemu/qemu_conf.h | 2 ++
src/qemu/test_libvirtd_qemu.aug.in | 1 +
5 files changed, 39 insertions(+)
diff --git a/src/qemu/libvirtd_qemu.aug b/src/qemu/libvirtd_qemu.aug
index 3c1045858b..0f18775121 100644
--- a/src/qemu/libvirtd_qemu.aug
+++ b/src/qemu/libvirtd_qemu.aug
@@ -131,6 +131,7 @@ module Libvirtd_qemu =
let debug_level_entry = int_entry "gluster_debug_level"
| bool_entry "virtiofsd_debug"
+ | str_entry "deprecation_behavior"
let memory_entry = str_entry "memory_backing_dir"
diff --git a/src/qemu/qemu.conf b/src/qemu/qemu.conf
index 0c1054f198..086d7d2296 100644
--- a/src/qemu/qemu.conf
+++ b/src/qemu/qemu.conf
@@ -922,3 +922,34 @@
# may change across versions.
#
#capability_filters = [ "capname" ]
+
+# 'deprecation_behavior' setting controls how the qemu process behaves towards
+# deprecated commands and arguments used by libvirt.
+#
+# This setting is meant for developers and CI efforts to make it obvious when
+# libvirt relies on fields which are deprecated so that it can be fixes as soon
+# as possible.
+#
+# Possible options are:
+# "none" - (default) qemu is supposed to accept and output deprecated fields
+# and commands
+# "omit" - qemu is instructed to omit deprecated fields on output, behaviour
+# towards fields and commadns from qemu is not changed
s/commadns/commands/