Skip to content

Commit

Permalink
[sonic-swsss] Fix the issue of field "next_hop_ip" not getting update…
Browse files Browse the repository at this point in the history
…d in state DB in ERSPAN Mirror (sonic-net#1375)

* Fix the issue of field "next_hop_ip" not getting updated
in State DB Table MIRROR_SESSION_TABLE

Updated test case to check next_hop_ip in state db.
Also test case enahanced to see if route change in propgated correctly.

Signed-off-by: Abhishek Dosi <[email protected]>

* Fix test failure and address review comments

Signed-off-by: Abhishek Dosi <[email protected]>

* Fix for Mirror ERSPAN Failure. Issue is we need to wait till
we do not get expected (key,value) tuple instead of waiting for just key
Danny was able to reproduce
the issue on local setup. It is more timing issue where
if dvs container is running fast we will not see this issue
as value get updated quickly.

Signed-off-by: Abhishek Dosi <[email protected]>

* based on syslog on Jenkin route/nexthop update is
taking more then 5 seconds. To fix that yse polling interval of 10
seconds.

* Increase timeout to 60 seconds

Signed-off-by: Abhishek Dosi <[email protected]>

* Added Log

Signed-off-by: Abhishek Dosi <[email protected]>

* Revert some of changes done to debug/fix test failure issue
as they are resolved with sonic-build-tools fix

Signed-off-by: Abhishek Dosi <[email protected]>
  • Loading branch information
abdosi committed Aug 19, 2020
1 parent 413141b commit 2e56756
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions orchagent/mirrororch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -949,6 +949,13 @@ void MirrorOrch::updateNextHop(const NextHopUpdate& update)
session.nexthopInfo.nexthop = NextHopKey("0.0.0.0", "");
}

// Update State DB Nexthop
setSessionState(name, session, MIRROR_SESSION_NEXT_HOP_IP);

SWSS_LOG_NOTICE("Updated mirror session state db %s nexthop to %s",
name.c_str(), session.nexthopInfo.nexthop.to_string().c_str());


// Resolve the neighbor of the new next hop
updateSession(name, session);
}
Expand Down

0 comments on commit 2e56756

Please sign in to comment.