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

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

Merged
merged 1 commit into from
Jul 13, 2020
Merged

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

merged 1 commit into from
Jul 13, 2020

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
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