Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 471431

Summary: second ocf_log message doesn't make it to /var/log/messages
Product: Red Hat Enterprise Linux 5 Reporter: Nate Straz <nstraz>
Component: rgmanagerAssignee: Lon Hohberger <lhh>
Status: CLOSED ERRATA QA Contact: Cluster QE <mspqa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.3CC: cfeist, cluster-maint, edamato
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-09-02 11:04:42 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Nate Straz 2008-11-13 17:44:32 UTC
Description of problem:

When starting an HA LVM service on a mis-configured node, the second log message from the resource agent lvm.sh does not make it into the logs.

/var/log/messages:

Nov 13 11:02:12 marathon-01 clurgmgrd: [4935]: <err> HA LVM:  Improper setup detected 
Nov 13 11:02:12 marathon-01 clurgmgrd: [4935]: <err> WARNING: An improper setup can cause data corruption! 
Nov 13 11:02:12 marathon-01 clurgmgrd[4935]: <notice> Service service:halvm is recovering 
Nov 13 11:02:12 marathon-01 clurgmgrd[4935]: <warning> #71: Relocating failed service service:halvm 

/usr/share/cluster/lvm.sh:
        ##
        # The volume group to be failed over must NOT be in
        # lvm.conf:activation/volume_list; otherwise, machines
        # will be able to activate the VG regardless of the tags
        ##
        if lvm dumpconfig activation/volume_list | grep $OCF_RESKEY_vg_name; then
                ocf_log err "HA LVM:  Improper setup detected"
                ocf_log err "- $OCF_RESKEY_vg_name found in \"volume_list\" in lvm.conf
"
                return $OCF_ERR_GENERIC
        fi

Version-Release number of selected component (if applicable):
rgmanager-2.0.44-1.el5

How reproducible:
100%

Steps to Reproduce:
1. Setup an HA LVM service with VG name equal to a node's host name.
  
Actual results:
See above

Expected results:
The second message 'marathon found in "volume_list" in lvm.conf' should appear in /var/log/messages

Additional info:

Comment 1 Lon Hohberger 2008-11-13 22:04:42 UTC
[root@marathon-05 ~]# clulog -s 5 "- test - be disregardink"
clulog: invalid option --  
clulog -s severity [-f facility] [-l priority_filter] [-n program name] 
                 [-p pid] "message text"
[root@marathon-05 ~]# clulog -s 5 "test - be disregardink"
[root@marathon-05 ~]#

Reproduced.

Argument parsing failure in clulog.  Getting rid of the "-" at the beginning of the log message should fix it.

Comment 2 Lon Hohberger 2008-11-13 22:10:35 UTC
So basically starting any argument (even a quoted one) breaks getopt.

This isn't hard to fix.

Comment 5 Lon Hohberger 2009-06-11 19:33:53 UTC
clulog -s 6 "foo" was printing '6' to the logs.

Comment 8 errata-xmlrpc 2009-09-02 11:04:42 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2009-1339.html