Bug 462824 - sosreport chkconfig test in cluster plugin fails on systems with non-US locale
Summary: sosreport chkconfig test in cluster plugin fails on systems with non-US locale
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: sos
Version: 5.4
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Adam Stokes
QA Contact: BaseOS QE
URL:
Whiteboard:
Depends On: 462823
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-09-19 07:33 UTC by Christian Jung
Modified: 2009-11-24 23:41 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
The sos cluster plugin did not account for situations where the system locale may be set to something other than US English. On a system with a different locale, the plugin could not start chkconfig and therefore did not work. The cluster plugin now starts chkconfig with LC_ALL=C set, and works as intended.
Clone Of:
Environment:
Last Closed: 2009-09-02 07:30:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2009:1418 0 normal SHIPPED_LIVE sos bug fix and enhancement update 2009-09-02 07:29:42 UTC

Description Christian Jung 2008-09-19 07:33:08 UTC
+++ This bug was initially created as a clone of Bug #462823 +++
This also applies to RHEL 5, although sos package version is slightly different:
sos-1.7-9.2.el5_2.2

Description of problem:
Creating a sosreport on systems configured to a non-US locate, the cluster plugin fails during service/chkconfig tests.

Version-Release number of selected component (if applicable):
sos-1.7-6.1.el4_6.2-noarch

How reproducible:
always


Steps to Reproduce:
1. set system locale to non-US (below output is taken from a german locale)
2. execute sosreport
  
Actual results:
One or more plugins have detected a problem in your configuration.
Please review the following messages:

cluster:
    * service cman is not started in default runlevel
    * service ccsd is not started in default runlevel
    * service rgmanager is not started in default runlevel
    * service fenced is not started in default runlevel

Are you sure you would like to continue (y/n) ?

Expected results:
no warning messages, since services are running and active

Additional info:
Example output of chkconfig --list ccsd:
ccsd            0:Aus   1:Aus   2:Ein   3:Ein   4:Ein   5:Ein   6:Aus

And the service is running:
root      4385  0.0  0.0 21860 1292 ?        Ssl  Sep01   1:27 ccsd

The python script is checking for the value "On":
/usr/lib/python2.4/site-packages/sos/policyredhat.py
    def runlevelByService(self, name):
        ret = []
        try:
           for tabs in commands.getoutput("/sbin/chkconfig --list %s" % name).split():
              try:
                 (runlevel, onoff) = tabs.split(":", 1)
              except ValueError:
                 pass
              else:
                 if onoff == "on":
                    ret.append(int(runlevel))

IMO the following change would fix the problem:
- for tabs in commands.getoutput("/sbin/chkconfig --list %s" % name).split():
+ for tabs in commands.getoutput("LC_ALL=C /sbin/chkconfig --list %s" % name).split():

Comment 6 Ruediger Landmann 2009-09-02 04:28:21 UTC
Release note added. If any revisions are required, please set the 
"requires_release_notes" flag to "?" and edit the "Release Notes" field accordingly.
All revisions will be proofread by the Engineering Content Services team.

New Contents:
The sos cluster plugin did not account for situations where the system locale may be set to something other than US English. On a system with a different locale, the plugin could not start chkconfig and therefore did not work. The cluster plugin now starts chkconfig with LC_ALL=C set, and works as intended.

Comment 7 errata-xmlrpc 2009-09-02 07:30:21 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/RHBA-2009-1418.html


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