Bug 677430

Summary: Ricci strips out CDATA and comment on sync
Product: Red Hat Enterprise Linux 6 Reporter: Shane Bradley <sbradley>
Component: ricciAssignee: Chris Feist <cfeist>
Status: CLOSED DUPLICATE QA Contact: Cluster QE <mspqa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2CC: cluster-maint, fdinitto, hlawatschek, jwest, liko
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-02-21 16:38:29 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Shane Bradley 2011-02-14 18:55:45 UTC
Description of problem:
When a cluster.conf is synced to all nodes it will not sync comments and CDATA. That information will be stripped/lefted out of the new cluster.conf.

Version-Release number of selected component (if applicable):
ricci-0.16.2-13.el6.x86_64

How reproducible:
Everytime

Steps to Reproduce:
1.Edit the cluster.conf and make the following changes:
Add the following tags inside the <rm> tag in the cluster.conf:

<events>
<event class="service" name="service-ers">
notice("Event service triggered!");
evalfile("/usr/share/cluster/follow-service.sl");
follow_service("service:BENASCS", "service:BENERS", "service:BENASCS");
</event>
<event class="node" name="node-ers">
notice("Event node triggered!");
evalfile("/usr/share/cluster/follow-service.sl");
follow_service("service:BENASCS", "service:BENERS", "service:BENASCS");
</event>
</events>
2. $ cman_tool version -r
  
Actual results:
The event section is stripped down to:
<events>
<event class="service" name="service-ers"/>
<event class="node" name="node-ers"/>
</events>

Expected results:
The xml should not be stripped. The comments and CDATA should be kept in tact.

Additional info:

Comment 2 Lon Hohberger 2011-02-14 20:04:34 UTC
It looks like this is based on Atix's SAP whitepaper which may need to be updated for RHEL 6.

There is no support for CDATA in the ccs CLI or within luci at this time.

On RHEL6 it will likely be necessary to use the file directive of the event tag:

<events>
  <event class="service" name="service-ers" file="/usr/share/cluster/service-ers.sl"/>
  <event class="node" name="node-ers" file="/usr/share/cluster/node-ers.sl">
</events>


# cat /usr/share/cluster/service-ers.sl
notice("Event service triggered!");
evalfile("/usr/share/cluster/follow-service.sl");
follow_service("service:BENASCS", "service:BENERS", "service:BENASCS");

# cat /usr/share/cluster/node-ers.sl
notice("Event node triggered!");
evalfile("/usr/share/cluster/follow-service.sl");
follow_service("service:BENASCS", "service:BENERS", "service:BENASCS");

Comment 3 Lon Hohberger 2011-02-14 20:05:07 UTC
Oops, missing closing /> on the second event; you get the idea.

Comment 7 Chris Feist 2011-02-21 16:38:29 UTC

*** This bug has been marked as a duplicate of bug 545849 ***