Description of problem: Custom channel created through api does not show up in Channels tab. Also, if you try executing a script something like: import xmlrpclib server = xmlrpclib.Server("http://saturl/rpc/api", verbose = 0) key = server.auth.login("admin", "password") server.channel.software.create(key, "foobar", "foobar-name", "foobar-summary", "channel-ia32", "") server.channel.software.getDetails(key, "foobar") it returns "xmlrpclib.Fault: <Fault -210: 'redstone.xmlrpc.XmlRpcFault: No such channel'>". Now, if we click on "manage software channels", we can see the channel over there and after that we can see it in "channels" tab as well. Everything works smoothly after this. So, if we run above script after this, it will return details of newly created channels.
Increasing severity of the bug to "high" because this means none of the custom channel related api involving channel creation would succeed.
After further investigation, found that the channel created is not showing up from the Channel tab because there does not exist a proper record in the rhnPrivateChannelFamily. Visiting the "Manage Software Channels" page fixes this, because when this page is loaded it will add the records (if needed) to rhnChannelFamily and rhnPrivateChannelFamily. This bug was actually introduced by the fix for bug 486018. In the past, when a channel was created (via CreateChannelCommand.create()) entries were added to rhnChannelFamily/rhnPrivateChannelFamily via the ChannelFamilyFactory (via updateFamilyPermissions). The fix implemented for bug 486018 added updated org creation logic to add a record to rhnChannelFamily, but did not add an entry to rhnPrivateChannelFamily. As a result, when a channel was created using the API the ChannelFamilyFactory will now skip creating the rhnPrivateChannelFamily record based on the existance of the proper record in rhnChannelFamily. In order to fix this, will be updating the following scenarios to use the ChannelFamilyFactory for the following scenarios: - org creation (ui & api - org.createOrg) - channel creation (api - channel.software.create) - channel cloning (api - channel.software.clone)
In addition, the backend code is also being updated to ensure that these entries are added for org=1.
git commits: backend: efa37dfc2f22740b44ce93d1e02c3541d75d244f, 7c5694297bdf5767eb2346840480de4092497c22 api/ui: cf74d0129af6493970fc715307eb0aab410dea8c
verified.
This doesn't appear to be a problem for newly created orgs, but it seems to reappear for org=1. It seems something is changed from previous iso which has altered the behavior. Moving to fails_qa so that we can resolve this issue.
Satellite-5.3.0-RHEL5-re20090414.0-i386-embedded-oracle.iso Saw this problem after the initial install, satellite-sync followed by a run of the API tests on org=1. Created a second org, ran the API tests and verified that the the run was successful. Also, verified that the rhnPrivateChannelFamily was populated for that new org. Since this issue appears associated only with org=1, I'm reassigning it to Pradeep for further investigation.
The fix seems to be present but the issue can be reproduced on latest satellite. import xmlrpclib server = xmlrpclib.Server("http://saturl/rpc/api", verbose = 0) key = server.auth.login("admin", "password") server.channel.software.create(key, "foobar", "foobar-name", "foobar-summary", "channel-ia32", "") server.channel.software.getDetails(key, "foobar") it returns "xmlrpclib.Fault: <Fault -210: 'redstone.xmlrpc.XmlRpcFault: No such channel'>".
Verified in stage -> RELEASE_PENDING
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/RHEA-2009-1434.html