Bug 1435691 - rhncfg: NameError: global name 'raise_with_tb' is not defined
Summary: rhncfg: NameError: global name 'raise_with_tb' is not defined
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Client
Version: 580
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tomáš Kašpárek
QA Contact: Pavel Studeník
URL:
Whiteboard:
Depends On:
Blocks: sat580-low
TreeView+ depends on / blocked
 
Reported: 2017-03-24 14:26 UTC by Pavel Studeník
Modified: 2017-06-21 12:10 UTC (History)
1 user (show)

Fixed In Version: rhncfg-5.10.87-9-sat
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-06-21 12:10:18 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Pavel Studeník 2017-03-24 14:26:42 UTC
Description of problem:
I receive traceback when system is not valid registered to satellite and I try to use rhncfg-client. The correct message should be shown.

Version-Release number of selected component (if applicable):
rhncfg-5.10.87-8.el6sat.noarch

How reproducible:
always

Steps to Reproduce:
1. register system to satellite 
2. change ID in file /etc/sysconfig/rhn/systemid 
3. rhncfg diff

Actual results:
>> rhncfg-client diff
Using server name vega15.qa.lab.tlv.redhat.com
Traceback (most recent call last):
  File "/usr/bin/rhncfg-client", line 38, in <module>
    sys.exit(Main().main() or 0)
  File "/usr/share/rhn/config_common/rhn_main.py", line 218, in main
    handler.run()
  File "/usr/share/rhn/config_client/handler_base.py", line 56, in run
    for file in self.get_valid_files():
  File "/usr/share/rhn/config_client/handler_base.py", line 30, in get_valid_files
    for file in self.repository.list_files():
  File "/usr/share/rhn/config_client/rpc_cli_repository.py", line 73, in list_files
    return self.rpc_call('config.client.list_files', self.system_id)
  File "/usr/share/rhn/config_client/rpc_cli_repository.py", line 60, in rpc_call
    raise_with_tb(cfg_exceptions.AuthenticationError(
NameError: global name 'raise_with_tb' is not defined

Expected results:
Authentication failed: Invalid digital server certificate
Error Message:
    Please run rhn_register as root on this client
Error Class Code: 9
Error Class Info: Invalid System Credentials.
Explanation: 
     An error has occurred while processing your request. If this problem
     persists please consult the Red Hat Customer Portal Knowledge Base
     landing page on common registration Error Class Codes at
     https://access.redhat.com/solutions/17036 for a possible resolution.
     If you choose to open a support case in the Red Hat Customer Portal,
     please be sure to include details of what you were trying to do when
     this error occurred and specifics on how to reproduce this problem.


Additional info:
My fix https://github.com/spacewalkproject/spacewalk/pull/525

Comment 1 Tomáš Kašpárek 2017-03-24 14:28:21 UTC
PR accepted as spacewalk.git(master): 85cc23662b38acebbcbb2645d6cfad69f4e4cf8d

Comment 4 Pavel Studeník 2017-05-10 11:41:07 UTC
Verified with packages:

RHEL6:
rhncfg-client-5.10.74-10.el6sat.noarch

RHEL7:
rhncfg-client-5.10.74-11.el7sat.noarch

RHEL5:
rhncfg-client-5.10.74-10.el5sat

Comment 5 Pavel Studeník 2017-05-10 13:19:10 UTC
fix correct packages:

rhncfg-actions-5.10.87-9.el5sat
rhncfg-client-5.10.87-10.el6sat.noarch
rhncfg-client-5.10.87-9.el7sat.noarch


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