[libvirt] [PATCH] Relax filesystem target type

When using QEMU's 9pfs the target "dir" element is not necessarily an absolute path. If it is not validation currently fails with the misleaading $ virt-xml-validate /tmp/test.xml Relax-NG validity error : Extra element devices in interleave /tmp/test.xml:24: element devices: Relax-NG validity error : Element domain failed to validate content /tmp/test.xml fails to validate --- docs/schemas/domaincommon.rng | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index ebd9299..c6b1a05 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -2010,7 +2010,7 @@ <interleave> <element name="target"> <attribute name="dir"> - <ref name="absDirPath"/> + <ref name="dirPath"/> </attribute> <empty/> </element> -- 2.1.4

On Sat, Mar 21, 2015 at 11:45:03AM +0100, Guido Günther wrote:
When using QEMU's 9pfs the target "dir" element is not necessarily an absolute path. If it is not validation currently fails with the misleaading
In fact the target "dir" is not actually a directory at all. With KVM is is an opaque "tag", so we should not validate this content at all. We should allow arbitrary content. Yes, the attribute name is a really unfortunate/awful historical mistake. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

When using QEMU's 9pfs the target "dir" element is not necessarily an absolute path but merely an arbitrary identifier. So validation in that case currently fails with the misleading $ virt-xml-validate /tmp/test.xml Relax-NG validity error : Extra element devices in interleave /tmp/test.xml:24: element devices: Relax-NG validity error : Element domain failed to validate content /tmp/test.xml fails to validate --- docs/schemas/domaincommon.rng | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index ebd9299..79cbb02 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -2009,9 +2009,7 @@ </choice> <interleave> <element name="target"> - <attribute name="dir"> - <ref name="absDirPath"/> - </attribute> + <attribute name="dir"/> <empty/> </element> <optional> -- 2.1.4

On 25.03.2015 09:47, Guido Günther wrote:
When using QEMU's 9pfs the target "dir" element is not necessarily an absolute path but merely an arbitrary identifier. So validation in that case currently fails with the misleading
$ virt-xml-validate /tmp/test.xml Relax-NG validity error : Extra element devices in interleave /tmp/test.xml:24: element devices: Relax-NG validity error : Element domain failed to validate content /tmp/test.xml fails to validate --- docs/schemas/domaincommon.rng | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index ebd9299..79cbb02 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -2009,9 +2009,7 @@ </choice> <interleave> <element name="target"> - <attribute name="dir"> - <ref name="absDirPath"/> - </attribute> + <attribute name="dir"/> <empty/> </element> <optional>
ACK Michal

On Wed, Mar 25, 2015 at 10:23:21AM +0100, Michal Privoznik wrote:
On 25.03.2015 09:47, Guido Günther wrote:
When using QEMU's 9pfs the target "dir" element is not necessarily an absolute path but merely an arbitrary identifier. So validation in that case currently fails with the misleading
$ virt-xml-validate /tmp/test.xml Relax-NG validity error : Extra element devices in interleave /tmp/test.xml:24: element devices: Relax-NG validity error : Element domain failed to validate content /tmp/test.xml fails to validate --- docs/schemas/domaincommon.rng | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index ebd9299..79cbb02 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -2009,9 +2009,7 @@ </choice> <interleave> <element name="target"> - <attribute name="dir"> - <ref name="absDirPath"/> - </attribute> + <attribute name="dir"/> <empty/> </element> <optional>
ACK
Pushed. Thanks. -- Guido
participants (3)
-
Daniel P. Berrange
-
Guido Günther
-
Michal Privoznik