Out of Memory when static Routes are configured with unresolved next hop 97/697/1
authorChi-Vien Ly <chivly@cisco.com>
Thu, 25 Jul 2013 05:51:03 +0000 (22:51 -0700)
committerChi-Vien Ly <chivly@cisco.com>
Thu, 25 Jul 2013 05:51:03 +0000 (22:51 -0700)
commita2e03732c76b35b28622be16bd3c1c0c5bd7c2b5
tree4f3fb1dc7575b6bf28603f9936d8aa193d826e7f
parent4731ee462f09ad75d31a175b0dd5abfa11eb2b6a
Out of Memory when static Routes are configured with unresolved next hop
Root cause: This problem happens when there are staticRoutes configured but their
next hop IP are unresolved (ie. not responding to ARP Request).
StaticRouteImpl.java spawns a thread requesting hostTracker to discover the host,
this thread is waiting forever due to a bug in the thread (HostTrackerCallable)
that handles the discovery which never returns since the host is not responding.

Solution:
- Instead of creating threads dynamically, we create a threadpool of 2 and reuse
  the threads.
- Fix the bug in HostTrackerCallable to sleep(2000) and returns.

Change-Id: Ic04d1dbaf17d5cd6672646050d71abb9885695e9
Signed-off-by: Chi-Vien Ly <chivly@cisco.com>
opendaylight/forwarding/staticrouting/src/main/java/org/opendaylight/controller/forwarding/staticrouting/internal/StaticRoutingImplementation.java
opendaylight/hosttracker/implementation/src/main/java/org/opendaylight/controller/hosttracker/internal/HostTracker.java
opendaylight/hosttracker/implementation/src/main/java/org/opendaylight/controller/hosttracker/internal/HostTrackerCallable.java