[CONTROLLER-40] SanityTest needs rework Created: 16/Oct/13  Updated: 25/Jul/23  Resolved: 05/May/15

Status: Resolved
Project: controller
Component/s: adsal
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Prasanth Pallamreddy Assignee: Prasanth Pallamreddy
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: PC


Attachments: Java Source File JMXBundlePrinter.java    
External issue ID: 116
Priority: High

 Description   

The current sanity test is very fragile and needs to be revisited. The purpose of this test is to validate all the bundles ensuring that they are all in a healthy state.

1) Use a proper mechanism to start the controller process. Consider using a controller-maven-plugin to plug into the lifecycle phases of maven. Wrapping run.sh and sleeping and doing System.exit() seems very convoluted.

2) The sanityTest has not been implemented as a test. Its a bundle which is copied to the plugins directory which spins for some time and exits the JVM. The test is better implemented as a JMX client being out of process to validate the bundles.



 Comments   
Comment by Prasanth Pallamreddy [ 17/Oct/13 ]

To be able to retrieve the bundle states via JMX,

1) Start controller as 'run.sh -jmx'. This enables JMX capabilities
2) Compile and run the attached JMXBundlePrinter client to see bundle states like below:

ObjectName:org.ow2.chameleon:type=bundle,id=113 name:org.opendaylight.controller.sal-common-util state:32
ObjectName:org.ow2.chameleon:type=bundle,id=207 name:org.eclipse.persistence.core state:32
ObjectName:org.ow2.chameleon:type=bundle,id=129 name:org.opendaylight.yangtools.yang-data-api state:32
ObjectName:org.ow2.chameleon:type=bundle,id=172 name:io.netty.transport state:32
ObjectName:org.ow2.chameleon:type=bundle,id=8 name:ch.qos.logback.classic state:32
ObjectName:org.ow2.chameleon:type=bundle,id=170 name:org.opendaylight.controller.subnets.northbound state:32
ObjectName:org.ow2.chameleon:type=bundle,id=38 name:org.eclipse.persistence.antlr state:32
ObjectName:org.ow2.chameleon:type=bundle,id=66 name:jackson-xc state:32
ObjectName:org.ow2.chameleon:type=bundle,id=123 name:org.opendaylight.controller.forwarding.staticrouting.northbound state:32
ObjectName:org.ow2.chameleon:type=bundle,id=59 name:org.opendaylight.controller.samples.sample-toaster-consumer state:32
ObjectName:org.ow2.chameleon:type=bundle,id=32 name:org.eclipse.gemini.web.tomcat state:32

...

Comment by Prasanth Pallamreddy [ 17/Oct/13 ]

Attachment JMXBundlePrinter.java has been added with description: Pure JMX Client which dumps bundles and states

Comment by Prasanth Pallamreddy [ 12/Dec/13 ]

Fixed with https://git.opendaylight.org/gerrit/#/c/3420/

Comment by Carol Sanders [ 05/May/15 ]

This bug is part of the project to Move all ADSAL associated component bugs to ADSAL.

Generated at Wed Feb 07 19:52:02 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.