Description of problem: Resource ocf:pacemaker:attribute does not comply with the OCF 1.1 standard Version-Release number of selected component (if applicable): pacemaker-cli-2.1.2-4.el9.x86_64 How reproducible: always, easily Steps to Reproduce: 1. # curl -s https://raw.githubusercontent.com/ClusterLabs/OCF-spec/main/ra/1.1/ra-api.rng -o ocf1.1.rng 2. # crm_resource --show-metadata=ocf:pacemaker:attribute | xmllint --noout --relaxng ocf1.1.rng - -:5: element longdesc: Relax-NG validity error : Did not expect element longdesc there -:5: element longdesc: Relax-NG validity error : Element resource-agent has extra content: longdesc - fails to validate Actual results: Resource metadata fails to validate with the rng scheme of the ocf 1.1 standard. Expected results: Resource metadata validate with the rng scheme of the ocf 1.1 standard.
Interesting -- this is a quirk of the schema I wasn't aware of. The schema only allows longdesc followed by shortdesc (not the other way around). The standard never explicitly specifies that, and I doubt it's intentional. But the schema is technically part of the standard, so I'll make sure all the pacemaker agents follow that pattern. I'm already planning what could go into OCF 1.2, so I'll make a note to allow either order ...
Ken: You may take a look at the schema used by pcs. It is a bit relaxed and doesn't care about order of elements. https://github.com/ClusterLabs/pcs/blob/main/data/ocf-1.1.rng
(In reply to Tomas Jelinek from comment #2) > Ken: You may take a look at the schema used by pcs. It is a bit relaxed and > doesn't care about order of elements. > https://github.com/ClusterLabs/pcs/blob/main/data/ocf-1.1.rng Yep, that interleave looks like what we want
Fixed upstream as of commit c078566a
after fix ---------- [root@virt-527 ~]# rpm -q pacemaker pacemaker-cli pacemaker-2.1.3-2.el9.x86_64 pacemaker-cli-2.1.3-2.el9.x86_64 [root@virt-527 ~]# curl -s https://raw.githubusercontent.com/ClusterLabs/OCF-spec/main/ra/1.1/ra-api.rng -o ocf1.1.rng [root@virt-527 ~]# crm_resource --show-metadata=ocf:pacemaker:attribute | xmllint --noout --relaxng ocf1.1.rng - - validates verified as SanityOnly in pacemaker-2.1.3-2.el9
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (pacemaker bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2022:7937