Skip to content

[advanced-reboot] Test VLAN gateway address resolvability during upgrade#15835

Merged
yxieca merged 8 commits intosonic-net:masterfrom
saiarcot895:test-loopback-reachability
Dec 7, 2024
Merged

[advanced-reboot] Test VLAN gateway address resolvability during upgrade#15835
yxieca merged 8 commits intosonic-net:masterfrom
saiarcot895:test-loopback-reachability

Conversation

@saiarcot895
Copy link
Contributor

Description of PR

Summary:
Fixes # (issue)

Type of change

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

Back port request

  • 202012
  • 202205
  • 202305
  • 202311
  • 202405

Approach

What is the motivation for this PR?

During an upgrade, test to see if the VLAN gateway can be resolved with an ARP request. When CPA is enabled, we expect the VLAN gateway to be always resolvable (even when control plane of the device is down). This is done through the use of a Ferret server running on the PTF container.

How did you do it?

Add a basic check for the functionality of that Ferret server by crafting and sending ARP requests, and report the number of ARP responses received. As of right now, this doesn't affect the final result of the warm/fast upgrade test; that will be done later.

Also mark the advanced-reboot tests as functional on KVM. Without this, the warm upgrade test will not run on PR checkers.

How did you verify/test it?

Any platform specific information?

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

Documentation

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
Because of sonic-net#15380, PTF test script that didn't explicitly say that they
are supported on KVM no longer ran. Advanced reboot has at least partial
support for KVM, and we want it to run (for functionality purposes, at
least).

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
This can be used to identify ARP responses from Ferret vs ARP responses
from the device itself.

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
@mssonicbld
Copy link
Collaborator

The pre-commit check detected issues in the files touched by this pull request.
The pre-commit check is a mandatory check, please fix detected issues.

Detailed pre-commit check results:
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check yaml...........................................(no files to check)Skipped
check for added large files..............................................Passed
check python ast.........................................................Passed
flake8...................................................................Failed
- hook id: flake8
- exit code: 1

ansible/roles/test/files/ptftests/py3/advanced-reboot.py:926:5: E303 too many blank lines (2)
ansible/roles/test/files/ptftests/py3/advanced-reboot.py:936:61: E261 at least two spaces before inline comment
ansible/roles/test/files/ptftests/py3/advanced-reboot.py:942:36: E128 continuation line under-indented for visual indent
ansible/roles/test/files/ptftests/py3/advanced-reboot.py:943:36: E128 continuation line under-indented for visual indent
ansible/roles/test/files/ptftests/py3/advanced-reboot.py:944:36: E128 continuation line under-indented for visual indent
ansible/roles/test/files/ptftests/py3/advanced-reboot.py:952:36: E128 continuation line under-indented for visual indent
ansible/roles/test/files/ptftests/py3/advanced-reboot.py:953:36: E128 continuation line under-indented for visual indent
ansible/roles/test/files/ptftests/py3/advanced-reboot.py:954:36: E128 continuation line under-indented for visual indent
ansible/roles/test/files/ptftests/py3/advanced-reboot.py:1745:121: E501 line too long (125 > 120 characters)

flake8...............................................(no files to check)Skipped
...
[truncated extra lines, please run pre-commit locally to view full check results]

To run the pre-commit checks locally, you can follow below steps:

  1. Ensure that default python is python3. In sonic-mgmt docker container, default python is python2. You can run
    the check by activating the python3 virtual environment in sonic-mgmt docker container or outside of sonic-mgmt
    docker container.
  2. Ensure that the pre-commit package is installed:
sudo pip install pre-commit
  1. Go to repository root folder
  2. Install the pre-commit hooks:
pre-commit install
  1. Use pre-commit to check staged file:
pre-commit
  1. Alternatively, you can check committed files using:
pre-commit run --from-ref <commit_id> --to-ref <commit_id>

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
@yxieca yxieca merged commit 8ea0d3e into sonic-net:master Dec 7, 2024
@saiarcot895 saiarcot895 deleted the test-loopback-reachability branch December 11, 2024 21:26
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