Bug 651792

Summary: rhn-channel: RFE: list all available channels related to my system.
Product: Red Hat Enterprise Linux 6 Reporter: Petr Sklenar <psklenar>
Component: rhn-client-toolsAssignee: Miroslav Suchý <msuchy>
Status: CLOSED ERRATA QA Contact: Martin Minar <mminar>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0CC: agk, dswegen, jhutar, mkoci, mminar, msuchy, pwouters, slukasik
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rhn-client-tools-1.0.0-51 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-19 13:05:18 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    

Description Petr Sklenar 2010-11-10 10:05:31 UTC
Description of problem:
Please add support for listing available channels. 
rhn-channel can contain option for ex: --available-channels

Steps to Reproduce:

1.rhn-channel -l
my-base-channel

2.rhn-channel --available-channels
your system can be subscribed to :
child-channel-1
child-channel-2

  
Expected results:
I can list all available channels related to my system.

Comment 1 Miroslav Suchý 2011-01-14 16:08:14 UTC
fixed in spacewalk.git in commit b9514bdb221d9635f58c188d3408146f1058f6ba

Comment 2 Miroslav Suchý 2011-01-17 15:03:13 UTC
cherrypicked to satellite.git as commit 11659a3a8eb22756cd19e8b92c9079d4cfcc7de7

Comment 5 Miroslav Suchý 2011-02-24 10:03:25 UTC
This is the same problem as was in bug 651857. Flipping back

Comment 7 Miroslav Suchý 2011-02-24 13:34:01 UTC
Fixed in spacewalk.git in commit 3612ebb308e43497ab380464f2d197e591579396
Cherry-picked to satellite.git as commit 57050333742e40fffd7fb971be5968606e502c0d

Comment 8 Martin Minar 2011-02-28 09:35:25 UTC
Verified in rhn-client-tools-1.0.0-51.el6.noarch

Comment 9 Paul Wouters 2011-05-12 17:29:44 UTC
work around: yum repolist all

which is what I had to use.

Note that there is no man page (but that's filed in another bug) but more importantly the --help for "list" channels does not even clarify whether this is listing the installed or available channels. I had no idea until i found the above yum command.

Note this is for rhel5, not rhel6. I have no access to rhel6 to verify.

Comment 10 Petr Sklenar 2011-05-13 07:09:10 UTC
hello,
I am registered on the rhel6 box and 'rhn-channel -l' works as expected.

When I am trying 'rhn-channel -L'  it needs username and password, why?
When I try 'yum repolist all' (thx to Paul Wouters from Comment 9) it does not need any username and password

using rhn-setup-1.0.0-60.el6.noarch

Comment 11 Miroslav Suchý 2011-05-13 07:26:43 UTC
Ad #9
rhn-channel in RHEL6.1 state:
       -l, --list
              Print a list of channel(s) that you are currently subscribed to.

       -L, --available-channels
              Print a list of all available child channels.

Which is IMHO under-stable.

Ad #10:
That is becouse -l use backend API call, which use only systemID, while -L use frontend API call system.listChildChannels() which require user and password. 

That is IMO correct, because it will be IMO potentional security problem to pass such information without login/password. List of channels you are subscribed to, is what somebody with Satellite account have given to you. You should not be allowed to see more. Unless you know the password.

Comment 12 errata-xmlrpc 2011-05-19 13:05:18 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0565.html

Comment 16 Alasdair Kergon 2011-05-27 14:30:05 UTC
The link to the errata above is incorrect and should be http://rhn.redhat.com/errata/RHBA -2011-0565.html  (remove the space)