Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tunnelmgrd]: Warm boot support #2166

Merged
merged 3 commits into from
Mar 17, 2022

Conversation

theasianpianist
Copy link
Contributor

Signed-off-by: Lawrence Lee lawlee@microsoft.com

What I did
Add warmboot support to tunnelmgrd

  • At initialization, check if warmboot occurred. Replay IPinIP tunnel creation if it did but avoid duplicate APP_DB set

Why I did it
During warmboot, tunnelmgrd initiates a write to APP_DB for an IPinIP tunnel which already exists in hardware prior to the warmboot. This causes an orchagent crash.

How I verified it
Run the new tunnelmgrd warmboot test

Details if related

Signed-off-by: Lawrence Lee <lawlee@microsoft.com>

std::map<std::string, TunnelInfo > m_tunnelCache;
std::map<std::string, IpPrefix> m_intfCache;
std::string m_peerIp;

std::set<std::string> m_tunnelReplay;
bool replayDone;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Looks like initialization is missing. Assign default to 'false' here.

@@ -191,6 +210,13 @@ void TunnelMgr::doTask(Consumer &consumer)
++it;
}
}

if (!replayDone &&
Copy link
Collaborator

Choose a reason for hiding this comment

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

Prefer to keep in one line for this. This will help controlling the number of lines in the file growing quickly.

- Initialize variable
- Reduce line count

Signed-off-by: Lawrence Lee <lawlee@microsoft.com>
prsunny
prsunny previously approved these changes Mar 9, 2022
@prsunny
Copy link
Collaborator

prsunny commented Mar 14, 2022

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Signed-off-by: Lawrence Lee <lawlee@microsoft.com>
@prsunny prsunny merged commit 829b219 into sonic-net:master Mar 17, 2022
qiluo-msft pushed a commit that referenced this pull request Mar 21, 2022
* [tunnelmgrd]: Warm boot support
Signed-off-by: Lawrence Lee <lawlee@microsoft.com>
dprital pushed a commit to dprital/sonic-swss that referenced this pull request May 8, 2022
* [tunnelmgrd]: Warm boot support
Signed-off-by: Lawrence Lee <lawlee@microsoft.com>
preetham-singh pushed a commit to preetham-singh/sonic-swss that referenced this pull request Aug 6, 2022
* [tunnelmgrd]: Warm boot support
Signed-off-by: Lawrence Lee <lawlee@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants