Bug 804559

Summary: rhn-channel: traceback when adding/removing non-existent channel
Product: [Community] Spacewalk Reporter: Lukas Pramuk <lpramuk>
Component: ClientsAssignee: Milan Zázrivec <mzazrivec>
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 1.7CC: jpazdziora
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-11-01 16:22:09 UTC Type: ---
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: 871344    

Description Lukas Pramuk 2012-03-19 09:18:23 UTC
Description of problem:
Adding or removing non-existent channel with rhn-channel tools causes traceback instead of sane warning message.  

Version-Release number of selected component (if applicable):
1.7.14-1.el6 - It's a regression!!! (1.6.47-1.el6 was flawless)

How reproducible:
100%

Steps to Reproduce:
1. Run rhn-channel -u admin -p pass {-a|-r} -c nonsense
2. Error is displayed
3. Traceback is logged
  
Actual results:
# rhn-channel -u admin -p pass -a -c nonsense
An error has occurred:
<type 'exceptions.TypeError'>
See /var/log/up2date for more information

/var/log/up2date:
[Fri Mar 16 12:05:04 2012] up2date
Traceback (most recent call last):
  File "/usr/sbin/rhn-channel", line 162, in <module>
    systemExit(1, e)
  File "/usr/sbin/rhn-channel", line 46, in systemExit
    sys.stderr.write(rhncli.utf8_encode(msg)+'\n')
<type 'exceptions.TypeError'>: unsupported operand type(s) for +: 'CommunicationError' and 'str'


Expected results:
# rhn-channel -u admin -p pass -a -c nonsense
Error communicating with server. The message was:

Error Message:
    Channel nonsense does not exist?
Error Class Code: 40
Error Class Info: The specified channel does not exist.
Explanation: 
     An error has occurred while processing your request. If this problem
     persists please enter a bug report at bugzilla.redhat.com.
     If you choose to submit the bug report, please be sure to include
     details of what you were trying to do when this error occurred and
     details on how to reproduce this problem.

Additional info:

Comment 1 Milan Zázrivec 2012-03-30 11:01:46 UTC
spacewalk.git master: 5feb72eef8563482be7276818d9f6d769918bb0f

Comment 2 Milan Zázrivec 2012-03-30 14:08:14 UTC
spacewalk.git master: 661f8f4189dbbcfda7f46abeff916cb9e6ee54e6

Comment 3 Jan Pazdziora (Red Hat) 2012-06-15 14:00:54 UTC
This is Spacewalk bugzilla -- could we have it public?

Comment 4 Jan Pazdziora (Red Hat) 2012-10-30 19:27:15 UTC
Moving ON_QA. Packages that address this bugzilla should now be available in yum repos at http://yum.spacewalkproject.org/nightly/

Comment 5 Jan Pazdziora (Red Hat) 2012-11-01 16:22:09 UTC
Spacewalk 1.8 has been released: https://fedorahosted.org/spacewalk/wiki/ReleaseNotes18