Re: [PATCH v4 00/34] Configurable policy for handling deprecated interfaces

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

 



Hi

On Tue, Mar 17, 2020 at 12:55 PM Markus Armbruster <armbru@xxxxxxxxxx> 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
>
> -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.


I suggest to use a qmp- prefix for qmp-related policies.

> 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
> PATCH 27-34: New -compat to set policy for handling stuff marked with
>              feature 'deprecated'
>
> v4:
> PATCH 05+07: Temporary memory leak plugged [Marc-André]
> PATCH 23: Rewritten [Marc-André]
> PATCH 24: Comment typo [Marc-André]
> PATCH 30: Memory leaks plugged
>
> v3:
> * Rebased, non-trivial conflicts in PATCH 01+26+27+34 due to RST
>   conversion and code motion
> * PATCH 28-29: Old PATCH 28 split up to ease review
> * PATCH 30-31: New
> * PATCH 32-33: Old PATCH 29 split up to ease review
>
> Comparison to RFC (24 Oct 2019):
> * Cover arguments and results in addition to commands and events
> * Half-baked "[RFC PATCH 18/19] qapi: Include a warning in the
>   response to a deprecated command" dropped
>
> See also last item of
>     Subject: Minutes of KVM Forum BoF on deprecating stuff
>     Date: Fri, 26 Oct 2018 16:03:51 +0200
>     Message-ID: <87mur0ls8o.fsf@xxxxxxxxxxxxxxxxxx>
>     https://lists.nongnu.org/archive/html/qemu-devel/2018-10/msg05828.html
>
> Cc: Lukáš Doktor <ldoktor@xxxxxxxxxx>
> Cc: libguestfs@xxxxxxxxxx
> Cc: libvir-list@xxxxxxxxxx
> Cc: Daniel P. Berrange <berrange@xxxxxxxxxx>
> Cc: Peter Krempa <pkrempa@xxxxxxxxxx>
> Cc: Kevin Wolf <kwolf@xxxxxxxxxx>
>
> Markus Armbruster (34):
>   qemu-doc: Belatedly document QMP command arg & result deprecation
>   qapi: Belatedly update doc comment for @wait deprecation
>   docs/devel/qapi-code-gen: Clarify allow-oob introspection
>   docs/devel/qapi-code-gen: Document 'features' introspection
>   tests/test-qmp-cmds: Factor out qmp_dispatch() test helpers
>   tests/test-qmp-cmds: Check responses more thoroughly
>   tests/test-qmp-cmds: Simplify test data setup
>   tests/test-qmp-event: Simplify test data setup
>   tests/test-qmp-event: Use qobject_is_equal()
>   tests/test-qmp-event: Check event is actually emitted
>   qapi/schema: Clean up around QAPISchemaEntity.connect_doc()
>   qapi: Add feature flags to remaining definitions
>   qapi: Consistently put @features parameter right after @ifcond
>   qapi/introspect: Rename *qlit* to reduce confusion
>   qapi/introspect: Factor out _make_tree()
>   qapi/schema: Change _make_features() to a take feature list
>   qapi/schema: Reorder classes so related ones are together
>   qapi/schema: Rename QAPISchemaObjectType{Variant,Variants}
>   qapi/schema: Call QAPIDoc.connect_member() in just one place
>   qapi: Add feature flags to struct members
>   qapi: Inline do_qmp_dispatch() into qmp_dispatch()
>   qapi: Simplify how qmp_dispatch() deals with QCO_NO_SUCCESS_RESP
>   qapi: Simplify how qmp_dispatch() gets the request ID
>   qapi: Replace qmp_dispatch()'s TODO comment by an explanation
>   qapi: New special feature flag "deprecated"
>   qapi: Mark deprecated QMP parts with feature 'deprecated'
>   qemu-options: New -compat to set policy for deprecated interfaces
>   qapi: Implement deprecated-output=hide for QMP command results
>   qapi: Implement deprecated-output=hide for QMP events
>   qapi: Implement deprecated-output=hide for QMP event data
>   qapi: Implement deprecated-output=hide for QMP introspection
>   qapi: Implement deprecated-input=reject for QMP commands
>   qapi: Implement deprecated-input=reject for QMP command arguments
>   qapi: New -compat deprecated-input=crash
>
>  docs/devel/qapi-code-gen.txt                  |  79 ++-
>  docs/system/deprecated.rst                    |  48 +-
>  tests/qapi-schema/doc-good.texi               |  32 ++
>  qapi/block-core.json                          |  48 +-
>  qapi/block.json                               |  30 +-
>  qapi/char.json                                |   1 +
>  qapi/compat.json                              |  52 ++
>  qapi/control.json                             |  11 +-
>  qapi/introspect.json                          |  28 +-
>  qapi/machine.json                             |  34 +-
>  qapi/migration.json                           |  36 +-
>  qapi/misc.json                                |  13 +-
>  qapi/qapi-schema.json                         |   1 +
>  include/qapi/compat-policy.h                  |  20 +
>  include/qapi/qmp/dispatch.h                   |   1 +
>  include/qapi/qobject-input-visitor.h          |   9 +
>  include/qapi/qobject-output-visitor.h         |   9 +
>  include/qapi/visitor-impl.h                   |   3 +
>  include/qapi/visitor.h                        |   9 +
>  monitor/monitor-internal.h                    |   3 -
>  monitor/misc.c                                |   2 -
>  monitor/qmp-cmds-control.c                    | 102 +++-
>  qapi/qapi-visit-core.c                        |   9 +
>  qapi/qmp-dispatch.c                           | 149 +++---
>  qapi/qobject-input-visitor.c                  |  29 ++
>  qapi/qobject-output-visitor.c                 |  20 +
>  qemu-storage-daemon.c                         |   2 -
>  softmmu/vl.c                                  |  17 +
>  tests/test-qmp-cmds.c                         | 249 +++++----
>  tests/test-qmp-event.c                        | 203 +++-----
>  qapi/Makefile.objs                            |   8 +-
>  qapi/trace-events                             |   1 +
>  qemu-options.hx                               |  22 +
>  scripts/qapi/commands.py                      |  20 +-
>  scripts/qapi/doc.py                           |  16 +-
>  scripts/qapi/events.py                        |  24 +-
>  scripts/qapi/expr.py                          |  14 +-
>  scripts/qapi/introspect.py                    | 104 ++--
>  scripts/qapi/schema.py                        | 488 ++++++++++--------
>  scripts/qapi/types.py                         |   8 +-
>  scripts/qapi/visit.py                         |  28 +-
>  tests/Makefile.include                        |   1 +
>  tests/qapi-schema/alternate-base.err          |   2 +-
>  tests/qapi-schema/doc-good.json               |  22 +-
>  tests/qapi-schema/doc-good.out                |  18 +
>  .../qapi-schema/features-deprecated-type.err  |   2 +
>  .../qapi-schema/features-deprecated-type.json |   3 +
>  .../qapi-schema/features-deprecated-type.out  |   0
>  tests/qapi-schema/qapi-schema-test.json       |  51 +-
>  tests/qapi-schema/qapi-schema-test.out        |  48 +-
>  tests/qapi-schema/test-qapi.py                |  26 +-
>  51 files changed, 1393 insertions(+), 762 deletions(-)
>  create mode 100644 qapi/compat.json
>  create mode 100644 include/qapi/compat-policy.h
>  create mode 100644 tests/qapi-schema/features-deprecated-type.err
>  create mode 100644 tests/qapi-schema/features-deprecated-type.json
>  create mode 100644 tests/qapi-schema/features-deprecated-type.out
>
> --
> 2.21.1
>


-- 
Marc-André Lureau






[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