Bug 1435691

Summary: rhncfg: NameError: global name 'raise_with_tb' is not defined
Product: Red Hat Satellite 5 Reporter: Pavel Studeník <pstudeni>
Component: ClientAssignee: Tomáš Kašpárek <tkasparek>
Status: CLOSED CURRENTRELEASE QA Contact: Pavel Studeník <pstudeni>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 580CC: tlestach
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rhncfg-5.10.87-9-sat Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-06-21 12:10:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1358815    

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