[libvirt] storage: inconsistent in 'format' scheme between document and implementation

Ryota Ozaki ozaki.ryota at gmail.com
Thu May 21 14:29:33 UTC 2009

On Thu, May 21, 2009 at 7:05 PM, Daniel P. Berrange <berrange at redhat.com> wrote:
> On Thu, May 21, 2009 at 10:46:11AM +0200, Daniel Veillard wrote:
>> On Thu, May 21, 2009 at 05:25:35PM +0900, Ryota Ozaki wrote:
>> > Yes, I also checked that.
>> >
>> > BTW, is the schema file used by libvirtd or drivers? This is just interest.
>>   We don't use them in the libvirt code themselves (though it would
>> be relatively trivial to ask libxml2 to validate instances with them),
>> but some are used byt the test suite. I'm not sure the storage schemas
>> are used though, but we try to keep them up to date when the XML
>> input and output code is updated.
> I think it could be nice to add a flag to the various DefineXML/CreateXML
> methods  VIR_DOMAIN_XML_VALIDATE, to tell the parser that the app wants
> strict validation.

Sounds good for me. Actually I took a lot of time to notice the problem.

Another possible way to turn strict validation on is to use a global
option in libvirtd.conf. It would be easy to turn it on all related
methods (and may be easy to implement).

Anyway, we need to keep RNG schemas valid though, I've found errors
in storagevol.rng through trying xmllint... (e.g., the 'volume' element
does not allow 'type' attribute.)

> strict validation.  We shouldn't turn on validation by default though,
> because that makes back compatability harder for applications, because
> they have to make sure never to use new XML attributes/elements with
> old libvirt installs.

I agree.

> Daniel
> --
> |: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
> |: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
> |: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
> |: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

More information about the libvir-list mailing list