This section discusses the troubleshooting process with respect to the multi-bundle/OSGi aspects of ONOS.
Bundle Internals
As mentioned in ONOS : An Overview, ONOS is a multi-module project managed as OSGi bundles by Karaf.
Each bundle is represented by a Maven project with its own POM file, and each project may implement zero or more services. The bundles describe dependencies via:
- POM files - interdependencies between various projects, used by Maven during the build process
- annotations (e.g.
@Reference
) within the code - interdependencies between various services, used by Karaf to resolve module dependencies during system startup
Notably, both prohibit circular references, and the POM file hierarchy, the cross-linking of projects not indicated to be dependencies. As such, the following result in failed builds or the failure to load modules at runtime:
- Not adhering to the dependencies indicated in the POM file(s)
- Circular annotation references among services
- Misconfiguration e.g. circular dependency references in the POM file(s)
Symptoms
In addition to direct build failures, the above may manifest as the IDE not recognizing the usage of certain packages within others.
Unloaded modules may manifest as failures of certain commands from the Karaf command line, and the absence of bundles in the output of list
.
Webconsole