On Tue, Mar 17, 2020 at 12:54:25 +0100, Markus Armbruster wrote: > This series extends QMP introspection to cover deprecation. > Additionally, new option -compat lets you configure what to do when > deprecated interfaces get used. This is intended for testing users of > the management interfaces. It is experimental. > > -compat deprecated-input=<in-policy> configures what to do when > deprecated input is received. Available policies: > > * accept: Accept deprecated commands and arguments (default) > * reject: Reject them > * crash: Crash I've noticed that the 'crash' option doesn't manage to log the reason to stderr. Relevant section of libvirt's log file which agregates the stderr/out 2020-04-30 13:24:22.006+0000: 2072883: debug : virCommandHandshakeChild:418 : Handshake with parent is done char device redirected to /dev/pts/0 (label charserial0) 2020-04-30 13:24:31.879+0000: Domain id=4 is tainted: custom-monitor 2020-04-30 13:24:32.330+0000: shutting down, reason=crashed 'handshake' line is last of libvirt's messages pre-start of the qemu process. 'char device redirected' is reported by qemu. 'domain is tainted' is added by libvirt when I've issued the deprecated API via virsh qemu-monitor-command. 'reason=crashed' is added by libvirts VM shutdown hanlder. > > -compat deprecated-output=<out-policy> configures what to do when > deprecated output is sent. Available output policies: > > * accept: Emit deprecated command results and events (default) > * hide: Suppress them > > For now, -compat covers only deprecated syntactic aspects of QMP. We > may want to extend it to cover semantic aspects, CLI, and experimental > features. > > PATCH 01-04: Documentation fixes > PATCH 05-10: Test improvements > PATCH 11-24: Add feature flags to remaining user-defined types and to > struct members > PATCH 25-26: New special feature 'deprecated', visible in > introspection These are cool. I've added support for verifying that any command excercised by the libvirt unit test suite is not deprecated, or we at least know that it is and have a replacement. https://www.redhat.com/archives/libvir-list/2020-April/msg01444.html > PATCH 27-34: New -compat to set policy for handling stuff marked with > feature 'deprecated' While implementing support for this feature I noticed that it's impossible for libvirt to detect that it's available. The idea is to make a developer-centred setting in our config which will enable the compat setting if available and ignore it if not available to prevent us having to fiddle with the settings when testing various qemu versions. Thanks! Peter