Skip to content

[vlan] Update test_vlan#2973

Merged
daall merged 2 commits intosonic-net:masterfrom
AndriiLozovyi:update_vlan_test
Feb 11, 2021
Merged

[vlan] Update test_vlan#2973
daall merged 2 commits intosonic-net:masterfrom
AndriiLozovyi:update_vlan_test

Conversation

@AndriiLozovyi
Copy link
Copy Markdown
Contributor

Signed-off-by: Andrii-Yosafat Lozovyi [email protected]

Description of PR

Summary: test_vlan fails due to recent PR in sonic-utilities - 1382. When test tries to add untagged vlan for a interface that already have one untagged vlan, it receives error message Error: Ethernet8 is already untagged member! . So in order to make test pass, we need to delete vlan from interfaces before adding new ones.
This change is needed for master and 202012 Sonic images. On teardown there is config reload, therefore after test execution, default settings will be restored.

vlan/test_vlan.py::test_vlan_tc1_send_untagged ERROR
vlan/test_vlan.py::test_vlan_tc2_send_tagged ERROR
vlan/test_vlan.py::test_vlan_tc3_send_invalid_vid ERROR
vlan/test_vlan.py::test_vlan_tc4_tagged_non_broadcast ERROR
vlan/test_vlan.py::test_vlan_tc5_untagged_non_broadcast ERROR

E           RunAnsibleModuleFail: run module command failed, Ansible Results =>
E           {
E               "changed": true, 
E               "cmd": [
E                   "supervisorctl", 
E                   "stop", 
E                   "arp_responder"
E               ], 
E               "delta": "0:00:00.309234", 
E               "end": "2021-02-10 01:32:43.918828", 
E               "failed": true, 
E               "invocation": {
E                   "module_args": {
E                       "_raw_params": "supervisorctl stop arp_responder", 
E                       "_uses_shell": false, 
E                       "argv": null, 
E                       "chdir": null, 
E                       "creates": null, 
E                       "executable": null, 
E                       "removes": null, 
E                       "stdin": null, 
E                       "stdin_add_newline": true, 
E                       "strip_empty_ends": true, 
E                       "warn": true
E                   }
E               }, 
E               "msg": "non-zero return code", 
E               "rc": 1, 
E               "start": "2021-02-10 01:32:43.609594", 
E               "stderr": "", 
E               "stderr_lines": [], 
E               "stdout": "arp_responder: ERROR (no such process)", 
E               "stdout_lines": [
E                   "arp_responder: ERROR (no such process)"
E               ]
E           }
show vlan config
Name VID Member Mode
-------- ----- ---------- --------
Vlan200 200 Ethernet8 tagged
Vlan1000 1000 Ethernet4 untagged
Vlan1000 1000 Ethernet8 untagged
Vlan1000 1000 Ethernet12 untagged
Vlan1000 1000 Ethernet16 untagged
Vlan1000 1000 Ethernet20 untagged
Vlan1000 1000 Ethernet24 untagged
Vlan1000 1000 Ethernet28 untagged
Vlan1000 1000 Ethernet32 untagged
Vlan1000 1000 Ethernet36 untagged
Vlan1000 1000 Ethernet40 untagged
Vlan1000 1000 Ethernet44 untagged
Vlan1000 1000 Ethernet48 untagged
Vlan1000 1000 Ethernet52 untagged
Vlan1000 1000 Ethernet56 untagged
Vlan1000 1000 Ethernet60 untagged
Vlan1000 1000 Ethernet64 untagged
Vlan1000 1000 Ethernet68 untagged
Vlan1000 1000 Ethernet72 untagged
Vlan1000 1000 Ethernet76 untagged
Vlan1000 1000 Ethernet80 untagged
Vlan1000 1000 Ethernet84 untagged
Vlan1000 1000 Ethernet88 untagged
Vlan1000 1000 Ethernet92 untagged
Vlan1000 1000 Ethernet96 untagged

sudo config vlan member add --untagged 100 Ethernet8
Error: Ethernet8 is already untagged member!

Fixes # (issue)

Type of change

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

Approach

What is the motivation for this PR?

Make test_vlan passed

How did you do it?

Delete untagged vlan if interfaces already have one.

How did you verify/test it?

Run test on t0 topo on master, 201911 and 202012 images.

vlan/test_vlan.py::test_vlan_tc1_send_untagged PASSED
vlan/test_vlan.py::test_vlan_tc2_send_tagged PASSED
vlan/test_vlan.py::test_vlan_tc3_send_invalid_vid PASSED
vlan/test_vlan.py::test_vlan_tc4_tagged_non_broadcast PASSED
vlan/test_vlan.py::test_vlan_tc5_untagged_non_broadcast PASSED

Any platform specific information?

SONiC.master.119-dirty-20210209.083357
Build commit: 1d99d14e
Build date: Tue Feb  9 08:49:25 UTC 2021
Platform: x86_64-arista_7170_64c
HwSKU: Arista-7170-64C

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

Documentation

Signed-off-by: Andrii-Yosafat Lozovyi <[email protected]>
@AndriiLozovyi AndriiLozovyi requested a review from a team as a code owner February 10, 2021 18:18
Comment thread tests/vlan/test_vlan.py Outdated
@daall daall merged commit b6c1ea4 into sonic-net:master Feb 11, 2021
@dprital
Copy link
Copy Markdown

dprital commented Feb 28, 2021

Hi, this fix is required also for 202012. Can you please merged it as well ?

@AndriiLozovyi
Copy link
Copy Markdown
Contributor Author

@dprital this fix is already merged for 202012, it is skipped only for 201911 images.

@dprital
Copy link
Copy Markdown

dprital commented Mar 2, 2021

@AndriiLozovyi - Thanks. I looked for the label (Included on 202012) and I didn't see it.

praveen-li pushed a commit to praveen-li/sonic-mgmt that referenced this pull request Jul 29, 2021
Signed-off-by: Andrii-Yosafat Lozovyi <[email protected]>
 Conflicts:
	tests/vlan/test_vlan.py
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
…atically (sonic-net#16717)

src/sonic-utilities

* ff8a0643 - (HEAD -> 202205, origin/202205) [202205][acl-loader] Identity ICMP v4/v6 based on IP_PROTOCOL for custom ACL table types (sonic-net#3003) (6 days ago) [Zhijian Li]
* d9bc820e - Handle NotImplementedError exception while changing optoe write max (sonic-net#2985) (8 days ago) [mihirpat1]
* 4bf29fe2 - [sonic-package-manager] Increate timeout for sonic-package-manager migrate (sonic-net#2973) (8 days ago) [Yaqiang Zhu]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants