+++ This bug was initially created as a clone of Bug #1149829 +++ Description of problem: When you have a suborg using a channel shared by trust from the parent org, you're not able to use the channel.software.listSubscribedSystems api method. Version-Release number of selected component (if applicable): spacewalk-java-2.0.2-85.el6sat.noarch How reproducible: 100% Steps to Reproduce: 1. In the parent org, create a sub org 2. In the parent org, create a trust to the sub org 3. In the sub org, register a system and give it the channel shared by trust from the parent 4. Use the api script to try to list it: $ perl 00920875.pl channel id: 101 and label: rhel-x86_64-server-5 channel id: 102 and label: rhel-x86_64-server-6 channel id: 112 and label: rhel-i386-server-5.5 channel id: 109 and label: rhel-i386-as-4 channel id: 110 and label: clone-rhel-x86_64-server-6 channel id: 111 and label: mycustomchan channel id: 113 and label: parentorgchannel Fault returned from XML RPC Server, fault code -210: redstone.xmlrpc.XmlRpcFault: No such channel: parentorgchannel $ cat 00920875.pl #!/usr/bin/perl use Frontier::Client; my $HOST = 'spacewalk.example.com'; my $user = 'suborgadmin'; my $pass = 'redhat'; my $chanlabel = 'parentorgchannel'; my $client = new Frontier::Client(url => "http://$HOST/rpc/api");#, debug=>1); my $session = $client->call('auth.login',$user, $pass); my $channels = $client->call('channel.listAllChannels', $session); # dereference (@) the perl array to loop for (@{$channels}) { print "channel id: " . $_->{'id'}; print " and label: " . $_->{'label'} . "\n"; } my $systems = $client->call('channel.software.listSubscribedSystems', $session, $chanlabel); # dereference (@) the perl array to loop for (@{$systems}) { print "system id: " . $_->{'id'}; print " and name: " . $_->{'name'} . "\n"; } $client->call('auth.logout', $session); Actual results: Fault returned from XML RPC Server, fault code -210: redstone.xmlrpc.XmlRpcFault: No such channel: parentorgchannel Expected results: To have the system returned like system id: 1000010002 and name: gss-rhel6u3-64.usersys.redhat.com Additional info: --- Additional comment from Stephen Herr on 2014-11-11 14:33:38 EST --- This error exactly as described (for listSubscribedSystems) is fixed already in Spacewalk 2.2, however the same problem still exists for channel.software.isUserSubscribable channel.software.isUserManageable channel.software.setGloballySubscribable channel.software.addPackages channel.software.removePackages channel.software.clone channel.software.subscribeSystem (deprecated) Obviously the ones that involve modifying the channel should return an exception if the channel is not owned by the org of the logged in user, but it should make sense and not be a "no such channel" error.
Committing to Spacewalk master: 655808b14be60c172f2fae12546846fb33759251
Moving bugs to ON_QA as we move to release Spacewalk 2.3
Spacewalk 2.3 has been released. See https://fedorahosted.org/spacewalk/wiki/ReleaseNotes23
*** Bug 1140340 has been marked as a duplicate of this bug. ***
*** Bug 1140341 has been marked as a duplicate of this bug. ***