Bug 753629

Summary: crm configure show xml fails xmllint validation
Product: Red Hat Enterprise Linux 6 Reporter: Jaroslav Kortus <jkortus>
Component: pacemakerAssignee: Andrew Beekhof <abeekhof>
Status: CLOSED NOTABUG QA Contact: Cluster QE <mspqa-list>
Severity: high Docs Contact:
Priority: medium    
Version: 6.2CC: cluster-maint
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-01 21:02:50 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 756082    

Description Jaroslav Kortus 2011-11-13 21:15:33 UTC
Description of problem:
"crm configure show xml" command on a running cluster fails xmllint validation

Version-Release number of selected component (if applicable):
pacemaker-1.1.6-3.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1. crm configure show xml | xmllint -
2.
3.
  
Actual results:
(15:10:16) [root@node01:~]$ crm configure show xml | xmllint -
-:1: parser error : Start tag expected, '<' not found
<?xml version="1.0" ?>
^

exits with code=1

Expected results:
valid xml output of configure show xml that passes xmllint

Additional info:
# crm configure show xml | xxd
0000000: 1b5b 3f31 3033 3468 3c3f 786d 6c20 7665  .[?1034h<?xml ve
0000010: 7273 696f 6e3d 2231 2e30 2220 3f3e 0a3c  rsion="1.0" ?>.<
0000020: 6369 6220 6164 6d69 6e5f 6570 6f63 683d  cib admin_epoch=
0000030: 2231 2220 6369 622d 6c61 7374 2d77 7269  "1" cib-last-wri
0000040: 7474 656e 3d22 5468 7520 4e6f 7620 3130  tten="Thu Nov 10
0000050: 2030 353a 3237 3a31 3420 3230 3131 2220   05:27:14 2011" 

seems like there are some unwanted characters at the start of the output

CIB used came from CTS test run which populated the resources.

Comment 3 Andrew Beekhof 2011-11-24 02:42:25 UTC
You're probably getting color codes.
Works just fine direct from pacemaker:

   cibadmin -Q | xmllint -