Ovsdb route held in contrail even after deletion from OVS.
Ovsdb route held in contrail even after deletion from OVS.

Problem:
This is not OVSDB issue but an issue in rebake of bridge dependant routes from the parent evpn routes.
Say there are two paths in EVPN route with path preference as 100 and peer as Peer-A and Peer-B.
Path1 - Peer-A and preference 100
Path2 - Peer-B and preference 100.
Now preference value of Path1 is changed to 1. So the order of path becomes:
Path2 - Peer-B and preference 100
Path1 - Peer-A and preference 1
This is because preference is used as a major parameter for comparision.
When dependant bridge route is updated in this case then this update gets suppressed as path under change was
Path1 but after change Path2 becomes preferred. Bridge route only updates itself if it sees a change in preferred path
and it picks preferred after sorting is done. This causes suppression.
Solution is to get active path from evpn route before sorting so that bridge route is aware that active path has changed.
Also make sure that any non active path becoming active path is handled.

This impacted OVS because OVS cancels the age timer of stale path if non 1(HA-STALE) preference is seen on bridge route.
In this example bridge route will stay at 100 pref though all parent evpn path will move to 1. So no removal of mac.

Solution:
As said identify modified path was active path before sorting or has become a new active path.

Change-Id: I2214e7aad8c8aa85a35f0e7568dc53283d55accd
Closes-bug: #1651618
(cherry picked from commit 7925b6be39337f12f4d759806686b15c688ff815)

eonpatapon/contrail-controller,rombie/contrail-controller,eonpatapon/contrail-controller,nischalsheth/contrail-controller,nischalsheth/contrail-controller,nischalsheth/contrail-controller,eonpatapon/contrail-controller,eonpatapon/contrail-controller,nischalsheth/contrail-controller,nischalsheth/contrail-controller,eonpatapon/contrail-controller,rombie/contrail-controller,rombie/contrail-controller,eonpatapon/contrail-controller,eonpatapon/contrail-controller,nischalsheth/contrail-controller,rombie/contrail-controller,rombie/contrail-controller,nischalsheth/contrail-controller,rombie/contrail-controller,rombie/contrail-controller,nischalsheth/contrail-controller