HomeClusterLabs Projects

Refactor: libcrmcommon: Use order numbers for XSL transform stylesheets

Description

Refactor: libcrmcommon: Use order numbers for XSL transform stylesheets

Instead of "enter" and "leave" suffixes. This allows for arbitrarily
long pipelines.

Now, Pacemaker looks for XSL stylesheets with names of the form
"upgrade-X.Y-ORDER.xsl", where:

  • X is the major schema version
  • Y is the minor schema version
  • ORDER is an integer representing the stylesheet's position in the upgrade transformation pipeline.

For example, for upgrading from schema version 2.10, we now have the
following stylesheets, which Pacemaker will apply in order:

  • upgrade-2.10-0.xsl (formerly upgrade-2.10-enter.xsl)
  • upgrade-2.10-1.xsl (formerly upgrade-2.10.xsl)
  • upgrade-2.10-2.xsl (formerly upgrade-2.10-leave.xsl)

For now, we keep the enter, leave, and base stylesheets as symlinks.
Removing them will disturb the XML regression.sh test, and this commit
is large enough already. Updating the test runner in regression.sh to
deal wth chained transforms is going to be an ordeal.

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>

Details

Provenance
nrwahl2Authored on Jun 29 2024, 6:51 PM
Parents
rPc27090b7b2ea: Refactor: libcrmcommon: Consider pre-/post-upgrade XSLT failures fatal
Branches
Unknown
Tags
Unknown