Bug 149328 - name error in redhat-config-cluster with rhel 4 upgrade
Summary: name error in redhat-config-cluster with rhel 4 upgrade
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: redhat-config-cluster
Version: 4.0
Hardware: i386
OS: Linux
Target Milestone: ---
: ---
Assignee: Jim Parsons
QA Contact: James Laska
Depends On:
TreeView+ depends on / blocked
Reported: 2005-02-22 15:10 UTC by Geoff Dolman
Modified: 2013-09-02 06:04 UTC (History)
3 users (show)

Clone Of:
Last Closed: 2005-02-22 20:22:57 UTC

Attachments (Terms of Use)

Description Geoff Dolman 2005-02-22 15:10:59 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0

Description of problem:
redhat-config-cluster will not start due to a Name Error "_" is not defined

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

How reproducible:

Steps to Reproduce:
1. Run redhat-config-cluster

Actual Results:  [root@argus ~]# redhat-config-cluster
Traceback (most recent call last):
  File "/usr/sbin/redhat-config-cluster", line 46, in ?
    from clusterpkg.cluconfig_module  import cluconfig
  File "/usr/share/redhat-config-cluster/configure/clusterpkg/cluconfig_module.py", line 11, in ?
    from clusterpkg.services_module   import services
  File "/usr/share/redhat-config-cluster/configure/clusterpkg/services_module.py", line 3, in ?
    from clusterpkg.service_module import service
  File "/usr/share/redhat-config-cluster/configure/clusterpkg/service_module.py", line 4, in ?
    from clusterpkg.service_device_module import device
  File "/usr/share/redhat-config-cluster/configure/clusterpkg/service_device_module.py", line 7, in ?
    from clusterpkg.util_smbconf_module import smbConf
  File "/usr/share/redhat-config-cluster/configure/clusterpkg/util_smbconf_module.py", line 55, in ?
    FILE_HEADER = _("""
NameError: name '_' is not defined

Expected Results:  redhat-config-cluster should start.

Additional info:

I have been able to fix this poblem by editing the python scripts, however I thought it was worth logging a bug report anyway in case other machines have the same issue. I have a two node cluster running redhat cluster suite. Both nodes were on RHEL 3. I upgraded one node to 4 and although the cluster works on this node the command redhat-config-cluster does not with the error above.
I traced the problem and found that in each case it was due to an error message (or text string) encoded as 
MESSAGE = _("""wibble wibble wibble""")

When the module is imported there is a Name Error of "_" not defined.
For some reason this is not an issue with RHEL 3 but I can't work out why not -- however in RHEL 4 I have changed
in redhat-config-cluster.py

in ForkedCommand.py and

FILE_HEADER in util_smbconf_module.py

In each case either removing the _ or the _( and )

It may be some other problem with the machine/upgrade was responsible for introducing these problems and I have only made cosmetic changes, but unfortunately owing to it being a running system I can't exhaustively test the changes I have made to redhat-config-cluster to see if it still functions as expected.
The version is redhat-config-cluster-1.0.3-1

Comment 1 Jim Parsons 2005-02-22 20:22:57 UTC
This is not a bug, as RHCS has not been released on RHEL4 yet.

Comment 2 Geoff Dolman 2005-02-23 10:49:10 UTC
What's the anticipated release date please?

Comment 3 Kyriacos 2005-06-08 15:25:39 UTC
Regarding this issue I have found that on header of those scripts that this 
error is appearing the following code is missing:

	import gettext

... but from theother hand in some of the scripts already exists. After adding 
this everything works fine! What is very weird is how this is supposed to be 
running on RH EL3???

Comment 4 Geoff Dolman 2005-06-08 15:38:41 UTC
...what is very weird is the fact that red hat claim that RHCS has not been
released on RHEL4 yet (see above or check your available channels in rhn) - but
then this website:



"Red Hat Cluster Suite can be installed on any x86-compatible Red Hat Enterprise
Linux AS or ES system"

Comment 5 srichan 2005-12-22 14:15:42 UTC
Thaks Geoff Dolman your solution works, Still any other changes is do mail me .


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