Skip to content

[test] Add lacp fallback test cases#1187

Merged
pavel-shirshov merged 3 commits intosonic-net:masterfrom
hzheng5:lacp-fallback-test
Nov 7, 2019
Merged

[test] Add lacp fallback test cases#1187
pavel-shirshov merged 3 commits intosonic-net:masterfrom
hzheng5:lacp-fallback-test

Conversation

@hzheng5
Copy link
Copy Markdown
Contributor

@hzheng5 hzheng5 commented Oct 30, 2019

Signed-off-by: Haiyang Zheng haiyang.z@alibaba-inc.com

Description of PR

Summary:

  1. Run lag_fallback test cases if fallback is configure on lags with only 1 member port
  2. Run lag_minlink test cases only if min_ports is configured on lags with more than 2 member ports

Please note min_port and fallback configure are mutual exclusive for each lag.

Type of change

  • [] Bug fix
  • [] Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Approach

How did you do it?

The lag_fallback test cases flap the link from VM side while keeping the physical link up, this is to simulate the situation where the remote end stops sending LACP DU. If fallback is enabled, the port should still be selected, and LAG should be kept up. Otherwise, the member port should be unselected, and LAG should be brought down.

How did you verify/test it?

ansible-playbook test_sonic.yml -i {INVENTORY} --limit {DUT_NAME} -e testcase_name=lag_2 -e testbed_name={TESTBED_NAME}

Any platform specific information?

no

Supported testbed topology if it's a new test case?

t0 topo

Documentation

https://github.com/Azure/SONiC/blob/master/doc/lag/LACP%20Fallback%20Feature%20for%20SONiC_v0.5.md

Signed-off-by: Haiyang Zheng <haiyang.z@alibaba-inc.com>
@hzheng5 hzheng5 mentioned this pull request Oct 30, 2019
3 tasks
@pavel-shirshov pavel-shirshov self-assigned this Oct 30, 2019
Copy link
Copy Markdown
Contributor

@pavel-shirshov pavel-shirshov left a comment

Choose a reason for hiding this comment

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

as comment

Comment thread ansible/library/minigraph_facts.py Outdated
Signed-off-by: Haiyang Zheng <haiyang.z@alibaba-inc.com>
@pavel-shirshov pavel-shirshov self-requested a review November 5, 2019 21:54
pavel-shirshov
pavel-shirshov previously approved these changes Nov 5, 2019
@pavel-shirshov pavel-shirshov dismissed their stale review November 5, 2019 21:57

Sorry. I need to re-review it

@pavel-shirshov
Copy link
Copy Markdown
Contributor

I'll double review it in a day. Sorry for delay. I want to be sure it is safe with old tests.

@hzheng5
Copy link
Copy Markdown
Contributor Author

hzheng5 commented Nov 5, 2019

I'll double review it in a day. Sorry for delay. I want to be sure it is safe with old tests.

sure. no problem. thanks~

Comment thread ansible/roles/test/tasks/lag_2.yml Outdated
include: single_lag_test.yml
with_items: lag_facts.names
when: test_minlink|bool == true
when: lag_facts.lags[item]['po_config']['runner']['min_ports'] is defined
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think you should keep the test_minlink here. The test could be disabled when test_minlink is equal to false.

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.

OK. got your point. have reverted this change caused by merge. Thanks

Comment thread ansible/roles/test/tasks/lag_2.yml Outdated
include: single_lag_lacp_rate_test.yml
with_items: lag_facts.names
when: test_rate|bool == true No newline at end of file
when: lag_facts.lags[item]['po_config']['runner']['min_ports'] is defined
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The same here for test_rate.
Please fix it and I'll merge

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.

done. thanks!

Comment thread ansible/roles/test/tasks/lag_2.yml Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lag_facts.lags[item]['po_config']['runner']['min_ports'] is defined and test_minlink|bool == true

Comment thread ansible/roles/test/tasks/lag_2.yml Outdated
Signed-off-by: Haiyang Zheng <haiyang.z@alibaba-inc.com>
@hzheng5 hzheng5 force-pushed the lacp-fallback-test branch from 2e15266 to bdf99e1 Compare November 7, 2019 05:44
@pavel-shirshov pavel-shirshov merged commit 63aa93e into sonic-net:master Nov 7, 2019
@hzheng5 hzheng5 deleted the lacp-fallback-test branch November 7, 2019 22:23
@chenkelly
Copy link
Copy Markdown
Contributor

Hi @hzheng5
Please guide us how to deploy minigraph and test LAG fallback.
When we merge code and use the following command to deploy, LAG fallback configuration does not apply to specified DUT.
Could you give us some advice about the question? Thanks very much.
ansible-playbook -i lab config_sonic_basedon_testbed.yml -l {DUT_NAME} -e testbed_name={TESTBED_NAME} -e deploy=true -e save=true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants