Skip to content

[Testbed] Support config extra mgmt IP on PTF#8432

Merged
lizhijianrd merged 2 commits intosonic-net:masterfrom
lizhijianrd:extra-ptf-mgmt-ip
May 29, 2023
Merged

[Testbed] Support config extra mgmt IP on PTF#8432
lizhijianrd merged 2 commits intosonic-net:masterfrom
lizhijianrd:extra-ptf-mgmt-ip

Conversation

@lizhijianrd
Copy link
Copy Markdown
Contributor

@lizhijianrd lizhijianrd commented May 26, 2023

Description of PR

Summary:
Support config extra MGMT IP addresses on PTF while add-topo. The extra IPs are used for non-routable traffic inside testbed.

How to use this feature
To configure multi MGMT IP addresses on PTF, update the testbed.yaml and add your extra MGMT addresses in the key ptf_extra_mgmt_ip. For example:

- conf-name: vms-sn2700-t1
  group-name: vms1-1
  topo: t1
  ptf_image_name: docker-ptf
  ptf: ptf-unknown
  ptf_ip: 10.255.0.178/23
  ptf_ipv6:
  ptf_extra_mgmt_ip: ["172.16.188.178/17", "172.16.188.179/17"]
  server: server_1
  vm_base: VM0100
  dut:
    - str-msn2700-01
  inv_name: lab
  auto_recover: 'True'
  comment: Tests Mellanox SN2700 vms

After add-topo, we can find 3 IP addresses configured on the mgmt port:

root@bafc741834e8:~# ip addr show mgmt
23843: mgmt@if23844: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 5a:be:4d:b5:4e:04 brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet 10.255.0.178/23 scope global mgmt
       valid_lft forever preferred_lft forever
    inet 172.16.188.178/17 scope global mgmt
       valid_lft forever preferred_lft forever
    inet 172.16.188.179/17 scope global secondary mgmt
       valid_lft forever preferred_lft forever

To keep backward compatibility, key ptf_extra_mgmt_ip is not required.

Type of change

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

Back port request

  • 201911
  • 202012
  • 202205

Approach

What is the motivation for this PR?

Support config extra MGMT IP addresses on PTF while add-topo.

How did you do it?

Updated add-topo related ansible playbooks and testbed-cli.sh to support this feature.

How did you verify/test it?

Verified on below situations:

  • Testbed without key ptf_extra_mgmt_ip.
  • Testbed with ptf_extra_mgmt_ip: [].
  • Testbed with ptf_extra_mgmt_ip: [<a-single-extra-ip>].
  • Testbed with ptf_extra_mgmt_ip: [<extra-ip-1>, <extra-ip-2>].

Any platform specific information?

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

Documentation

@lizhijianrd lizhijianrd merged commit 5651dbc into sonic-net:master May 29, 2023
@lizhijianrd lizhijianrd deleted the extra-ptf-mgmt-ip branch May 29, 2023 05:43
wangxin pushed a commit that referenced this pull request Aug 2, 2023
What is the motivation for this PR?
If a testbed supports extra mgmt IP then the PTF gets the extra IP when add-topo is run. This change was done as part of #8432
However, if PTF redeploy is done, the extra IP added by add-topo is lost as PTF is recreated.
This issue is fixed in this PR by adding extra mgmt IP support in renumber_topo ansible playbook.

How did you do it?

How did you verify/test it?
Tested on physical testbed.
mrkcmo pushed a commit to Azarack/sonic-mgmt that referenced this pull request Oct 3, 2023
What is the motivation for this PR?
Support config extra MGMT IP addresses on PTF while add-topo. The extra IPs are used for non-routable traffic inside testbed.

How did you do it?
Updated add-topo related ansible playbooks and testbed-cli.sh to support this feature.

How did you verify/test it?
Verified on below situations:
1. Testbed without key ptf_extra_mgmt_ip.
2. Testbed with ptf_extra_mgmt_ip: [].
3. Testbed with ptf_extra_mgmt_ip: [<a-single-extra-ip>].
4. Testbed with ptf_extra_mgmt_ip: [<extra-ip-1>, <extra-ip-2>].

Signed-off-by: Zhijian Li <zhijianli@microsoft.com>
AharonMalkin pushed a commit to AharonMalkin/sonic-mgmt that referenced this pull request Jan 25, 2024
What is the motivation for this PR?
Support config extra MGMT IP addresses on PTF while add-topo. The extra IPs are used for non-routable traffic inside testbed.

How did you do it?
Updated add-topo related ansible playbooks and testbed-cli.sh to support this feature.

How did you verify/test it?
Verified on below situations:
1. Testbed without key ptf_extra_mgmt_ip.
2. Testbed with ptf_extra_mgmt_ip: [].
3. Testbed with ptf_extra_mgmt_ip: [<a-single-extra-ip>].
4. Testbed with ptf_extra_mgmt_ip: [<extra-ip-1>, <extra-ip-2>].

Signed-off-by: Zhijian Li <zhijianli@microsoft.com>
AharonMalkin pushed a commit to AharonMalkin/sonic-mgmt that referenced this pull request Jan 25, 2024
What is the motivation for this PR?
If a testbed supports extra mgmt IP then the PTF gets the extra IP when add-topo is run. This change was done as part of sonic-net#8432
However, if PTF redeploy is done, the extra IP added by add-topo is lost as PTF is recreated.
This issue is fixed in this PR by adding extra mgmt IP support in renumber_topo ansible playbook.

How did you do it?

How did you verify/test it?
Tested on physical testbed.
mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Nov 7, 2024
What is the motivation for this PR?
If a testbed supports extra mgmt IP then the PTF gets the extra IP when add-topo is run. This change was done as part of sonic-net#8432
However, if PTF redeploy is done, the extra IP added by add-topo is lost as PTF is recreated.
This issue is fixed in this PR by adding extra mgmt IP support in renumber_topo ansible playbook.

How did you do it?

How did you verify/test it?
Tested on physical testbed.
mssonicbld pushed a commit that referenced this pull request Nov 7, 2024
What is the motivation for this PR?
If a testbed supports extra mgmt IP then the PTF gets the extra IP when add-topo is run. This change was done as part of #8432
However, if PTF redeploy is done, the extra IP added by add-topo is lost as PTF is recreated.
This issue is fixed in this PR by adding extra mgmt IP support in renumber_topo ansible playbook.

How did you do it?

How did you verify/test it?
Tested on physical testbed.
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.

3 participants