Bug 133228 - Parse error on cluster.conf file behaves incorrectly
Parse error on cluster.conf file behaves incorrectly
Status: CLOSED CURRENTRELEASE
Product: Red Hat Cluster Suite
Classification: Red Hat
Component: ccs (Show other bugs)
4
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jonathan Earl Brassow
GFS Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-09-22 12:31 EDT by Derek Anderson
Modified: 2009-04-16 16:03 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-01-03 16:09:10 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Derek Anderson 2004-09-22 12:31:55 EDT
Description of problem:

I had an XML conf file that did not parse correctly.  When `cman_tool
join` was run I was told that my nodename did not exist in the config
file.  What happened was that after the parse error the node silently
went out and grabbed a random cluster.conf from the network.

Expectation: At least that the messages you can currently only find
from debug 'ccsd -n -v' be printed to the log file; and it would be
useful to see a concise error on the command line as well.  It's open
to debate whether the correct behavior at this point should be to grab
a random cluster.conf file from the network or simply fail.  I vote
for simply failing.

/etc/cluster/cluster.conf:55: parser error : Opening and ending tag
mismatch: nodes line 9 and cluster
</cluster>
          ^
/etc/cluster/cluster.conf:56: parser error : Premature end of data in
tag cluster line 1

^
Unable to parse /etc/cluster/cluster.conf


Version-Release number of selected component (if applicable):
[root@tng3-1 cluster]# ccsd -V
ccsd DEVEL.1095793251 (built Sep 21 2004 14:03:14)
Copyright (C) Red Hat, Inc.  2004  All rights reserved.

How reproducible:


Steps to Reproduce:
1. Put a parse error in a local /etc/cluster/cluster.conf
2. Start ccsd
3. Run 'cman_tool join'
  
Actual results:
XML parse fails silently.  Random cluster.conf is grabbed from the
network. cman_tool join (more than likely) fails.

Expected results:
Useful error message and failure so I can correct the local
cluster.conf file.

Additional info:
Comment 1 Kiersten (Kerri) Anderson 2004-11-04 10:06:51 EST
Updates with the proper version and component name.
Comment 2 Kiersten (Kerri) Anderson 2004-11-04 10:14:13 EST
Updates with the proper version and component name.
Comment 3 Kiersten (Kerri) Anderson 2004-11-04 10:19:53 EST
Updates with the proper version and component name. Again, just love out tools.
Comment 4 Jonathan Earl Brassow 2004-12-21 16:54:05 EST
Now, if the local copy is bad ccsd will not start.  It will print out
the failed attempt at parsing the file and tell the user to either fix
the errors or (re)move the file in order to attempt to get a valid
copy from the network.
Comment 5 Derek Anderson 2005-01-03 16:09:10 EST
Verified:

[root@link-12 cluster]# ccsd
/etc/cluster/cluster.conf:43: parser error : Opening and ending tag
mismatch: milton line 7 and cluster
</cluster>
          ^
/etc/cluster/cluster.conf:44: parser error : Premature end of data in
tag cluster line 2

^

Unable to parse /etc/cluster/cluster.conf.
You should either:
 1. Correct the XML mistakes, or
 2. (Re)move the file and attempt to grab a valid copy from the network.
[root@link-12 cluster]# echo $?
1
[root@link-12 cluster]# ccsd -V
ccsd DEVEL.1103743812 (built Dec 22 2004 13:31:24)
Copyright (C) Red Hat, Inc.  2004  All rights reserved.
[root@link-12 cluster]#

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