Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 614961 - Multiple logging_daemon tags causes configuration validation to fail
Multiple logging_daemon tags causes configuration validation to fail
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: cluster (Show other bugs)
6.0
All Linux
low Severity medium
: rc
: ---
Assigned To: Lon Hohberger
Cluster QE
:
Depends On:
Blocks: 615202 615203
  Show dependency treegraph
 
Reported: 2010-07-15 12:19 EDT by Shane Bradley
Modified: 2010-11-10 14:59 EST (History)
10 users (show)

See Also:
Fixed In Version: cluster-3.0.12-14.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 615202 615203 (view as bug list)
Environment:
Last Closed: 2010-11-10 14:59:37 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)
Patch to add many optional logging tags (406 bytes, patch)
2010-07-15 12:19 EDT, Shane Bradley
no flags Details | Diff
Test case. (1.25 KB, text/plain)
2010-07-15 16:16 EDT, Lon Hohberger
no flags Details

  None (edit)
Description Shane Bradley 2010-07-15 12:19:13 EDT
Created attachment 432132 [details]
Patch to add many optional logging tags

Description of problem:
When using multiple logging_daemon tags in cluster.conf, exactly like
stated in the man page (man cluster.conf), validation fails:

     <logging to_syslog="yes" to_logfile="yes" syslog_facility="daemon"
              syslog_priority="info" logfile_priority="info">
         <logging_daemon name="qdiskd"
                  logfile="/var/log/cluster/qdiskd.log"/>
         <logging_daemon name="fenced"
                  logfile="/var/log/cluster/fenced.log"/>
     [...]

Relax-NG validity error : Extra element logging in interleave
tempfile:7: element logging: Relax-NG validity error : Element cluster
failed to validate content Configuration fails to validate


Jul 14 15:57:08 nodeA corosync[4018]:   [MAIN  ] Successfully parsed cman config
Jul 14 15:57:08 nodeA corosync[4018]:   [MAIN  ] parse error in config: subsys required for logging_daemon directive.

Patch attached to fix parsing error.

Version-Release number of selected component (if applicable):
corosync rhel6beta2

How reproducible:
Everytime

Steps to Reproduce:
1. Add in extra logging
2. start corosync
  
Actual results:
Parse error will occur.

Expected results:
No Parse error.

Additional info:
Patch attached.
Comment 1 RHEL Product and Program Management 2010-07-15 12:37:54 EDT
This issue has been proposed when we are only considering blocker
issues in the current Red Hat Enterprise Linux release. It has
been denied for the current Red Hat Enterprise Linux release.

** If you would still like this issue considered for the current
release, ask your support representative to file as a blocker on
your behalf. Otherwise ask that it be considered for the next
Red Hat Enterprise Linux release. **
Comment 3 Lon Hohberger 2010-07-15 16:01:17 EDT
Testing is easy:

  xmllint --relaxng /usr/share/cluster/cluster.rng CONFIG_FILE


Config file #1:

<cluster name="foo" config_version="1" >
  <clusternodes/>
  <rm/>
</cluster>

Config file #2:

<cluster name="foo" config_version="1" >
  <logging>
    <logging_daemon name="one" />
  </logging>
  <clusternodes/>
  <rm/>
</cluster>

Config file #3:

<cluster name="foo" config_version="1" >
  <logging>
    <logging_daemon name="one" />
    <logging_daemon name="two" />
  </logging>
  <clusternodes/>
  <rm/>
</cluster>

All three should succeed.
Comment 4 Lon Hohberger 2010-07-15 16:16:09 EDT
Created attachment 432213 [details]
Test case.
Comment 5 Lon Hohberger 2010-07-15 16:16:37 EDT
Comment on attachment 432132 [details]
Patch to add many optional logging tags

Doesn't need optional and zeroOrMore.
Comment 6 Lon Hohberger 2010-07-15 16:18:24 EDT
I'm confused -- I don't understand the corosync error there.
Comment 7 Lon Hohberger 2010-07-15 16:20:07 EDT
Oh... for corosync you need to add subsys="foo"; this is not required for other daemons, which is why it is optional.  Ok, so this really is just a config schema fix.
Comment 8 Lon Hohberger 2010-07-15 16:20:39 EDT
Ex:

      <attribute name="subsys" rha:description="A corosync subsystem name.
          cluster.conf(5)"/>
Comment 10 Fabio Massimo Di Nitto 2010-07-16 02:58:08 EDT
the errorS are slightly more complex than just a schema fix.

There are 3 bugs here.

1) the schema needs to be update and Lon already took care of that.

2) corosync exec/mainconfig.c has a coding error in parsing subsys= keyword with logging_daemon entry. I have a patch for this already that I am going to attach to the corosync clone of this bugzilla

3) cman-preconfig does not copy correctly cluster/logging information into corosync objdb, skipping one of the relevant entry. We still don´t have a patch for this issue.
Comment 11 Lon Hohberger 2010-07-19 09:44:23 EDT
http://git.fedorahosted.org/git?p=cluster.git;a=commit;h=df78623ff098681a3e9b9154f4d6e270bf38f121

The other issues (#2) and (#3) have been copied into separate bugzillas and will be addressed separately.
Comment 13 Dean Jansa 2010-08-24 10:45:08 EDT
[root@marathon-01 tmp]# for f in config.? 
> do
> xmllint --relaxng /usr/share/cluster/cluster.rng $f
> done
<?xml version="1.0"?>
<cluster name="foo" config_version="1">
  <clusternodes/>
  <rm/>
</cluster>
config.1 validates
<?xml version="1.0"?>
<cluster name="foo" config_version="1">
  <logging>
    <logging_daemon name="one"/>
  </logging>
  <clusternodes/>
  <rm/>
</cluster>
config.2 validates
<?xml version="1.0"?>
<cluster name="foo" config_version="1">
  <logging>
    <logging_daemon name="one"/>
    <logging_daemon name="two"/>
  </logging>
  <clusternodes/>
  <rm/>
</cluster>
config.3 validates
Comment 14 releng-rhel@redhat.com 2010-11-10 14:59:37 EST
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.

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