Skip to content

Add support for starting stopping VMs of specified test setup#1877

Merged
yxieca merged 1 commit intosonic-net:masterfrom
wangxin:vm-ops
Jul 13, 2020
Merged

Add support for starting stopping VMs of specified test setup#1877
yxieca merged 1 commit intosonic-net:masterfrom
wangxin:vm-ops

Conversation

@wangxin
Copy link
Collaborator

@wangxin wangxin commented Jul 10, 2020

Description of PR

Summary:
Fixes # (issue)

A test server may have VMs for multiple test setups. The existing
tool sets can start the first N VMs and remove all VMs on the
server.

This change added the support of starting and stopping only the VMs
of specified testbed.

Type of change

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

Approach

What is the motivation for this PR?

The VMs started by master and 201811 branches do not compatible with each other. For VMs started using 201811 branch, run "add-topo/remove-topo" using master branch will fail. There is similar issue when run "add-topo/remove-topo" using 201811 branch on VMs started by master branch.

Assume a test server is used for multiple test setups. All the VMs were started using 201811 branch. If we want to upgrade one of the test setup to master branch and keep rest of the test setups unchanged. Then we need to stop the VMs assigned to the affected test setup using 201811 branch. Then start them using master branch.

However, currently the testbed-cli.sh tool only supports stop all the VMs on a server or start the first N VMs on the server. It need to be improved to meet the requirements of this new scenario.

The same change should be made to the 201811 branch to fully support the scenario.

How did you do it?

  • Added two sub commands to the testbed-cli.sh:
    • testbed-cli.sh start-topo-vms <topo_name> <password.txt>: Only start the VMs assigned to the specified <topo_name>
    • testbed-cli.sh stop-topo-vms <topo_name> <password.txt>: Only stop the VMs assigned to the specified <topo_name>

How did you verify/test it?

  • Make the change to both 201811 branch and master branch
  • Use 201811 branch to run testbed-cli.sh stop-topo-vms
  • Use master branch to run testbed-cli.sh start-topo-vm
  • Use master branch to run testbed-cli.sh add-topo
  • Use master branch t- run testbed-cli.sh remove-topo
  • Use master branch to run testbed-cli.sh stop-topo-vms
  • Use 201811 branch to run testbed-cli.sh start-topo-vms
  • Use 201811 branch to run testbed-cli.sh add-topo
  • Use 201811 branch to run testbed-cli.sh remove-topo

Any platform specific information?

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

Documentation

A test server may have VMs for multiple test setups. The existing
tool sets can start the first N VMs and remove all VMs on the
server.

This change added the support of starting and stopping partial
of the VMs used by specified test setup.

Signed-off-by: Xin Wang <xiwang5@microsoft.com>
@yxieca
Copy link
Collaborator

yxieca commented Jul 13, 2020

I think topology is a wrong name. What you meant here is testbed name?

@yxieca
Copy link
Collaborator

yxieca commented Jul 13, 2020

oh, topology is used in deploy and remove already.

@yxieca yxieca merged commit da7120f into sonic-net:master Jul 13, 2020
@wangxin wangxin deleted the vm-ops branch July 20, 2020 08:57
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
sonic-swss

73f6f68 [Flex Counters] Delay flex counters even if tables are present in the DB (sonic-net#1877)
5edb9e5 [buffer orch] Bugfix: Don't query counter SAI_BUFFER_POOL_STAT_XOFF_ROOM_WATERMARK_BYTES on a pool where it is not supported (sonic-net#1857)
fce0c60 [crm] Fix for Issue sonic-net/sonic-buildimage#8036 (sonic-net#1829)

sonic-utilities

2630ac1 [Fast-reboot] Set flex counters delay indicator to prevent flex counters enablement after fast-reboot (sonic-net#1768)
606f1b1 [portstat pfcstat] Unify the packet number format in the output of portstat and pfcstat in all cases (sonic-net#1755)
2c6a15e [ecnconfig] Fix exception seen during display and add unit tests (#1784)
9b1995e Fix logic in RIF counters print (sonic-net#1732)

sonic-swss-comon

3e7b81f Add a new field for FLEX_COUNTER_TABLE to indicate delay for flex counters (sonic-net#523)
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.

2 participants