Skip to content

[chassis]:sonic-swss test changes for Virtual chassis#1345

Merged
daall merged 22 commits intosonic-net:masterfrom
saravanansv:master-virtualchassistest
Aug 19, 2020
Merged

[chassis]:sonic-swss test changes for Virtual chassis#1345
daall merged 22 commits intosonic-net:masterfrom
saravanansv:master-virtualchassistest

Conversation

@saravanansv
Copy link
Contributor

@saravanansv saravanansv commented Jul 8, 2020

sonic-net/sonic-buildimage#4709 is a perquisite PR to create/delete a virtual chassis.
Similar to create_vnet.sh, virtual_chassis.py is used to create the virtual chassis test environment.

sonic-swss test changes for Virtual chassis

Signed-off-by: Saravanan Sellappa [email protected]

What I did

  1. Add a test_virtual_chassis.py to verify the virtual chassis
  2. support virtual chassis topology in sonic-swss's conftest.py to run the test_virtual_chassis.py.
    Notable changes in conftest.py include
    • Unlike create_vnet, virtual_chassis does not use a sw container.
    • New DockerVirtualChassisTopology class to setup the connections when the
      virtual chassis containers restart.

Why I did it
In order to verify chassis_db service and related swss changes with new virtual chassis tests under sonic-swss/tests/

How I verified it
Existing sonic-swss/tests still pass. The chassis_db service, connectivity between the chassis instances are verified with test_virtual_chassis.py

Details if related

sonic-net/sonic-buildimage#4709 is a PR for create/delete a virtual chassis.
Similar to create_vnet.sh, virtual_chassis.py is used to create the virtual chassis test
environment.
The changes here are to
1. Add a test_virtual_chassis.py to verify the virtual chassis
2. support virtual chassis topology in conftest.py to run the test_virtual_chassis.py.
   Notable changes in conftest.py are
   * Unlike create_vnet, virtual_chassis does not use a sw container.
   * New DockerVirtualChassisTopology class to setup the connections when the
   vitual chassis containers restart.
@ghost
Copy link

ghost commented Jul 8, 2020

CLA assistant check
All CLA requirements met.

@lgtm-com
Copy link

lgtm-com bot commented Jul 8, 2020

This pull request introduces 1 alert when merging c5ba1eb into 94c622f - view on LGTM.com

new alerts:

  • 1 for Unused local variable

sonic-net/sonic-buildimage#4709 is a PR for create/delete a virtual chassis.
Similar to create_vnet.sh, virtual_chassis.py is used to create the virtual chassis test
environment.
The changes here are to
1. Add a test_virtual_chassis.py to verify the virtual chassis
2. support virtual chassis topology in conftest.py to run the test_virtual_chassis.py.
   Notable changes in conftest.py are
   * Unlike create_vnet, virtual_chassis does not use a sw container.
   * New DockerVirtualChassisTopology class to setup the connections when the
   vitual chassis containers restart.
swss tests can now start and destroy a virtual chassis from conftest.
virtual chassis's neighbors are VirtualServers with ipaddr configured
as per the default_config of the neighbor.
Address review comments
remove virtual_chassis.py and README as its not going to be used.
@daall daall self-requested a review July 18, 2020 02:50
If verify is skipped, the test_virutal_chassis runs too early and
fails.
@lguohan
Copy link
Contributor

lguohan commented Jul 22, 2020

retest this please

Copy link
Contributor

@daall daall left a comment

Choose a reason for hiding this comment

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

Overall approach LGTM, a few minor nitpicks in the comments. 🚀

Use 4 chars for vct's namespace string size
use print()
remove sysport validations in chassis-db as they will be moved under config-db
rename the topology files
@lgtm-com
Copy link

lgtm-com bot commented Jul 24, 2020

This pull request introduces 1 alert when merging 5ae8758 into a9479e6 - view on LGTM.com

new alerts:

  • 1 for Testing equality to None

address LGTM alert in line 1221
change iteritems to items
small comment to retrigger build
small comment to retrigger build, DBConnector build failure looks unrelated to this PR
lguohan
lguohan previously approved these changes Jul 29, 2020
in conftest, use the utf-8 decode when reading the output
in test_virtual_chassis, iter no longer available in python3
@saravanansv
Copy link
Contributor Author

retest vsimage please

@lguohan
Copy link
Contributor

lguohan commented Aug 6, 2020

retest this please

@saravanansv
Copy link
Contributor Author

retest this please

@saravanansv
Copy link
Contributor Author

retest this please

@saravanansv
Copy link
Contributor Author

retest this please

@daall daall merged commit 25d071b into sonic-net:master Aug 19, 2020
@saravanansv saravanansv deleted the master-virtualchassistest branch September 9, 2020 00:04
EdenGri pushed a commit to EdenGri/sonic-swss that referenced this pull request Feb 28, 2022
- What I did
The 'config' method is getting arguments from the user CLI and build a proper command for the pfcwd script in a wrong way, causing this issue.

- How I did it
Fix the command structure to align with pfcwd.main script.

- How to verify it
Run "config pfcwd start --action drop ports all detection-time 400 --restoration-time 400"

- Previous command output (if the output of a command-line utility has changed)
config pfcwd start --action drop ports all detection-time 400 --restoration-time 400
Failed to run command, invalid options:
ports
detection-time
Janetxxx pushed a commit to Janetxxx/sonic-swss that referenced this pull request Nov 10, 2025
…et#1345)

* Add a test_virtual_chassis.py to verify the virtual chassis
* Support virtual chassis topology in conftest.py to run the test_virtual_chassis.py. Notable changes in conftest.py are:
    - Unlike create_vnet, virtual_chassis does not use a sw container.
    - New DockerVirtualChassisTopology class to setup the connections when the virtual chassis containers restart.
* Integrate virtual chassis into conftest.py
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.

5 participants