Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions neighsyncd/neighsync.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@

/*
* This is the timer value (in seconds) that the neighsyncd waits for restore_neighbors
* service to finish, should be longer than the restore_neighbors timeout value (60)
* service to finish, should be longer than the restore_neighbors timeout value (120)
* This should not happen, if happens, system is in a unknown state, we should exit.
*/
#define RESTORE_NEIGH_WAIT_TIME_OUT 70
#define RESTORE_NEIGH_WAIT_TIME_OUT 130

namespace swss {

Expand Down
5 changes: 3 additions & 2 deletions neighsyncd/restore_neighbors.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@
# timeout the restore process in 1 min if not finished
# This is mostly to wait for interfaces to be created and up after system warm-reboot
# and this process is started by supervisord in swss docker.
# It would be good to keep that time below routing reconciliation time-out.
TIME_OUT = 60
# It would be good to keep that time consistent routing reconciliation time-out, here
# we are upstream, we shouldn't give up before down stream.
TIME_OUT = 120
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yxieca In normal case, if the interface wasn't down or unconfigured during the warm reboot, the neighbor should be restored right after the interfaces are ready ( a few seconds later), and it should usually be faster than the routing reconciliation since protocol takes time to converge.

The timer here is just to make sure we don't stuck if interfaces state was changed (down) during the warm reboot. So we could wait as much as routing stack timer configured.

I think this timer should be slightly smaller than the routing timer, so when the routing reconciliation is done, it already has the reconciled neighbors in place at SONiC orchagent. Set this value same or higher than routing timer means the neighbor could be reconciled after routing is reconciled, it should work just not optimal in the processing pipe of orchagent.

Since you are changing the value here, do you think you can read the routing timer or if not configured use the default one, then set this accordingly here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved other conversations. Leaving this one for final confirmation.

@zhenggen-xu I made change according to our last conversation. Please take a look again.

Thanks,
Ying


# every 5 seconds to check interfaces states
CHECK_INTERVAL = 5
Expand Down