Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 911760

Summary: rhn-channel script fails to report server error messages
Product: [Retired] Red Hat Network Reporter: Jose A. Rivera <jarrpa>
Component: RHN/Client ToolsAssignee: Richard Bernleithner <rbernlei>
Status: CLOSED EOL QA Contact:
Severity: low Docs Contact:
Priority: unspecified    
Version: _unsetCC: bsaylor, jarrpa, nbronson, nraghava
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-07-05 15:20:37 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:
Attachments:
Description Flags
rhn-channel patch none

Description Jose A. Rivera 2013-02-15 21:39:20 UTC
Created attachment 697983 [details]
rhn-channel patch

Description of problem:
rhn-channel script fails to report server error messages

Version-Release number of selected component (if applicable):
rhn-setup-1.0.0-87.el6.noarch

How reproducible:
Always

Steps to Reproduce:
1. Try to add a channel from an account not authorized to add channels on a RHEL system.
  
Actual results:
An error has occurred:
<type 'exceptions.TypeError'>
See /var/log/up2date for more information

/var/log/up2date says:
[Fri Feb 15 15:16:11 2013] up2date 
Traceback (most recent call last):
  File "/usr/sbin/rhn-channel", line 164, 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:
Error communicating with server. The message was:

Error Class Code: 37
Error Class Info: You are not allowed to perform administrative tasks on this system.
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:
The attached patch seems to fix the problem.

Comment 1 Jose A. Rivera 2014-08-29 13:10:33 UTC
Can someone have a look at this so the bug stops appearing in my list of bugs? :)

Comment 2 David Spalding 2014-09-08 18:29:13 UTC
Script in question is provided by: 

rhn-setup-1.0.0.1-16.el6.noarch
[root@dspaldin ~]# rpm -qi rhn-setup
Name        : rhn-setup                    Relocations: (not relocatable)
Version     : 1.0.0.1                           Vendor: Red Hat, Inc.
Release     : 16.el6                        Build Date: Wed 23 Oct 2013 06:02:08 AM EDT
Install Date: Tue 13 May 2014 11:09:05 PM EDT      Build Host: x86-022.build.eng.bos.redhat.com
Group       : System Environment/Base       Source RPM: rhn-client-tools-1.0.0.1-16.el6.src.rpm
Size        : 219899                           License: GPLv2
Signature   : RSA/8, Wed 30 Oct 2013 09:44:14 AM EDT, Key ID 199e2f91fd431d51
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
URL         : https://fedorahosted.org/spacewalk
Summary     : Configure and register an RHN/Spacewalk client
Description :
rhn-setup contains programs and utilities to configure a system to use
Red Hat Network or Spacewalk, and to register a system with a Red Hat Network
or Spacewalk server.

Comment 3 David Spalding 2014-09-08 20:21:48 UTC
(In reply to Jose A. Rivera from comment #1)
Jose, can you confirm if the problem is the response from RHN Hosted, or the 
/usr/sbin/rhn-channel script?

Comment 4 Jose A. Rivera 2014-09-09 03:54:14 UTC
This is in /usr/sbin/rhn-channel.

Comment 5 Jose A. Rivera 2014-12-10 15:36:46 UTC
Mild cage-rattling on this. :)

Comment 6 Thomas "Shea" DeAntonio 2017-07-05 15:20:37 UTC
As you may already be aware, Red Hat is transitioning from the Red Hat Network (RHN) hosted interface to the Red Hat Subscription Management (RHSM) interface in July 2017. Red Hat has invested in and seen success from RHN for many years, and used that experience to build more robust technologies like RHSM. 
 
If you have not yet migrated your RHN systems to RHSM or you are a Red Hat Satellite customer, please review the information from. https://access.redhat.com/products/red-hat-subscription-management#migration. 
 
Since we are shutting down RHN, no further actions will be taken with this bug or enhancement request.  You can find additional information at RHSM product page (https://access.redhat.com/products/red-hat-subscription-management).  If you have further questions, please contact support (https://access.redhat.com/products/red-hat-subscription-management#support).