Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 846359

Summary: rhn-channel long options do not need/support =
Product: Red Hat Enterprise Linux 6 Reporter: Stephen Gordon <sgordon>
Component: rhn-client-toolsAssignee: Milan Zázrivec <mzazrivec>
Status: CLOSED ERRATA QA Contact: Pavel Studeník <pstudeni>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.3CC: dyasny, jhutar, jneedle, pstudeni, sgrinber
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: A bug in the code. Consequence: rhn-channel would throw a traceback in case the provided authentication info was incorrect. Fix: Was simple. Result: rhn-channel handles the above situation nicely, without a traceback.
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-21 10:06:54 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: 815463    

Description Stephen Gordon 2012-08-07 14:47:33 UTC
Description of problem:

Throughout the guide instructions for using rhn-channel to add channels specify the use of --channel=<channel name>. The use of the equals sign causes an exception and should in fact be replaced by a space.

Comment 1 Stephen Gordon 2012-08-07 15:16:31 UTC
Simon, what was the actual exception you got? I tested on my system using the production RHN QA account and these commands work fine:

# rhn-channel --add --channel=rhel-x86_64-server-6-rhevm-3
# rhn-channel --add --channel=jbappplatform-5-x86_64-server-6-rpm
# rhn-channel --add --channel=rhel-x86_64-server-supplementary-6

Are you sure you didn't get the exception related to not being an administrator?:

http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Virtualization/3.0/html/Installation_Guide/Tasks_RHEV_Red_Hat_Network_Subscription.html

Comment 2 Simon Grinberg 2012-08-12 14:40:42 UTC
I could not recreate it on a server upgraded from RHEL 6.2, so I tried again on my rhevm31


[root@rhevm31 ~]# rhn-channel --add --channel=rhel-x86_64-server-supplementary-6
Username: run-support-simon
Password: 
An error has occurred:
<type 'exceptions.TypeError'>
See /var/log/up2date for more information

In the log:
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 +: 'AuthenticationOrAccountCreationError' and 'str'

The following worked

[root@rhevm31 ~]# rhn-channel -a -c rhel-x86_64-server-supplementary-6
Username: rhn-support-simon
Password: 

and then I found out that I've had my username wrong on first attempt. 
So the bug is with rhn-channel which gets an exception while creating an error message from a string and an error object thus fails to report authentication failure correctly. 

We can move this bug to rhn-channel

Comment 4 Milan Zázrivec 2012-09-04 12:25:24 UTC
Same problem has been already addressed in upstream in bug #804559.

Comment 5 Milan Zázrivec 2012-09-06 14:18:51 UTC
*** Bug 855011 has been marked as a duplicate of this bug. ***

Comment 6 Milan Zázrivec 2012-09-10 12:57:06 UTC
satellite.git CLIENT-RHEL-6: 56e0339a2cea57cd06779c4d966fbeef3fe27040

Comment 10 errata-xmlrpc 2013-02-21 10:06:54 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-0388.html