Bug 483693
Summary: | CRM #1891312 system.set_child_channels fails with exception: java.lang.Integer | ||
---|---|---|---|
Product: | [Retired] Red Hat Network | Reporter: | Issue Tracker <tao> |
Component: | RHN/Web Site | Assignee: | Sebastian Skracic <sskracic> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Red Hat Network Quality Assurance <rhn-qa-list> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | rhn509 | CC: | acressma, dhughes, rhn-bugs, sskracic, tao |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | US=75164 | ||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2010-03-17 23:30:19 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: | 519741 |
Description
Issue Tracker
2009-02-03 02:13:40 UTC
State whether Satellite or RHN hosted >> RHN Hosted API Provide clear and concise problem description as it is understood at the time of escalation >> Problem is being faced with system.set_child_channels API. Systems ID's are being passed in integer array. But looks to be a bug in API. It fails and throws the error - Fault returned from XML RPC Server, fault code -2: unhandeled internal exception: java.lang.Integer Steps to reproduce: You can use this API to reproduce the issue. #!/usr/bin/perl use Frontier::Client; use Data::Dumper; my $HOST = 'xmlrpc.rhn.redhat.com'; my $user = 'rhn-username'; my $pass = 'rhn-password'; my $client = new Frontier::Client(url => "http://$HOST/rpc/api"); my $session = $client->call('auth.login',$user, $pass); my $systemid=1014400330; my $success = $client->call('system.set_child_channels', $session, $systemid,["6950"]); You might have to change the systemid and channel id's as per the system you use to test this issue. Observed behavior >> #perl set-child-channels.pl Fault returned from XML RPC Server, fault code -2: unhandeled internal exception: java.lang.Integer Desired behavior >># perl set-child-channels.pl $VAR1 = '1'; State specific action requested of SEG >> Would like SEG to pass this on to RHN Hosted State whether or not a defect in the product is suspected >> Yes. Looks to be a bug in API. system.set_child_channels If there is a proposed patch, make sure it is in unified diff format (diff -pruN) >> --- UpdateChildChannelsCommand.java.org 2009-02-02 17:30:09.000000000 +0530 +++ UpdateChildChannelsCommand.java 2009-02-02 17:30:38.000000000 +0530 @@ -73,7 +73,7 @@ */ for (Iterator itr = server.getChannels().iterator(); itr.hasNext();) { Channel c = (Channel) itr.next(); - Long cid = c.getId(); + Long cid = new Long(c.getId().longValue()); if (cids.contains(cid)) { // already subscribed Attach sosreport >> Issue related to RHN hosted. Let me know if you still would like to have a sosreport of the system. Let me know if you need any other information from my end. Regards, Paresh This event sent from IssueTracker by xdmoon [Support Engineering Group] issue 262070 Thanks for the great report and proposed patch Paresh, I've verified this occurs on Hosted (but not Satellite 5.2) and the suggested change looks reasonable (perhaps add a null check). Sending up to Hosted team. Xixi This event sent from IssueTracker by xdmoon [Support Engineering Group] issue 262070 This is indeed an issue, thanks for the patch. I'll add this to our backlog. Fixed in 7902c8d6b6b25956cb7603690bb44ede94843c26. Verified on webdev. Test Steps: 1. Access RHN and click on Systems. Select a system and annotate server id (sid). 2. Click on Alter Channel Subscriptions. Annotate a child channel id. 3. Access command line and run callAnyMethod command with the server id and child channel id: python callAnyMethod.py dhughesgit redhat system.setChildChannels 1014793341 [2863] Results: No error is displayed. ======================================== Calling: system.setChildChannels With args: [1014793341, [2863]] ======================================== Returned: 1 |