Bug 846359 - rhn-channel long options do not need/support =
rhn-channel long options do not need/support =
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: rhn-client-tools (Show other bugs)
6.3
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Milan Zazrivec
Pavel Studeník
:
: 855011 (view as bug list)
Depends On:
Blocks: 815463
  Show dependency treegraph
 
Reported: 2012-08-07 10:47 EDT by Stephen Gordon
Modified: 2013-02-21 05:06 EST (History)
5 users (show)

See Also:
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 05:06:54 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Stephen Gordon 2012-08-07 10:47:33 EDT
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 11:16:31 EDT
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 10:40:42 EDT
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 Zazrivec 2012-09-04 08:25:24 EDT
Same problem has been already addressed in upstream in bug #804559.
Comment 5 Milan Zazrivec 2012-09-06 10:18:51 EDT
*** Bug 855011 has been marked as a duplicate of this bug. ***
Comment 6 Milan Zazrivec 2012-09-10 08:57:06 EDT
satellite.git CLIENT-RHEL-6: 56e0339a2cea57cd06779c4d966fbeef3fe27040
Comment 10 errata-xmlrpc 2013-02-21 05:06:54 EST
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

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