Bug 1581150
Summary: | 'pcs config' fails on 'crm_mon --one-shot --as-xml --inactive' outputting anything on stderr | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Tomas Jelinek <tojeline> | ||||
Component: | pcs | Assignee: | Tomas Jelinek <tojeline> | ||||
Status: | CLOSED ERRATA | QA Contact: | cluster-qe <cluster-qe> | ||||
Severity: | unspecified | Docs Contact: | |||||
Priority: | urgent | ||||||
Version: | 7.5 | CC: | cfeist, cluster-maint, cluster-qe, idevat, jpokorny, kgaillot, kwenning, omular, rsteiger, tojeline | ||||
Target Milestone: | rc | ||||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | pcs-0.9.165-1.el7 | Doc Type: | Bug Fix | ||||
Doc Text: |
Cause:
Pcs runs crm_mon to get status of a cluster in XML format. Crm_mon prints XML to standard output and warnings to standard error output.
Consequence:
Pcs mixes XML and warnings into one stream and is then unable to parse it as XML.
Fix:
Keep standard and error outputs separated in pcs.
Result:
Reading XML status of a cluster works.
|
Story Points: | --- | ||||
Clone Of: | 1578955 | Environment: | |||||
Last Closed: | 2018-10-30 08:06:06 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Tomas Jelinek
2018-05-22 08:54:04 UTC
RHEL7 reproducer: 1. Set up a crm_mon wrapper: # mv /usr/sbin/crm_mon /usr/sbin/crm_mon.original # cat<<2EOF > /usr/sbin/crm_mon #!/bin/sh echo "This is a test warning" 1>&2 /usr/sbin/crm_mon.original $* 2EOF # chmod a+x /usr/sbin/crm_mon 2. Run 'pcs config' Actual results: # pcs config Cluster Name: rhel75 Error: cannot load cluster status, xml does not conform to the schema Expected results: output of cluster-config Created attachment 1439975 [details]
proposed fix
After fix:
* 'pcs config' works
* 'pcs status displays crm_mon's warnings':
# pcs status
Cluster name: rhel75
WARNINGS:
This is a test warning
Stack: corosync
Current DC: rh75-node2 (version 1.1.18-11.el7-2b07d5c5a9) - partition with quorum
...
After Fix: [ant ~] $ rpm -q pcs pcs-snmp pcs-0.9.165-1.el7.x86_64 pcs-snmp-0.9.165-1.el7.x86_64 [ant ~] $ mv /usr/sbin/crm_mon /usr/sbin/crm_mon.original [ant ~] $ cat<<2EOF > /usr/sbin/crm_mon #!/bin/sh echo "This is a test warning" 1>&2 /usr/sbin/crm_mon.original \$* 2EOF [ant ~] $ chmod a+x /usr/sbin/crm_mon [ant ~] $ pcs config Cluster Name: zoo Corosync Nodes: Pacemaker Nodes: ant bee Resources: Stonith Devices: Resource: xvm-fencing (class=stonith type=fence_xvm) Attributes: pcmk_host_list="ant bee" Operations: monitor interval=60s (xvm-fencing-monitor-interval-60s) Fencing Levels: Location Constraints: Ordering Constraints: Colocation Constraints: Ticket Constraints: Alerts: No alerts defined Resources Defaults: No defaults set Operations Defaults: No defaults set Cluster Properties: cluster-infrastructure: corosync cluster-name: zoo dc-version: 1.1.16-12.el7-94ff4df have-watchdog: false Quorum: Options: 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/RHBA-2018:3066 |