Fix Infinite loop in addVpnInterface 65/77765/2
authorVishal Thapar <vthapar@redhat.com>
Wed, 14 Nov 2018 07:28:43 +0000 (12:58 +0530)
committerVishal Thapar <vthapar@redhat.com>
Wed, 14 Nov 2018 10:07:37 +0000 (15:37 +0530)
commit0c58f1597bf486780ddb984a8e77bddeac19e577
tree70de3f5abf5823c16804dd1ff086e70ae1613d42
parent2b9880aa1d96ac6d7d526258a2155f535d64ad7b
Fix Infinite loop in addVpnInterface

add VPNInterface logic in VpnInterfaceManager
has a bug where if add VPN Interface fails, it keeps
retrying till it succeeds. There is no delay in retries.
IF there are any DS issues, this results in an infinite
loop which ties up a DJC thread and fills logs with same
msg repeatedly at a near instant rate.

Bug is in logic where onFailure() method adds the failed
interface back to retry. So while DJC does give up after
5 retries, since we've added it back to the queue
subsequent attempts start soon after.

This also fixes a copy-paste log msg which made it
difficult to troubleshoot where the error log
was repeating from.

Change-Id: I97c73dc879aaa4e1a4b3489e146d1a9337b62810
Signed-off-by: Vishal Thapar <vthapar@redhat.com>
vpnmanager/impl/src/main/java/org/opendaylight/netvirt/vpnmanager/VpnInterfaceManager.java