Restart BP container after dependency wait time out 20/42320/3
authorTom Pantelis <tpanteli@brocade.com>
Fri, 22 Jul 2016 04:11:44 +0000 (00:11 -0400)
committerTom Pantelis <tpanteli@brocade.com>
Mon, 25 Jul 2016 01:25:36 +0000 (01:25 +0000)
commite6b9c7e282a526aeb1469b6f7aa9b61f69d01743
treed60a4e91cfd8bea1586ce10dc74b747dbb08ada2
parent0eda999492644870f55582837e469ee3b3729e5d
Restart BP container after dependency wait time out

The blueprint container first waits for all dependencies (ie OSGi
services, clustered app config etc). By default it waits 5 min after
which it fails the container. For a missing OSGi service this is
probably OK but it could take longer for a clustered-app-config if the
data store isn't available. Ideally we would use an infinite timeout but
unfortunately the timeout can't be configured globally - it can only be set
at the bundle level in the manifest and we don't want to have to
configure it in every bundle (although it may be possible with some maven
magic in odlparent). Therefore I added code in BlueprintBundleTracker to
listen for container FAILURE events and restart the container if it's
due to missing dependencies.

Change-Id: Ib8ebb1a02dfd601e48722f9fc3011df7391432cb
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/BlueprintBundleTracker.java
opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/BlueprintContainerRestartServiceImpl.java