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

remove 00-copp.config.json from swss debian package #1366

Merged
merged 2 commits into from
Aug 1, 2020

Conversation

abdosi
Copy link
Contributor

@abdosi abdosi commented Jul 28, 2020

Removed 00-copp.config.json from swss debian package

Changes to make copp.json as j2 template based based on device role.
copp.json.j2 is moved into docker-orchagent. docker-init.sh of orchagent will create json file form j2 template.

This PR is dependent on : sonic-net/sonic-buildimage#5053

prsunny
prsunny previously approved these changes Jul 28, 2020
@lguohan
Copy link
Contributor

lguohan commented Jul 28, 2020

why is there conflict?

copp.json.j2 is moved into docker-orchagent

Signed-off-by: Abhishek Dosi <[email protected]>
@abdosi
Copy link
Contributor Author

abdosi commented Jul 28, 2020

why is there conflict?

rebased with master.

@lguohan
Copy link
Contributor

lguohan commented Jul 28, 2020

why do we have so many vstest failures?

@abdosi
Copy link
Contributor Author

abdosi commented Jul 28, 2020

retest vs please

@abdosi
Copy link
Contributor Author

abdosi commented Jul 28, 2020

retest this please

@lguohan
Copy link
Contributor

lguohan commented Jul 29, 2020

since you have remove copp json, are these genuine failures?

@abdosi
Copy link
Contributor Author

abdosi commented Jul 29, 2020

since you have remove copp json, are these genuine failures?

don't think so. failures are random and many other PR's have failure is past few days. Meanwhile I am trying to run locally also to re-confirm.

@abdosi
Copy link
Contributor Author

abdosi commented Jul 29, 2020

retest this please

@abdosi
Copy link
Contributor Author

abdosi commented Jul 30, 2020

retest this please

@abdosi
Copy link
Contributor Author

abdosi commented Jul 30, 2020

retest this please

@abdosi
Copy link
Contributor Author

abdosi commented Jul 31, 2020

vs failures are not related copp.json removal. copp.json is not loaded in DVS testing environment. APP_DB does not have copp entry. Basically this failures are random and not impacted by this change.

To confirm run manually 4 failed test case of last vs test iteration and all are passing:

sudo pytest --dvsname=vs -v test_port_dpb_acl.py::TestPortDPBAcl::test_acl_table_empty_port_list
=============================================================================================== test session starts ===============================================================================================
platform linux -- Python 3.6.9, pytest-4.6.9, py-1.9.0, pluggy-0.13.1 -- /usr/bin/python3
cachedir: .pytest_cache
rootdir: /home/azure/sonic-swss/tests
plugins: flaky-3.7.0
collected 1 item

test_port_dpb_acl.py::TestPortDPBAcl::test_acl_table_empty_port_list ^[[APASSED [100%]

====================================== 1 passed in 105.06 seconds =======================================
azure@str-acs-serv-18:~/sonic-swss/tests$ sudo pytest --dvsname=vs -v test_port_dpb_acl.py::TestPortDPBAcl::test_one_port_two_acl_tables
========================================== test session starts ==========================================
platform linux -- Python 3.6.9, pytest-4.6.9, py-1.9.0, pluggy-0.13.1 -- /usr/bin/python3
cachedir: .pytest_cache
rootdir: /home/azure/sonic-swss/tests
plugins: flaky-3.7.0
collected 1 item

test_port_dpb_acl.py::TestPortDPBAcl::test_one_port_two_acl_tables PASSED [100%]

====================================== 1 passed in 105.91 seconds =======================================
azure@str-acs-serv-18:~/sonic-swss/tests$ sudo pytest --dvsname=vs -v test_port_dpb_acl.py::TestPortDPBAcl::test_one_acl_table_many_ports
========================================== test session starts ==========================================
platform linux -- Python 3.6.9, pytest-4.6.9, py-1.9.0, pluggy-0.13.1 -- /usr/bin/python3
cachedir: .pytest_cache
rootdir: /home/azure/sonic-swss/tests
plugins: flaky-3.7.0
collected 1 item

test_port_dpb_acl.py::TestPortDPBAcl::test_one_acl_table_many_ports PASSED [100%]

====================================== 1 passed in 131.79 seconds =======================================
azure@str-acs-serv-18:/sonic-swss/tests$ test_one_port_many_acl_tables^C
azure@str-acs-serv-18:
/sonic-swss/tests$ sudo pytest --dvsname=vs -v test_port_dpb_acl.py::TestPortDPBAcl::test_one_port_many_acl_tables
=============================================================================================== test session starts ===============================================================================================
platform linux -- Python 3.6.9, pytest-4.6.9, py-1.9.0, pluggy-0.13.1 -- /usr/bin/python3
cachedir: .pytest_cache
rootdir: /home/azure/sonic-swss/tests
plugins: flaky-3.7.0
collected 1 item

test_port_dpb_acl.py::TestPortDPBAcl::test_one_port_many_acl_tables PASSED [100%]

=========================================================================================== 1 passed in 128.02 seconds ============================================================================================

@abdosi
Copy link
Contributor Author

abdosi commented Jul 31, 2020

@lguohan Can we merge this ?

@abdosi
Copy link
Contributor Author

abdosi commented Jul 31, 2020

retest this please

@lguohan lguohan changed the title Removed 00-copp.config.json from swss debian package remove 00-copp.config.json from swss debian package Aug 1, 2020
@lguohan lguohan merged commit 7a4c15d into sonic-net:master Aug 1, 2020
abdosi added a commit that referenced this pull request Aug 1, 2020
Removed 00-copp.config.json from swss debian package

Changes to make copp.json as j2 template based based on device role.
copp.json.j2 is moved into docker-orchagent. docker-init.sh of orchagent will create json file form j2 template.

This PR is dependent on : sonic-net/sonic-buildimage#5053

Signed-off-by: Abhishek Dosi <[email protected]>
EdenGri pushed a commit to EdenGri/sonic-swss that referenced this pull request Feb 28, 2022
…1366)

Abstracted away the access to the path of the rootfs via a contextmanager.
In Arista secureboot, the rootfs is never extracted on the flash. Instead it's mounted directly from within the signed SWI.
The update_sonic_environment function however always assume that the rootfs to be at the same place.

- How I did it

To alleviate this restriction, a new context manager to obtain the rootfs is introduced.
The choice of a context manager rather than a function is entirely based on error management and cleanup.
Mounting a squashfs from a swi file requires the use of losetup which makes the rootfs available under /dev/loopX
Once done or on error, we need to free this resource which becomes free when using a contextmanager.
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.

4 participants