[ClusterLabs Developers] Coming in pacemaker: CIB schema versioning no longer compatible with string- and float-based comparisons

Jan Pokorný jpokorny at redhat.com
Thu Jul 20 12:46:29 EDT 2017


Originally, pacemaker was treating versions of its CIB schemas
(respectively named files) as floats, simplifying comparisons in
a simplistic single-digit minor version realms.  As the necessity
to roll out a new schema version catering the new needs is around
the corner, it was decided[1] that pacemaker will not bump the
major part abrubtly (against the rules[2]), but rather the overflow
to a new higher digit in the minor part will occur.  That breaks
assumption of easy comparisons in two previously common angles:

- string (e.g. when looking at /cib at validate-with XPath within CIB
  or at the available, respectively named schema files);
  example: pacemaker-2.10 < pacemaker-2.2

- mentioned float (when parsing the numerical part out of the string):
  example: 2.11 < 2.2

Apparently, what can intuitively be labelled "version sort" remains
compatible, but as it is not so convenient implementation-wise,
it may be missing at various relevant places.

The takeaway is:
If you maintain some pieces of software that deal with schema versions
or files in any way, you are advised to double-check if you are ready
for this change.

For instance, it wasn't exactly the case of clufter:
https://pagure.io/clufter/c/f888830d6eea9aa668696717b81ccc18ede724eb?branch=next


[1] https://github.com/ClusterLabs/pacemaker/pull/1308
[2] https://github.com/ClusterLabs/pacemaker/blob/master/xml/Readme.md

-- 
Jan (Poki)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.clusterlabs.org/pipermail/developers/attachments/20170720/96915b6a/attachment-0002.sig>


More information about the Developers mailing list