Ask is moving to Stack Overflow and! Please use the "opendaylight" tag on either of these sites. This site is now in Read-Only mode


How to debug MD-SAL startup ?

asked 2014-06-08 22:35:06 -0800

vmithbao gravatar image

I started controller, but found that restconf is not working, which indicated that MD-SAL is not starting up, I didnt see MD-SAL startup related INFO messages.

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted

answered 2014-06-09 09:28:09 -0800

Devin Avery gravatar image

Very similar to your answer - the first step is to run the 'ss' osgi command and pipe that to grep to find the bundle that you modified and see if it is running. From there you can try and start it and most of the time it is not starting because of a dependency issue on a package that is not exported / imported correctly in a pom.xml file.

edit flag offensive delete publish link more

answered 2014-07-02 17:57:42 -0800

anu.nair gravatar image

ModuleInfoBundleTracker is also a good starting point where in config subsystem bundles are loaded by reading the file from META-INF/services/ .

This is where yang modules are read , then create instance by reading the class name from the files under META-INF/services. public Collection<objectregistration<yangmoduleinfo>> addingBundle(Bundle bundle, BundleEvent event) { URL resource = bundle.getEntry(MODULEINFOPROVIDERPATHPREFIX + YangModelBindingProvider.class.getName()); .. }</objectregistration<yangmoduleinfo>

edit flag offensive delete publish link more

answered 2014-06-08 22:38:36 -0800

vmithbao gravatar image

I had modified netconf-impl code. I had confirmed that netconf-impl jar was replaced in plugins folder too. But later I found that the netconf-impl bundle was not even started. After debugging , found that it was not valid OSGI bundle, due to my changes, which involved removing org.osgi.core dependency and replacing it with equinox dependecny. I reverted my change in the pom file, rebuilt the jar, then the bundle came up, LD-SAL also started, I saw all usual INFO level messages initizaing brokers, toaster sample etc. And the restconf APIs also worked.

So if you have modified netconf-impl, pay attention to make sure it is extracted as valid OSGI bundle.

edit flag offensive delete publish link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2014-06-08 22:35:06 -0800

Seen: 215 times

Last updated: Jul 02 '14