SNAT Ext. Router scheduling broken w/ upgrade 08/66608/14
authorJosh <jhershbe@redhat.com>
Tue, 19 Dec 2017 10:21:12 +0000 (12:21 +0200)
committerSam Hague <shague@redhat.com>
Wed, 24 Jan 2018 18:48:13 +0000 (18:48 +0000)
commit0d4b5945b5c688c739db8a320f4b024244159ce4
treee4e1a8ef4dc070d4819ea43a76017f3b4f0ca72a
parentb3d190f2ba751295a6c92aa250ffc158d3d1afa1
SNAT Ext. Router scheduling broken w/ upgrade

Depends on this gerrit from genius:
https://git.opendaylight.org/gerrit/#/c/65894/

SNAT requires that all the nodes be in the operational datastore
at the time the external router configurations are pushed to ODL.
At this point the external router is "scheduled", that is, a
switch is chosen to get the flows and track the sessions. In the
case of upgrade, there are in fact no nodes connected to ODL.

Solution:
Wait until all the nodes are connected and only then schedule
the external routers.
1) if the upgrading flag is set, don't schedule external routers
2) When the listener fires, schedule all the external routers

Change-Id: Ib349450905ef9c33fe3640753bb88e65c8ebf967
Signed-off-by: Josh <jhershbe@redhat.com>
vpnservice/natservice/natservice-impl/src/main/java/org/opendaylight/netvirt/natservice/internal/ExternalRoutersListener.java
vpnservice/natservice/natservice-impl/src/main/java/org/opendaylight/netvirt/natservice/internal/UpgradeStateListener.java [new file with mode: 0644]
vpnservice/natservice/natservice-impl/src/main/resources/org/opendaylight/blueprint/natservice.xml