Bug 838510

Summary: API call 'system.setChildChannels' removes all child channels if "redhat-rhn-proxy*" is passed as parameter.
Product: Red Hat Satellite 5 Reporter: Dimitar Yordanov <dyordano>
Component: APIAssignee: Tomas Lestach <tlestach>
Status: CLOSED NOTABUG QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: low Docs Contact:
Priority: low    
Version: 550CC: cperry
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-07-12 14:37:05 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: 462714    

Description Dimitar Yordanov 2012-07-09 10:02:17 UTC
Description of problem:

API call 'system.setChildChannels' removes all child channels  if "redhat-rhn-proxy*" is passed as parameter.

Version-Release number of selected component (if applicable):
Satellite 5.5

How reproducible:
100%

Steps to Reproduce:
1. Sync the following channels to Satellite:
satellite-sync -c rhel-x86_64-server-6 -c rhn-tools-rhel-x86_64-server-6 -c 
redhat-rhn-proxy-5.5-server-x86_64-6
2. Register EL6 system.
3. Execute the following script with the ID of the system registered in [2].

#python
import sys, xmlrpclib
RHN_SERVER='https://xxxxx.redhat.com/rpc/api'
RHN_USER='xxxx'
RHN_PASS='xxxx'
SYS_ID='100001000X'

client = xmlrpclib.Server(RHN_SERVER, verbose=0)
key = client.auth.login(RHN_USER, RHN_PASS)

client.system.setChildChannels(key,SYS_ID,['rhn-tools-rhel-x86_64-server-6'])
client.system.setChildChannels(key,SYS_ID,['redhat-rhn-proxy-5.5-server-x86_64-6'])

Actual results:
No child channels are assigned to the system.

Expected results:
Channel : 'rhn-tools-rhel-x86_64-server-6' is assigned to the system.

Additional info:

Comment 2 Tomas Lestach 2012-07-12 14:37:05 UTC
Unless you do not list the 'rhn-tools-rhel-x86_64-server-6' channel label within the system.setChildChannels parameters, your server will be unsubscribed from the channel.

Check the API doc:
Subscribe the given server to the child channels provided. This method will unsubscribe the server from any child channels that the server is currently subscribed to, but that are not included in the list. The user may provide either a list of channel ids (int) or a list of channel labels (string) as input.


Your server won't be subscribed to the proxy channel as the only possibility how to get subscribed into the proxy channel is the proxy activation.


It looks like NOTABUG for me.