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

swss-orchagent: add new orch for vnet routes/tunnel routes tables in CONFIG_DB #907

Merged
merged 3 commits into from
Jun 11, 2019

Conversation

weixchen1215
Copy link
Contributor

Signed-off-by: Weixi Chen Weixi.Chen@microsoft.com

What I did

  1. Add VNET_ROUTE and VNET_ROUTE_TUNNEL tables in CONFIG_DB so that VNET routes get persistent after reboot if a config_save is performed.
  2. Add a new orchagent VnetRouteCfgOrch that listens for newly exposed tables in CONFIG_DB which have a one to one relation with existing APP_DB tables.

Why I did it
Static vnet routes provisioned in sonic are not persistence. Switch reboot leads to the loss of static routes. Tables in CONFIG_DB will be persistent if a config save is manually performed.

How I verified it
run vs test: sudo pytest test_vnet.py -s -v --dvsname=vs
output:
/usr/local/lib/python2.7/dist-packages/requests/init.py:83: RequestsDependencyWarning: Old version of cryptography ([1, 2, 3]) may cause slowdown.
warnings.warn(warning, RequestsDependencyWarning)
======================================================================== test session starts ========================================================================
platform linux2 -- Python 2.7.12, pytest-3.3.0, py-1.8.0, pluggy-0.6.0 -- /usr/bin/python
cachedir: .cache
rootdir: /home/weixi-vs/sonic-buildimage/src/sonic-swss/tests, inifile:
collected 3 items

test_vnet.py::TestVnetOrch::test_vnet_orch_2 PASSED [ 33%]
test_vnet.py::TestVnetOrch::test_vnet_orch_3 PASSED [ 66%]
test_vnet.py::TestVnetOrch::test_vnet_orch_1 PASSED [100%]

==================================================================== 3 passed in 174.11 seconds =====================================================================

@weixchen1215 weixchen1215 changed the title swss-common: add new orch for vnet routes/tunnel routes tables in CONFIG_DB swss-orchagent: add new orch for vnet routes/tunnel routes tables in CONFIG_DB May 23, 2019
@lguohan
Copy link
Contributor

lguohan commented May 23, 2019

retest this please

@prsunny
Copy link
Collaborator

prsunny commented May 23, 2019

Depends on this PR

@sonic-net sonic-net deleted a comment from lguohan May 23, 2019
@sonic-net sonic-net deleted a comment from lguohan May 23, 2019
@sonic-net sonic-net deleted a comment from lguohan May 23, 2019
@sonic-net sonic-net deleted a comment from lguohan May 23, 2019
@sonic-net sonic-net deleted a comment from lguohan May 23, 2019
auto t = it->second;
const std::string & op = kfvOp(t);

if (op == SET_COMMAND)
Copy link
Collaborator

Choose a reason for hiding this comment

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

You can pass the op and handle in a single function to avoid code duplication

attrs,
)


Copy link
Collaborator

Choose a reason for hiding this comment

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

You can remove this extra line

Copy link
Contributor Author

Choose a reason for hiding this comment

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

will fix it

@@ -10,6 +10,8 @@
#include "request_parser.h"
#include "ipaddresses.h"

Copy link
Collaborator

Choose a reason for hiding this comment

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

Line skip is not required. You can add it along with other includes

Copy link
Contributor Author

Choose a reason for hiding this comment

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

will fix it

…uplication of code

Signed-off-by: weixi.chen@microsoft.com
@weixchen1215
Copy link
Contributor Author

retest this please

@stcheng
Copy link
Contributor

stcheng commented May 31, 2019

retest this please

1 similar comment
@prsunny
Copy link
Collaborator

prsunny commented Jun 5, 2019

retest this please

{
bool task_result = false;
auto t = it->second;
const std::string & op = kfvOp(t);
Copy link
Contributor

Choose a reason for hiding this comment

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

could you remove the std:: in the cpp file?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

remove them all for my changes in this .cpp files

@prsunny prsunny merged commit 3faa884 into sonic-net:master Jun 11, 2019
EdenGri pushed a commit to EdenGri/sonic-swss that referenced this pull request Feb 28, 2022
oleksandrivantsiv pushed a commit to oleksandrivantsiv/sonic-swss that referenced this pull request Mar 1, 2023
Will list all RIDs that are not present in rid2vid map right after warm boot.
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.

4 participants