Bug 462824 - sosreport chkconfig test in cluster plugin fails on systems with non-US locale
sosreport chkconfig test in cluster plugin fails on systems with non-US locale
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: sos (Show other bugs)
5.4
All Linux
medium Severity medium
: rc
: ---
Assigned To: Adam Stokes
BaseOS QE
:
Depends On: 462823
Blocks:
  Show dependency treegraph
 
Reported: 2008-09-19 03:33 EDT by Christian Jung
Modified: 2009-11-24 18:41 EST (History)
5 users (show)

See Also:
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.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-09-02 03:30:21 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Christian Jung 2008-09-19 03:33:08 EDT
+++ 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 00:28:21 EDT
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 03:30:21 EDT
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.