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

[action] [PR:12890] Fix sonic-mgmt testbed-cli interface_to_vms undefined failure. #16061

Merged
merged 1 commit into from
Dec 13, 2024

Conversation

mssonicbld
Copy link
Collaborator

Description of PR

Summary:
If any topology without any VMs, e.g. no T1s for T0 topology, the testbed-cli deploy-mg will fail, due to error below:

TASK [find all interface names] *****************************************************************************************************************************************************************************
task path: /var/src/mgmt-int/ansible/config_sonic_basedon_testbed.yml:273
Sunday 19 May 2024 18:06:26 +0000 (0:00:00.021) 0:00:16.756 ************
fatal: [str3-7060x6-64pe-1]: FAILED! => {
 "msg": "'interface_to_vms' is undefined"
}

Type of change

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

Back port request

  • 201911
  • 202012
  • 202205
  • 202305
  • 202311

Approach

What is the motivation for this PR?

This change is to fix the error above, when VM list is empty.

How did you do it?

The fix is straightforward - to give it a default value that is an empty list when enumerating.

How did you verify/test it?

The change is run locally with topology with empty VMs, and it works.

image

Any platform specific information?

No.

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

Documentation

No doc needs to be updated for this change.

…-net#12890)

What is the motivation for this PR?
This change is to fix the error above, when VM list is empty.

How did you do it?
The fix is straightforward - to give it a default value that is an empty list when enumerating.

How did you verify/test it?
The change is run locally with topology with empty VMs, and it works.
@mssonicbld
Copy link
Collaborator Author

/azp run

@mssonicbld
Copy link
Collaborator Author

Original PR: #12890

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld mssonicbld merged commit 0fa7639 into sonic-net:202311 Dec 13, 2024
12 checks passed
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