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 1501924 - crm_mon -X output does not conform to the schema due to recent changes in bundles
Summary: crm_mon -X output does not conform to the schema due to recent changes in bun...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: pacemaker
Version: 7.5
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: rc
: 7.5
Assignee: Ken Gaillot
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-10-13 13:27 UTC by Tomas Jelinek
Modified: 2018-04-10 15:34 UTC (History)
3 users (show)

Fixed In Version: pacemaker-1.1.18-2.el7
Doc Type: No Doc Update
Doc Text:
The version with this issue was never released
Clone Of:
Environment:
Last Closed: 2018-04-10 15:32:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2018:0860 0 None None None 2018-04-10 15:34:11 UTC

Description Tomas Jelinek 2017-10-13 13:27:44 UTC
Description of problem:
crm_mon -X output does not conform to the schema due to recent changes in bundles. More specifically, allowed values for the type attribute of a bundle element are "docker" and "rkt", while the actual value is "Docker".


Version-Release number of selected component (if applicable):
pacemaker-1.1.18-1.el7.x86_64


How reproducible:
always, easily


Steps to Reproduce:
1. Configure a bundle resource using docker container
# pcs resource show httpd-bundle
 Bundle: httpd-bundle
  Docker: image=pcmktest:http options=--log-driver=journald replicas=3
  Network: host-netmask=24 ip-range-start=192.168.122.145
  Port Mapping:
   port=80 (httpd-port)
  Storage Mapping:
   options=rw source-dir-root=/root/docker/httpd-root target-dir=/var/www/html (httpd-root)
   options=rw source-dir-root=/root/docker/httpd-logs target-dir=/etc/httpd/logs (httpd-logs)
  Resource: apa (class=ocf provider=heartbeat type=apache)
   Operations: monitor interval=10 timeout=20s (apa-monitor-interval-10)
               start interval=0s timeout=40s (apa-start-interval-0s)
               stop interval=0s timeout=60s (apa-stop-interval-0s)

2. Get the status xml and validate it:
# crm_mon -X > state.xml
# jing /usr/share/pacemaker/crm_mon.rng state.xml
state.xml:29:117: error: value of attribute "type" is invalid; must be equal to "docker" or "rkt"
# awk 'NR==29 {print}' state.xml 
        <bundle id="httpd-bundle" type="Docker" image="pcmktest:http" unique="false" managed="true" failed="false" >


Actual results:
The status xml does not conform to the schema.


Expected results:
The status xml conforms to the schema.


Additional info:
This causes issues when pcs works with cluster status xml, for example:
# pcs resource enable dummy
Warning: xml with cluster status does not conform to the crm_mon schema

Comment 2 Ken Gaillot 2017-10-13 14:57:41 UTC
Thanks again for the catch. In this case, the schema is correct, but the value changed when rkt support was added, because we were focused on maintaining the text output ("Docker container"). I'll lowercase the value for XML, to maintain backward compatibility with the last release.

Comment 5 michal novacek 2017-12-11 10:32:18 UTC
I have verified that the output of 'crm_mon -X' is valid against the
/usr/shared/pacemaker/crm_mon.rng schema in pacemaker-1.1.18-6.el7.x86.

-----
Common part:

>virt-153# pcs resource show 
 Docker container: http-bundle [httpd]
   http-bundle-docker-0 (ocf::heartbeat:docker):        Started virt-153


Before the fix (pacemaker-1.1.18-1)
===================================

>virt-153# crm_mon -X >/tmp/crm_mon.xml

>virt-153# grep \<bundle /tmp/crm_mon.xml
        <bundle id="http-bundle" type="Docker" image="httpd" unique="false" managed="true" failed="false" >

>virt-153# jing /usr/share/pacemaker/crm_mon.rng /tmp/crm_mon.xml 
/tmp/crm_mon.xml:27:108: error: value of attribute "type" is invalid; must be equal to "docker" or "rkt"

>virt-153# echo $?
1



After the fix (pacemaker-1.1.18-6)
==================================

>virt-153# rmp -q pacemaker
pacemaker-1.1.18-6.el7.x86_64

>virt-153# crm_mon -X >/tmp/crm_mon.xml

>virt-153# grep \<bundle /tmp/crm_mon.xml
        <bundle id="http-bundle" type="docker" image="httpd" unique="false" managed="true" failed="false" >

>virt-153# jing /usr/share/pacemaker/crm_mon.rng /tmp/crm_mon.xml
>virt-153# echo $?
0

Comment 8 errata-xmlrpc 2018-04-10 15:32:51 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, 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-2018:0860


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