Skip to content

Added fix for ptf topo creation#4220

Closed
SavchukRomanLv wants to merge 1 commit intosonic-net:masterfrom
SavchukRomanLv:ptf_topo_fix
Closed

Added fix for ptf topo creation#4220
SavchukRomanLv wants to merge 1 commit intosonic-net:masterfrom
SavchukRomanLv:ptf_topo_fix

Conversation

@SavchukRomanLv
Copy link

Signed-off-by: Roman Savchuk romanx.savchuk@intel.com

Description of PR

Summary:
Fixes undefined variable error when user tries to apply ptf topology.
{"msg": "The task includes an option with an undefined variable. The error was: 'VM_targets' is undefined\n\nThe error appears to be in '/var/user/jenkins/sonic-mgmt/ansible/roles/vm_set/tasks/add_topo.yml': line 188, column 5, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n - name: Bind topology {{ topo }} to VMs. base vm = {{ VM_base }}\n ^ here\nWe could be wrong, but this one looks like it might be an issue with\nmissing quotes. Always quote template expression brackets when they\nstart a value. For instance:\n\n with_items:\n - {{ foo }}\n\nShould be written as:\n\n with_items:\n - \"{{ foo }}\"\n"}

Type of change

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

Back port request

  • 201911

Approach

What is the motivation for this PR?

fix error when try to deploy ptf topo

How did you do it?

initialize variable when "ptf" in topo

How did you verify/test it?

Any platform specific information?

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

Documentation

@SavchukRomanLv SavchukRomanLv requested a review from a team as a code owner September 9, 2021 13:07
Signed-off-by: Roman Savchuk <romanx.savchuk@intel.com>
@SavchukRomanLv
Copy link
Author

@wangxin can you please take a look?

@yozhao101
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

- name: Set VM_targets to empty string for ptf topologies
set_fact:
VM_targets: ""
when: topo | search("ptf")
Copy link
Contributor

@neethajohn neethajohn Sep 9, 2021

Choose a reason for hiding this comment

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

when: 'ptf' in topo instead of using the search filter

Copy link
Author

Choose a reason for hiding this comment

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

@neethajohn do you have any concerns about using search or some advantage? Thank you.

Copy link
Contributor

Choose a reason for hiding this comment

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

came across threads that mentioned a deprecation warning for this usage. Hence the suggestion

@yozhao101
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@wangxin
Copy link
Collaborator

wangxin commented Sep 11, 2021

@SavchukRomanLv Sorry I didn't notice your fix and submitted PR #4229 fixing the same issue. I think the fix in #4229 is more generic and explicit. What do you think?

@wangxin
Copy link
Collaborator

wangxin commented Sep 12, 2021

@SavchukRomanLv I have merged PR #4229. I am closing this one then. Sorry for that and thanks for your contribution.

@wangxin wangxin closed this Sep 12, 2021
@SavchukRomanLv
Copy link
Author

@wangxin NP, your solution also could be as fix

kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
…atically (#25250)

#### Why I did it
src/sonic-utilities
```
* 0315da21 - (HEAD -> 202511, origin/202511) [LACP retry-count] Syntax Fix for Trixie (sonic-net#4280) (6 hours ago) [Yair Raviv]
* 4420954e - Fix dump port state CLI command crash on multi-asic platforms (#4276) (5 days ago) [mssonicbld]
* a3ad30be - [Mellanox] Add restricted sysfs list for fw control modules (sonic-net#4202) (13 days ago) [mssonicbld]
* 16390921 - Fix j2 files not getting packaged (sonic-net#4252) (13 days ago) [mssonicbld]
* 6b9b0dce - [hft]: HFT config/show cli (sonic-net#4243) (2 weeks ago) [mssonicbld]
* 529b6479 - [sfputil] Fix issue: should not do low power mode or reset for non-present ports (sonic-net#4241) (2 weeks ago) [mssonicbld]
* ad70c8f2 - Update bash completions for sonic-utilities commands (sonic-net#4234) (3 weeks ago) [mssonicbld]
* 667f4b32 - [202511][GCU] Update WRED_PROFILE and BUFFER_POOL validators for GCU (sonic-net#4226) (3 weeks ago) [Dev Ojha]
* 88b3899d - Fix sonic-kdump-config for running commands with pipe (sonic-net#4220) (3 weeks ago) [mssonicbld]
* e4881b02 - Skip IP range duplicate check in validate_bgp_peer_group for different vnets (sonic-net#4215) (4 weeks ago) [mssonicbld]
* 9c24925a - Fix syntax and semantic errors in kdump remote feature (sonic-net#4212) (4 weeks ago) [mssonicbld]
```
#### How I did it
#### How to verify it
#### Description for the changelog
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
…lly (#25405)

#### Why I did it
src/sonic-swss
```
* 13227d02 - (HEAD -> 202511, origin/202511) [countersyncd]: Add communication statistics recording and utilities (sonic-net#4222) (2 days ago) [mssonicbld]
* 3c4d3b2b - [countersyncd]: Add retry between client and otel collector (sonic-net#4220) (3 days ago) [mssonicbld]
* 77acf5a0 - [countersyncd] fix otel actor log level (sonic-net#4221) (3 days ago) [mssonicbld]
* 03ec77c7 - [countersyncd]: Add benchmark suite for countersyncd and optimize otel actor (sonic-net#4216) (5 days ago) [mssonicbld]
* 08050f2e - [hft]: Fix TAM type capability enable list (sonic-net#4215) (6 days ago) [mssonicbld]
* d0793b45 - [Fixbug]: Fix delete default HFT configuration issue (sonic-net#4138) (7 days ago) [mssonicbld]
* 246d9575 - [hft]: Enable output queue for HFT (sonic-net#4187) (7 days ago) [mssonicbld]
* ae6a9887 - [countersyncd]: Fix netlink fd leakage and deadlock issue (sonic-net#4191) (7 days ago) [mssonicbld]
* c468e1fc - [countersyncd]: Fix compiling warning of otel (sonic-net#4192) (7 days ago) [mssonicbld]
* d675062c - Enabling the FEC histogram for gbsyncd counters (sonic-net#4195) (9 days ago) [mssonicbld]
```
#### How I did it
#### How to verify it
#### Description for the changelog
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