Michael,

I recall at the time I initially moved netvirt to blueprint, I faced cyclic 
dependency. The approach I used is the following:
Instead of having the blueprint resolved the service you need, which end up 
having deadlock due to cyclic dependency, resolve the service you need using 
WaitingServiceTracker in the class needing the service. So the blueprint 
containers will be able to start, and once started, the service should become 
available in the OSGi Registry, making them available to be retrieved by a 
ServiceTracker.

At the time, it was FibManager and VpnManager that had a cyclic dependency, 
hence I've done this in FibManager:
https://git.opendaylight.org/gerrit/#/c/38991/29/vpnservice/fibmanager/fibmanager-impl/src/main/java/org/opendaylight/netvirt/fibmanager/FibManagerImpl.java@34
 
<https://git.opendaylight.org/gerrit/#/c/38991/29/vpnservice/fibmanager/fibmanager-impl/src/main/java/org/opendaylight/netvirt/fibmanager/FibManagerImpl.java@34>
 and this in VpnManager: 
https://git.opendaylight.org/gerrit/#/c/39012/19/vpnservice/vpnmanager/vpnmanager-impl/src/main/java/org/opendaylight/netvirt/vpnmanager/VpnInterfaceManager.java@152
 
<https://git.opendaylight.org/gerrit/#/c/39012/19/vpnservice/vpnmanager/vpnmanager-impl/src/main/java/org/opendaylight/netvirt/vpnmanager/VpnInterfaceManager.java@152>

Hoe this helps,
Alexis

 
> On Jan 20, 2017, at 8:42 AM, Michael Vorburger <vorbur...@redhat.com> wrote:
> 
> On Fri, Jan 20, 2017 at 12:23 AM, Robert Varga <n...@hq.sk 
> <mailto:n...@hq.sk>> wrote:
> On 01/19/2017 07:21 PM, Robert Varga wrote:
> > He has cooked up https://git.opendaylight.org/gerrit/50682 
> > <https://git.opendaylight.org/gerrit/50682> to correct
> > that, which I think will make the issue more obvious and probably split
> > this conversation into multiple tracks.
> 
> With the patch the error is actually more useful for BUG-3128 case (and
> confirms what I suspected is the underlying root cause):
> 
> 21:53:42 2. NOK
> org.opendaylight.openflowplugin.applications.lldp-speaker: OSGi state =
> Active, Karaf bundleState = GracePeriod, due to: Blueprint
> 21:53:42 1/19/17 9:46 PM
> 21:53:42 Missing dependencies:
> 21:53:42 Available DOM RPC for binding RPC: interface
> org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.PacketProcessingService
> 
> What does it say for the genius issue?
> 
> completely different issue there - we now see that there is a cyclic 
> dependency, which it looks like CSS was somehow able to handle, but blueprint 
> is not anymore. I'll follow-up with more details to genius-dev only, to spare 
> controller-dev the traffic about this now again purely genius internal 
> problem (if anyone is interest in a detailed discussion how to analyse and 
> resolve a cyclic dependency with blueprint, please follow the continuing 
> thread with the same subject on genius-dev).
> 
> Tom, THANK YOU so much for https://git.opendaylight.org/gerrit/#/c/50682/ 
> <https://git.opendaylight.org/gerrit/#/c/50682/> !!! Makes a world of 
> difference to analyse these kind of problems.
>  
> 
> Bye,
> Robert
> 
> 
> _______________________________________________
> controller-dev mailing list
> controller-dev@lists.opendaylight.org 
> <mailto:controller-dev@lists.opendaylight.org>
> https://lists.opendaylight.org/mailman/listinfo/controller-dev 
> <https://lists.opendaylight.org/mailman/listinfo/controller-dev>
_______________________________________________
controller-dev mailing list
controller-dev@lists.opendaylight.org
https://lists.opendaylight.org/mailman/listinfo/controller-dev

Reply via email to