[Pacemaker] xml comments and validating against relaxng schema

Andrew Beekhof beekhof at gmail.com
Thu Nov 13 02:46:40 EST 2008


On Tue, Nov 11, 2008 at 13:11, Andrew Beekhof <beekhof at gmail.com> wrote:
>
> On Nov 11, 2008, at 12:11 PM, Raoul Bhatia [IPAX] wrote:
>
>> hi,
>>
>> i am trying to validate a simple cib.xml (attached) with the new tools.
>>
>> first, i try to use xmllint:
>>>
>>> $ xmllint --noout  --relaxng /usr/share/pacemaker/pacemaker-1.0.rng
>>> cib.minimal.xml; echo $?
>>> cib.minimal.xml validates
>>> 0
>>
>> so this works.
>>
>> using crm_verify does not work:
>>>
>>> $ crm_verify -V -x cib.minimal.xml
>>> crm_verify[7963]: 2008/11/11_12:04:52 notice: main: Required feature set:
>>> 2.0
>>> crm_verify[7963]: 2008/11/11_12:04:52 WARN: main: Your configuration was
>>> internally updated to the latest version (pacemaker-1.0)
>>> crm_verify[7963]: 2008/11/11_12:04:52 ERROR: common_unpack: Must specify
>>> id tag in <resource>
>>> crm_verify[7963]: 2008/11/11_12:04:52 ERROR: unpack_resources: Failed
>>> unpacking comment (null)
>>> Errors found during check: config not valid
>>
>> it seems to relate to the comment, because if i remove the comment, i
>> get:
>>
>>> $ crm_verify -V -x cib.minimal.xml
>>> crm_verify[10801]: 2008/11/11_12:07:13 notice: main: Required feature
>>> set: 2.0
>>> crm_verify[10801]: 2008/11/11_12:07:13 WARN: main: Your configuration was
>>> internally updated to the latest version (pacemaker-1.0)
>>> Warnings found during check: config may not be valid
>>
>> so i guess, this should work.
>>
>> question 1: what is the correct way to use comments inside the cib.xml
>> file?
>
> In all honesty, i don't know.
> I haven't been able to figure out how to allow them in the schema... if
> anyone has any pointers I'd be grateful.

I did some more research and found out that this _should_ be working -
there's nothing extra to do to allow comments.
Even stranger, when I test it with xmllint, it says it validates... so
there must be something "interesting" in the way we're loading the
xml.




More information about the Pacemaker mailing list