Bug 549752 - system.setChildChannels returns 1 instead of throwing exception
Summary: system.setChildChannels returns 1 instead of throwing exception
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: API
Version: 530
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Tomas Lestach
QA Contact: Garik Khachikyan
URL:
Whiteboard:
Depends On:
Blocks: sat531-api
TreeView+ depends on / blocked
 
Reported: 2009-12-22 15:13 UTC by Tomas Lestach
Modified: 2015-01-04 21:57 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-03-03 14:18:14 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2010:0128 0 normal SHIPPED_LIVE Red Hat Network Satellite bug fix update 2010-03-03 14:17:49 UTC

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


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