Skip to content

[inner hahsing] extension of PBH tests#4848

Merged
liat-grozovik merged 4 commits intosonic-net:masterfrom
AntonHryshchuk:pbh_ports_extension
Mar 1, 2022
Merged

[inner hahsing] extension of PBH tests#4848
liat-grozovik merged 4 commits intosonic-net:masterfrom
AntonHryshchuk:pbh_ports_extension

Conversation

@AntonHryshchuk
Copy link
Contributor

Signed-off-by: Anton antonh@nvidia.com

Description of PR

Summary:
Extension of PBH tests.
Added coverage of multiple interface types(LAG) and all possible match fields in pbh_rule.

added 2 new tests: test_inner_hashing_lag.py, test_wr_inner_hashing_lag.py

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?

Full coverage of the feature

How did you do it?

How did you verify/test it?

All tests executed on a testbed with t0 topo

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

t0

@AntonHryshchuk AntonHryshchuk requested a review from a team as a code owner December 15, 2021 14:17
@AntonHryshchuk
Copy link
Contributor Author

@anish-n please a look

@liat-grozovik
Copy link
Collaborator

@nazariig and @anish-n could you please help to review?

@AntonHryshchuk
Copy link
Contributor Author

@nazariig and @anish-n, a kindly reminder

@nazariig
Copy link
Contributor

nazariig commented Jan 5, 2022

@AntonHryshchuk please update the test as discussed

@nazariig
Copy link
Contributor

@anish-n just a kind reminder

Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't nvgre_tni be self.gre_key itself if it is defined and not a hard coded value?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed to use the nvgre_tni parameter instead

Copy link
Contributor

Choose a reason for hiding this comment

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

Does this logic assume that a port is either a part of a portchannel or a vlan? What if its part of neither, will the test break?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The test supports t0 topology, there exist the ports in VLAN.
Here, created the map, with all ports in VLAN and newly portchannels: {PortChannel10: port1, PortChannel11: port2..... }
Later, according to this map, will be removed VLAN from the port and added this port to the newly created portchannel.

Not related to already existing portchannels and on t0 topo should be the ports in VLAN.

Copy link
Contributor

Choose a reason for hiding this comment

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

Given we do config save here, and we modify device config in the test is there a possibility that we overwrite the base config with something different which will be persisted beyond the test?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right. I missed it. Updated.
For "regular" WR test added fixture with "config reload" in a teardown.
For LAG WR tests, it's a part of a fixture "setup_acl_config" teardown.

@AntonHryshchuk
Copy link
Contributor Author

Updated.

@nazariig, @anish-n - please review

Copy link
Contributor

@anish-n anish-n Jan 18, 2022

Choose a reason for hiding this comment

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

I don't get why we need to do a config save, since warm reboot gets the current running config and does not really load config from persisted config we shouldn't need to do a config save at all as far as I see.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed the saving of configurations before WR and save configurations as a teardown

@lgtm-com
Copy link

lgtm-com bot commented Jan 29, 2022

This pull request introduces 2 alerts when merging a08eb0140f3107453300fc48dbd83fa01648d2b5 into 23a2a96 - view on LGTM.com

new alerts:

  • 2 for Unused import

@liat-grozovik
Copy link
Collaborator

@AntonHryshchuk please fix new alerts so we can proceed with the approval flow

@liat-grozovik
Copy link
Collaborator

@anish-n can you please signoff?

@AntonHryshchuk
Copy link
Contributor Author

unused imports removed

@AntonHryshchuk
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Signed-off-by: Anton <antonh@nvidia.com>
Signed-off-by: Anton <antonh@nvidia.com>
Signed-off-by: Anton <antonh@nvidia.com>
Signed-off-by: Anton <antonh@nvidia.com>
@liat-grozovik
Copy link
Collaborator

@anish-n kindly reminder to review the PR changes. If no comments lets merge and add to nightly regression.

@nazariig
Copy link
Contributor

@anish-n please help to review & merge as we would like to have PBH edit flows PR on top of these changes

@liat-grozovik liat-grozovik merged commit 9008381 into sonic-net:master Mar 1, 2022
@arlakshm
Copy link
Contributor

arlakshm commented Mar 6, 2022

@AntonHryshchuk, this change is causing the issue #5280.
Can you please look? Thanks

wangxin added a commit that referenced this pull request Mar 7, 2022
wangxin added a commit that referenced this pull request Mar 8, 2022
This reverts commit 9008381.

Reverts #4848

PR #4848 depends on pytest-allure package which is only available to user “AzDevOps” in sonic-mgmt docker. The reason is that the package is installed to local path of that user:

AzDevOps@2fb15ed04ed5:~$ python
Python 2.7.17 (default, Feb 27 2021, 15:10:58)
[GCC 7.5.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import allure
>>> allure.__file__
'/var/AzDevOps/.local/lib/python2.7/site-packages/allure.pyc'
AzDevOps@2fb15ed04ed5:~$ sudo su
root@2fb15ed04ed5:/var/AzDevOps# pip list | grep allure
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
root@2fb15ed04ed5:/var/AzDevOps# python
Python 2.7.17 (default, Feb 27 2021, 15:10:58)
[GCC 7.5.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import allure
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named allure
>>> exit()

If use “root” user to run the test, issue #5280 will be hit.

I’ll revert #4848 for now. The sonic-mgmt docker file https://github.com/Azure/sonic-buildimage/blob/master/dockers/docker-sonic-mgmt/Dockerfile.j2 needs to be updated to ensure that package pytest-allure is installed to global directory.
AntonHryshchuk added a commit to AntonHryshchuk/sonic-mgmt that referenced this pull request Mar 10, 2022
liat-grozovik pushed a commit that referenced this pull request Mar 21, 2022
…" (#5310)

This reverts commit 3244df1.

Summary: The fix for issue #5280 was provided in sonic-net/sonic-buildimage#10184.
Revert back the changes, which reverted in #5282
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.

6 participants