Bug 133228 - Parse error on cluster.conf file behaves incorrectly
Summary: Parse error on cluster.conf file behaves incorrectly
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Cluster Suite
Classification: Retired
Component: ccs (Show other bugs)
(Show other bugs)
Version: 4
Hardware: All Linux
medium
medium
Target Milestone: ---
Assignee: Jonathan Earl Brassow
QA Contact: GFS Bugs
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-09-22 16:31 UTC by Derek Anderson
Modified: 2009-04-16 20:03 UTC (History)
1 user (show)

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


Attachments (Terms of Use)

Description Derek Anderson 2004-09-22 16:31:55 UTC
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 15:06:51 UTC
Updates with the proper version and component name.

Comment 2 Kiersten (Kerri) Anderson 2004-11-04 15:14:13 UTC
Updates with the proper version and component name.

Comment 3 Kiersten (Kerri) Anderson 2004-11-04 15:19:53 UTC
Updates with the proper version and component name. Again, just love out tools.

Comment 4 Jonathan Earl Brassow 2004-12-21 21:54:05 UTC
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 21:09:10 UTC
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.