[Linux-ha-dev] [mgmt]Rewriting order and colocation configurations
Alan Robertson
alanr at unix.sh
Sat Dec 8 15:12:47 MST 2007
Lars Marowsky-Bree wrote:
> On 2007-12-09T02:50:52, Yan Gao <ygao at novell.com> wrote:
>
>>>> Thanks! It's a good tool. By now, haclient doesn't generate a xml file.
>> Ideally, haclient should generate a valid xml, and then transfer to
>> mgmtd. Xinwei and I think that the current protocol is too complicated
>> and has many limitations. We want to simplify the protocol and improve
>> the applicability so that it's convenient to implement full features
>> according to the dtd.
>
> Right; the client very likely should directly talk to the CIB daemon.
> (Which already supports this; we may need a way to apply ACLs in the
> future though.)
>
> You're preaching to the choir ;-)
>
>>> I have extended the metadata to explicitly include enumeration values.
>>> I think this would help a lot for the kinds of validations I think
>>> you're doing.
>> In my implementation,I've adopted the enumeration values specified in
>> the dtd to be used for the list of combobox options.
>
> It is quite possible that a DTD is not powerful enough to adequately
> describe the syntax and semantics of the CIB. The DTD is, simply put,
> the oldest and least complex schema format for XML, and happened to be
> what I knew when I conjured up the original one ;-)
>
> XML Schema, Relax NG (or others I know even less about) may be more
> appropriate standards to describe the CIB as we have it today, and as it
> evolves further.
>
> This may be preferable to needing to duplicate this in home-grown
> fashion. A lint-like tool is still a good idea, but it should be build
> on top of this, IMHO.
/me redirects this whining into /dev/null
Feel free to investigate the best tools, define the DTD-replacement, and
get Andrew to adopt it - incorporating it into crm_verify. "Show me the
code" is the Linux way after all...
If it has python support, likely all I'll have to do to use it is import
a few more python classes at the top, and add a half-dozen lines to
ciblint to read in the DTD-replacement, and call its validation function.
When all is said and done, it won't eliminate more than a few hundred
lines of code in ciblint (which is now more than 2K lines and still
growing).
--
Alan Robertson <alanr at unix.sh>
"Openness is the foundation and preservative of friendship... Let me
claim from you at all times your undisguised opinions." - William
Wilberforce
More information about the Linux-HA-Dev
mailing list