Bug 855883 - rhn_check fails with traceback when more instances of rhn_check are running
Summary: rhn_check fails with traceback when more instances of rhn_check are running
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Clients
Version: 1.8
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Milan Zázrivec
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On: 830776
Blocks: space18
TreeView+ depends on / blocked
 
Reported: 2012-09-10 14:08 UTC by Milan Zázrivec
Modified: 2012-12-27 07:29 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 830776
Environment:
Last Closed: 2012-11-01 16:20:16 UTC
Embargoed:


Attachments (Terms of Use)

Description Milan Zázrivec 2012-09-10 14:08:26 UTC
+++ This bug was initially created as a clone of Bug #830776 +++

Description of problem:
I scheduled kickstart (in WebUI, Satellite 5.4.1) to be picked up after some specified time in expectation that osad running on the host machine would pick up the action at that time. But I ran rhn_check approximately at the same moment and rhn_check failed with traceback (in /var/log/up2date).

Traceback (most recent call last):
  File "/usr/sbin/rhn_check", line 374, in <module>
    cli.run()
  File "/usr/share/rhn/up2date_client/rhncli.py", line 84, in run
    sys.exit(self.main() or 0)
  File "/usr/sbin/rhn_check", line 63, in main
    CheckCli.__check_instance_lock()
  File "/usr/sbin/rhn_check", line 369, in __check_instance_lock
    sys.stderr.write(rhncli.utf8_encode(_("Attempting to run more than one instance of rhn_check. Exiting.\n")))
<type 'exceptions.NameError'>: global name '_' is not defined

Version-Release number of selected component (if applicable):
RHEL Server 6.3 x86_64
rhn-client-tools-1.0.0-87.el6.noarch

How reproducible:
always

Steps to Reproduce:
1. in WebUI - schedule kickstart no sooner than some time
2. run rhn_check manually at the same time
3. check logs
  
Actual results:
traceback is shown + logged in /var/log/up2date

Expected results:
localized error message should be shown ("Attempting to run more than one instance of rhn_check. Exiting.")

Additional info:
Simplest fix is to add these lines to /usr/sbin/rhn_check:

import gettext
t = gettext.translation('rhn-client-tools', fallback=True)
_ = t.ugettext

Comment 1 Milan Zázrivec 2012-09-10 14:10:53 UTC
spacewalk.git master: a34f5f29e3c5076b0bbea3618b9ccc12a491192a

Comment 2 Jan Pazdziora 2012-10-30 19:24:53 UTC
Moving ON_QA. Packages that address this bugzilla should now be available in yum repos at http://yum.spacewalkproject.org/nightly/

Comment 3 Jan Pazdziora 2012-11-01 16:20:16 UTC
Spacewalk 1.8 has been released: https://fedorahosted.org/spacewalk/wiki/ReleaseNotes18


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