Bug 600316

Summary: 'rhn-channel -l' prints traceback, when system is registered, but not subscribed to any channel
Product: Red Hat Enterprise Linux 6 Reporter: Jiri Kastner <jkastner>
Component: rhn-client-toolsAssignee: Milan Zázrivec <mzazrivec>
Status: CLOSED CURRENTRELEASE QA Contact: Petr Sklenar <psklenar>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0CC: jhutar, psklenar, syeghiay
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: rhn-client-tools-1.0.0-19.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-11-10 21:30: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: 582655    
Attachments:
Description Flags
suggested patch none

Description Jiri Kastner 2010-06-04 12:40:14 UTC
Description of problem:
'rhn-channel -l' prints traceback, when system is registered, but not subscribed to any channel

Version-Release number of selected component (if applicable):
rhn-setup-1.0.0-4.el6.noarch
rhn-setup-0.4.20-33.el5_5.2

How reproducible:
always

Steps to Reproduce:
1. in rhn, satellite, spacewalk create empty channel
2. create activation-key for this channel
3. using this key register to rhn, spacewalk, satellite
4. get registered machine via webui
5. alter system base channel on "software=>software channel" to "none - disable this service"
6. run 'rhn-channel -l' on "altered system"
7. check output
  
Actual results:
#rhn-channel -l
Traceback (most recent call last):
  File "/usr/sbin/rhn-channel", line 92, in ?
    main()
  File "/usr/sbin/rhn-channel", line 82, in main
    channels = map(lambda x: x['label'], getChannels().channels())
  File "/usr/share/rhn/up2date_client/rhnChannel.py", line 127, in getChannels
    raise up2dateErrors.NoChannelsError(_("This system may not be updated until it is associated with a channel."))
up2date_client.up2dateErrors.NoChannelsError: This system may not be updated until it is associated with a channel.
#echo $?
1

Expected results:
#rhn-channel -l
This system is not associated with any channel.
#echo $?
1
Additional info:

Comment 1 Milan Zázrivec 2010-06-07 07:36:52 UTC
Created attachment 421731 [details]
suggested patch

Comment 2 Milan Zázrivec 2010-06-07 18:45:58 UTC
spacewalk.git master: 56f268a138aa05ef759ce2e61a6b973923c5c074
satellite.git CLIENT-RHEL-6: c63b6bed0367034948470205c881bd4b45f107f2

Comment 3 Milan Zázrivec 2010-06-24 10:49:15 UTC
*** Bug 607536 has been marked as a duplicate of this bug. ***

Comment 5 Petr Sklenar 2010-07-28 11:45:02 UTC
reproduced and verified with rhn-setup-1.0.0-27

Comment 6 releng-rhel@redhat.com 2010-11-10 21:30:09 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.