Bug 471431 - second ocf_log message doesn't make it to /var/log/messages
Summary: second ocf_log message doesn't make it to /var/log/messages
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: rgmanager
Version: 5.3
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Lon Hohberger
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-11-13 17:44 UTC by Nate Straz
Modified: 2009-09-02 11:04 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-09-02 11:04:42 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2009:1339 0 normal SHIPPED_LIVE Low: rgmanager security, bug fix, and enhancement update 2009-09-01 10:42:29 UTC

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


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