]> xenbits.xensource.com Git - libvirt.git/commit
schema: Re-structure schema for <filesystem> to avoid broken validation
authorPeter Krempa <pkrempa@redhat.com>
Thu, 13 Oct 2022 12:01:24 +0000 (14:01 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 14 Oct 2022 07:40:56 +0000 (09:40 +0200)
commitad5c4be09fe415b4161c4b04ca2ef96f30a0509b
treee1f3415b74a196089a5d786aaa409733a91ad055
parent06ebad7c783fc44b23284c86cbaf4052f99834fd
schema: Re-structure schema for <filesystem> to avoid broken validation

The validation of a '<filesystem type='mount'>' device fails if the
elements inside are not ordered in the order in the schema despite using
<interleave>. This is a bug in libxml2's validator as removing the
'<optional>' property from the definition of the 'type' attribute with
'mount' variable fixes the problem.

I've reported it as another instance of a seemingly related issue:

  https://gitlab.gnome.org/GNOME/libxml2/-/issues/131

Meanwhile libvirt can re-arrange the schema by extracting the common
bits into a new definition and referencing them from each of the choice
groups explicitly.

Resolves: https://gitlab.com/libvirt/libvirt/-/issues/392
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
src/conf/schemas/domaincommon.rng