[SYSTEMMETR-1] Call to GetClusterMembers RPC throws NPE Created: 02/Jun/17  Updated: 06/Jul/17  Resolved: 06/Jul/17

Status: Resolved
Project: systemmetrics
Component/s: General
Affects Version/s: unspecified
Fix Version/s: None

Type: Bug
Reporter: Tyler Levine Assignee: Ashish Kumar
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Attachments: Text File systemmetrics-stack-trace.txt    
External issue ID: 8590
Priority: High

 Description   

When calling the GetClusterMembers RPC method, StatsCollector throws an NPE (see attached stack trace).

This is due to a change in the exposed MBeans which StatsCollector relied on to get the members of the cluster. The relevant MBean is no longer present, so we get an NPE when we try to get a field from the resulting jolokia JSON object.

The GetClusterMembers RPC should really use the akka MBean to determine cluster members instead of the hacky way it was done in StatsCollector before.



 Comments   
Comment by Tyler Levine [ 02/Jun/17 ]

Attachment systemmetrics-stack-trace.txt has been added with description: stack trace

Comment by Ashish Kumar [ 04/Jul/17 ]

Link to patches for solution:

1. https://git.opendaylight.org/gerrit/#/c/59705/
=> This patch removes the dependency from previous Mbean and uses akka Mbean to recieve information about cluster members.
=> Uses Httpconnection to recieve the response of akka Mbean like other API's.
=> Parses the members ip address from akka response and use these ips to collect shard member information for every ip.

2. https://git.opendaylight.org/gerrit/#/c/59944/
=> This patch implements unit tests for first patch.
=> It mocks the URL connection and checks if getClusterMembers RPC is behaving in desired way by asserting the observed and expected behaviour,

Generated at Wed Feb 07 20:40:07 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.