[libvirt] [RFC 0/7] Warn at runtime when deprecated features are used

Ján Tomko jtomko at redhat.com
Thu Oct 4 14:39:12 UTC 2018


On Tue, Oct 02, 2018 at 04:14:39PM +0200, Andrea Bolognani wrote:
>Background
>==========
>
>We have plenty of features in libvirt, some of which were designed at
>a time when the virtualization story was much more straightforward
>than the multi-architecture, multi-hypervisor, multi-machine world we
>currently live in and, while we have found ways to keep the APIs
>chugging along, the result is sometimes somewhat confusing for users
>and application developers, as well as requiring libvirt developers
>themselves to spend quite a bit of collective time working around
>decisions that, in hindsight, turn out to have been less than
>fortunate.
>
>Two concrete examples are considered here: one is the
>virConnectNumOfDomains() API which, while known to be racy and having
>non-racy alternatives, can still be used by developers without
>getting any kind of warning in the process; the other one is the
>ability to define a domain without specifying the machine type, which
>is becoming increasingly problematic now with some x86_64 features
>being limited to q35 and downstreams looking to push for its
>adoption, as well as being a manifestation of the more general
>problem of libvirt's default being sometimes too conservative and at
>odds with the existence of slimmed-down QEMU binaries being built
>with reducing the total attack surface in mind.
>
>Having a proper deprecation story in libvirt would allow us to point
>users and developers towards the recommended solution in each case,
>be it using a different API or querying libosinfo for information;
>after a generous grace period, we could then remove the problematic
>functionality altogether. This would be a more conservative version
>of the process we already have in place for dropping support for
>older QEMU releases, which recently has allowed us to ax massive
>chunks of effectively dead code and simplify parts of libvirt quite
>significantly.
>

I don't think we'll ever be able to remove the functionality.

If informing the app developers is the goal, a "Deprecated Features"
section in news.xml could do the trick.

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20181004/3bfc64a5/attachment-0001.sig>


More information about the libvir-list mailing list