Upgrade support of ovsdb reconciliation 72/82772/7
authorChetan Arakere Gowdru <chetan.arakere@altencalsoftlabs.com>
Fri, 28 Jun 2019 11:08:08 +0000 (16:38 +0530)
committerChetan Arakere Gowdru <chetan.arakere@altencalsoftlabs.com>
Sun, 22 Dec 2019 13:03:26 +0000 (13:03 +0000)
commit3fef3d0578e11c8d05163b718369fdc0b79f2327
treea42da65448fc9c3e226669df1de21eab15446fc5
parent67bf53bd254adf4576e5a519267c371947ba3a2f
Upgrade support of ovsdb reconciliation

Description:
When Upgrade in process, the config DS may not be fully populated when
reconciliaiton is triggered. This will result in uncessaary deletion on tunnels
(as config and oper DS are compared and delta changes will be pushed to switch).
Changes are done to postpone the reconcilaiton task until upgrade flag is set to false.

Testing Steps.

1) Karaf up and running and tunnels created.
2) Set upgade flag to true.
PUT http://localhost:8181/restconf/config/odl-serviceutils-upgrade:upgrade-config
{
  "upgrade-config": {
    "upgradeInProgress": true
  }
}
3) Close karaf terminal(kill karaf process)
4) Don’t clear data/instance/journal/snapshots
5) del-manager on switches and delete tunnels manually on switches.
6) Start karaf and wait DPN connects.
7) Check the tunnel are not recreated by reconciliation process.
8) Set upgradeInProgress=false and check the tunnels re-created back

Change-Id: Id6cc8e1a3aa5e139597fa3071d536e1f5ac0802f
Signed-off-by: Chetan Arakere Gowdru <chetan.arakere@altencalsoftlabs.com>
Signed-off-by: xcheara <chetan.arakere@altencalsoftlabs.com>
southbound/southbound-impl/pom.xml
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/OvsdbConnectionManager.java
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/SouthboundProvider.java
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/reconciliation/OvsdbUpgradeStateListener.java [new file with mode: 0644]
southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/OvsdbDataTreeChangeListenerTest.java
southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/SouthboundProviderTest.java