Bug 549752

Summary: system.setChildChannels returns 1 instead of throwing exception
Product: Red Hat Satellite 5 Reporter: Tomas Lestach <tlestach>
Component: APIAssignee: Tomas Lestach <tlestach>
Status: CLOSED ERRATA QA Contact: Garik Khachikyan <gkhachik>
Severity: medium Docs Contact:
Priority: low    
Version: 530CC: cperry, dyordano, gkhachik, jhutar, mkoci
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-03-03 14:18:14 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: 518263    

Description Tomas Lestach 2009-12-22 15:13:09 UTC
Description of problem:
system.setChildChannels returns 1 even if the transaction wasn't successful

Version-Release number of selected component (if applicable):
sat 5.3.0

How reproducible:
always

Steps to Reproduce:
1. Let's have a system registered to base channel B1 and its child channel C1
2. Subscribe this system to another child channel C2 of a DIFFERENT BASE channel B2 via API call system.setChildChannels
  
system.setChildChannels(key, id, ["C2"])

Actual results:
The system will correctly be unsubscribed from all child channels we didn't list in the api call (C1) and correctly won't be subscribed to the desired child channel C2.

But:
API call returned 1

Expected results:
(According to the setChildChannels doc: Returns: int - 1 on success, exception thrown otherwise.)

API call would throw an exception and roll back the entire transaction.

Comment 1 Tomas Lestach 2010-01-14 18:03:32 UTC
Implemented exception for the described case:
<Fault 1230: 'redstone.xmlrpc.XmlRpcFault: Unable to subscribe this system to the requested channel: "<child-channel>"'>

spacewalk.git: 30f26dbe0f6a66dfd8a06a772bc092ad09b64fc2

Comment 2 Tomas Lestach 2010-01-15 14:13:13 UTC
One more fix. One commit was not enough.

spacewalk.git: b00f8e4cddd7bedc619494411920fd896047b1a8

Comment 4 Tomas Lestach 2010-02-17 13:53:07 UTC
satellite.git:
 13f948f1991c63c509392878a0764a60d4b1fa08
 0917c526da6d16278b5e2788cfe9fbdba94466c6

Comment 7 errata-xmlrpc 2010-03-03 14:18:14 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-2010-0128.html