Bug 846359 - rhn-channel long options do not need/support =
Summary: rhn-channel long options do not need/support =
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: rhn-client-tools
Version: 6.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Milan Zázrivec
QA Contact: Pavel Studeník
URL:
Whiteboard:
: 855011 (view as bug list)
Depends On:
Blocks: 815463
TreeView+ depends on / blocked
 
Reported: 2012-08-07 14:47 UTC by Stephen Gordon
Modified: 2013-02-21 10:06 UTC (History)
5 users (show)

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.
Clone Of:
Environment:
Last Closed: 2013-02-21 10:06:54 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0388 0 normal SHIPPED_LIVE rhn-client-tools bug fix and enhancement update 2013-02-20 20:51:47 UTC

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


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