RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1967087 - XML output of crm_resource --digests is not valid against pacemaker api-result.rng schema
Summary: XML output of crm_resource --digests is not valid against pacemaker api-resul...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: pacemaker
Version: 8.4
Hardware: Unspecified
OS: Unspecified
urgent
low
Target Milestone: rc
: 8.5
Assignee: Chris Lumens
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-06-02 12:26 UTC by Miroslav Lisik
Modified: 2024-03-07 14:23 UTC (History)
3 users (show)

Fixed In Version: pacemaker-2.1.0-2.el8
Doc Type: No Doc Update
Doc Text:
This would not generally affect end users
Clone Of:
Environment:
Last Closed: 2021-11-09 18:44:54 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2021:4267 0 None None None 2021-11-09 18:45:16 UTC

Description Miroslav Lisik 2021-06-02 12:26:58 UTC
Description of problem:
XML output of crm_resource --digests is not valid against pacemaker api-result.rng schema.


Version-Release number of selected component (if applicable):
pacemaker-2.0.5-9.el8_4.1

How reproducible:
always


Steps to Reproduce:
1. get digests from crm_resource

# crm_resource --digests --output-as=xml -r fence-scsi -N r8-node-02 | tee digests.xml
<pacemaker-result api-version="2.3" request="crm_resource --digests --output-as=xml -r fence-scsi -N r8-node-02">
  <digests resource="fence-scsi" node="r8-node-02" task="start" interval="0ms">
    <digest type="all" hash="a9d324c89a23c28259ae5ea81fbc2de0">
      <parameters debug_file="/tmp/fence_scsi_debug.log" pcmk_host_check="static-list" pcmk_host_list="r8-node-01 r8-node-02 r8-node-03" pcmk_reboot_action="off" devices="/dev/disk/by-id/scsi-360014052bc36324cf7d4a709a959340b"/>
    </digest>
    <digest type="nonprivate" hash="0a64471411473e118094abe31f594859">
      <parameters debug_file="/tmp/fence_scsi_debug.log" devices="/dev/disk/by-id/scsi-360014052bc36324cf7d4a709a959340b"/>
    </digest>
  </digests>
  <status code="0" message="OK"/>
</pacemaker-result>

2. Validate against api-result.rng
# xmllint --noout --relaxng /usr/share/pacemaker/api/api-result.rng digests.xml 
digests.xml:1: element pacemaker-result: Relax-NG validity error : Expecting element status, got digests
digests.xml:1: element pacemaker-result: Relax-NG validity error : Element pacemaker-result failed to validate content
digests.xml fails to validate

# echo $?
3


Actual results:
Validation failed.

Expected results:
Validation succeeded.

Additional info:
It looks like that schema '/usr/share/pacemaker/api/digests-2.6.rng' is
missing elements <element name="digests"> and <element name="digest">
inside theirs corresponding <define> elements.

Comment 1 Ken Gaillot 2021-06-02 17:41:17 UTC
Fixed upstream by commit 03b32020

Comment 8 Markéta Smazová 2021-06-15 15:31:35 UTC
before fix
-----------
[root@virt-044 ~]# rpm -q pacemaker
pacemaker-2.0.5-9.el8.x86_64

get digests from crm_resource

[root@virt-044 ~]# crm_resource --digests --output-as=xml -r fence-virt-044 -N virt-044 | tee digests.xml
<pacemaker-result api-version="2.3" request="crm_resource --digests --output-as=xml -r fence-virt-044 -N virt-044">
  <digests resource="fence-virt-044" node="virt-044" task="start" interval="0ms">
    <digest type="all" hash="19010cabdecc1188ed059dcae6913e18">
      <parameters pcmk_host_check="static-list" delay="5" pcmk_host_map="virt-044:virt-044.cluster-qe.lab.eng.brq.redhat.com" pcmk_host_list="virt-044"/>
    </digest>
    <digest type="nonprivate" hash="65f33f88eda6bf199167c078f9ba2d6c">
      <parameters delay="5"/>
    </digest>
  </digests>
  <status code="0" message="OK"/>
</pacemaker-result>

Validate against api-result.rng

[root@virt-044 ~]# xmllint --noout --relaxng /usr/share/pacemaker/api/api-result.rng digests.xml
digests.xml:1: element pacemaker-result: Relax-NG validity error : Expecting element status, got digests
digests.xml:1: element pacemaker-result: Relax-NG validity error : Element pacemaker-result failed to validate content
digests.xml fails to validate

[root@virt-044 ~]# echo $?
3


after fix
----------
[root@virt-539 ~]# rpm -q pacemaker
pacemaker-2.1.0-2.el8.x86_64

get digests from crm_resource

[root@virt-539 ~]# crm_resource --digests --output-as=xml -r fence-virt-539 -N virt-539 | tee digests.xml
<pacemaker-result api-version="2.9" request="crm_resource --digests --output-as=xml -r fence-virt-539 -N virt-539">
  <digests resource="fence-virt-539" node="virt-539" task="start" interval="0ms">
    <digest type="all" hash="b9c99450cb1742284b1da5b3554529b2">
      <parameters pcmk_host_check="static-list" delay="5" pcmk_host_map="virt-539:virt-539.cluster-qe.lab.eng.brq.redhat.com" pcmk_host_list="virt-539"/>
    </digest>
    <digest type="nonprivate" hash="65f33f88eda6bf199167c078f9ba2d6c">
      <parameters delay="5"/>
    </digest>
  </digests>
  <status code="0" message="OK"/>
</pacemaker-result>

Validate against api-result.rng

[root@virt-539 ~]# xmllint --noout --relaxng /usr/share/pacemaker/api/api-result.rng digests.xml
digests.xml validates

[root@virt-539 ~]# echo $?
0

marking verified in pacemaker-2.1.0-2.el8.x86_64

Comment 10 errata-xmlrpc 2021-11-09 18:44:54 UTC
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/RHEA-2021:4267


Note You need to log in before you can comment on or make changes to this bug.