Upgrade base of docker-sonic-mgmt to Ubuntu 24.04#24306
Upgrade base of docker-sonic-mgmt to Ubuntu 24.04#24306StormLiangMS merged 9 commits intosonic-net:masterfrom
Conversation
Ansible 12.0 has breaking change. The pytest-ansible plugin can't work with ansible 12.0. Fix to ansible 11.10.0 so far until pytest-ansible has a fix.
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Pull Request Overview
This PR upgrades the docker-sonic-mgmt base image from Ubuntu 20.04 to Ubuntu 24.04, along with updating the build environment from Bullseye to Bookworm and modernizing the Docker image configuration to address end-of-support concerns.
Key changes include:
- Base image updated to Ubuntu 24.04 with Python packages installed in a virtual environment at
/opt/venv - Removed support for Python 2 and the
LEGACY_SONIC_MGMT_DOCKERbuild flag - Build dependencies simplified by removing PTF and LIB_SONIC_DASH_API packages, with dash-api now installed from source
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| slave.mk | Removed logging of deprecated LEGACY_SONIC_MGMT_DOCKER flag |
| rules/docker-sonic-mgmt.mk | Updated build environment to bookworm and removed PTF and dash-api dependencies |
| dockers/docker-sonic-mgmt/Dockerfile.j2 | Upgraded base to Ubuntu 24.04, refactored package installation to use venv, modernized docker/azure-cli setup |
| Makefile.work | Removed LEGACY_SONIC_MGMT_DOCKER flag configuration and build variable |
| .azure-pipelines/docker-sonic-mgmt.yml | Updated pipeline to use bookworm environment and removed legacy flag |
| .azure-pipelines/docker-sonic-mgmt-mixed.yml | Deleted entire pipeline file for mixed/legacy builds |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Why I did it The base image Ubuntu 20.04 of docker-sonic-mgmt is end of support now. Need to upgrade the base image and the dependent packages to address potential vulnerability issues. DO NOT MERGE until sonic-net/sonic-mgmt#21045 is merged and cherry-picked to all current active branches. Work item tracking Microsoft ADO (number only): How I did it Upgraded base image of docker-sonic-mgmt to Ubuntu 24.04. Upgraded the build environment to bookworm. Removed the logic of building flag LEGACY_SONIC_MGMT_DOCKER. All the sonic-mgmt branches are using python3 now. It's not necessary to build docker-sonic-mgmt to support python2. And python2 is end of support too. Version of python packages are not pinned down. This change has pros and cons. Pros: Keep the docker-sonic-mgmt up to date to avoid future big version leap which could be difficult to handle. Cons: Community package upgrade could have issue and cause regression. Version of ansible is pinned to 11.10.0. It's because pytest-ansible does not support the latest ansible due to pytest-ansible's stdout_callback fails on Ansible 2.19 ansible/pytest-ansible#489 Python packages are installed to /opt/venv by following the recommendation of Ubuntu 24.04. The dash-api package is reverted to install from source code. The dash-api debian package built in bookworm cannot be installed in Ubuntu 24.04 due to dependency issues. Default user "ubuntu" of Ubuntu 24.04 is removed from the image to avoid potential issues. For details, please refer to Improve setup-container.sh for Ubuntu 24.04 based docker-sonic-mgmt sonic-mgmt#20761. Skipped adding regular user. With this change, the image will only have root user. The setup-container.sh tool in the sonic-mgmt repository can add regular user. Recommend to use the setup-container.sh tool to create sonic-mgmt container. Improved the code for installing docker and azure-cli. Remove the build dependency of the ptf debian package. It's because the ptf package is installed by python pip. How to verify it After the upgrade, there are some compatibility issues. The compatibility issues are fixed in sonic-net/sonic-mgmt#21045. I am using that PR to verify that all PR test scripts can pass by using the upgraded docker-sonic-mgmt. The fix in sonic-net/sonic-mgmt#21045 is backward compatible. Backward compatibility is verified by PR testing of sonic-net/sonic-mgmt#20851
…c-net#21045) What is the motivation for this PR? This PR is to continue the effort made by @yutongzhang-microsoft in sonic-net#18339 The current docker-sonic-mgmt image is based on Ubuntu 20.04 which is end of support now. PR sonic-net/sonic-buildimage#24306 upgraded the base image of docker-sonic-mgmt to Ubuntu 24.04. Together, version of most packages are upgraded too. The upgrade introduced lots of compatibility issues. This PR is to fix all the compatibility issues. All the fixes are backward compatible. The code change woks with both current and new docker-sonic-mgmt. How did you do it? Fix the snmp code caused by pysnmp upgrade. Fix json dump of ansible result caused by pytest-ansible upgrade. How did you verify/test it? Take advantage of the current sonic-mgmt PR testing. Verified that the code change works with new docker-sonic-mgmt in sonic-net#20851 Verified that the code change works with the current docker-sonic-mgmt in this PR. Signed-off-by: vikumarks <vikumar7ks@gmail.com>
Why I did it The base image Ubuntu 20.04 of docker-sonic-mgmt is end of support now. Need to upgrade the base image and the dependent packages to address potential vulnerability issues. DO NOT MERGE until sonic-net/sonic-mgmt#21045 is merged and cherry-picked to all current active branches. Work item tracking Microsoft ADO (number only): How I did it Upgraded base image of docker-sonic-mgmt to Ubuntu 24.04. Upgraded the build environment to bookworm. Removed the logic of building flag LEGACY_SONIC_MGMT_DOCKER. All the sonic-mgmt branches are using python3 now. It's not necessary to build docker-sonic-mgmt to support python2. And python2 is end of support too. Version of python packages are not pinned down. This change has pros and cons. Pros: Keep the docker-sonic-mgmt up to date to avoid future big version leap which could be difficult to handle. Cons: Community package upgrade could have issue and cause regression. Version of ansible is pinned to 11.10.0. It's because pytest-ansible does not support the latest ansible due to pytest-ansible's stdout_callback fails on Ansible 2.19 ansible/pytest-ansible#489 Python packages are installed to /opt/venv by following the recommendation of Ubuntu 24.04. The dash-api package is reverted to install from source code. The dash-api debian package built in bookworm cannot be installed in Ubuntu 24.04 due to dependency issues. Default user "ubuntu" of Ubuntu 24.04 is removed from the image to avoid potential issues. For details, please refer to Improve setup-container.sh for Ubuntu 24.04 based docker-sonic-mgmt sonic-mgmt#20761. Skipped adding regular user. With this change, the image will only have root user. The setup-container.sh tool in the sonic-mgmt repository can add regular user. Recommend to use the setup-container.sh tool to create sonic-mgmt container. Improved the code for installing docker and azure-cli. Remove the build dependency of the ptf debian package. It's because the ptf package is installed by python pip. How to verify it After the upgrade, there are some compatibility issues. The compatibility issues are fixed in sonic-net/sonic-mgmt#21045. I am using that PR to verify that all PR test scripts can pass by using the upgraded docker-sonic-mgmt. The fix in sonic-net/sonic-mgmt#21045 is backward compatible. Backward compatibility is verified by PR testing of sonic-net/sonic-mgmt#20851
Why I did it The base image Ubuntu 20.04 of docker-sonic-mgmt is end of support now. Need to upgrade the base image and the dependent packages to address potential vulnerability issues. DO NOT MERGE until sonic-net/sonic-mgmt#21045 is merged and cherry-picked to all current active branches. Work item tracking Microsoft ADO (number only): How I did it Upgraded base image of docker-sonic-mgmt to Ubuntu 24.04. Upgraded the build environment to bookworm. Removed the logic of building flag LEGACY_SONIC_MGMT_DOCKER. All the sonic-mgmt branches are using python3 now. It's not necessary to build docker-sonic-mgmt to support python2. And python2 is end of support too. Version of python packages are not pinned down. This change has pros and cons. Pros: Keep the docker-sonic-mgmt up to date to avoid future big version leap which could be difficult to handle. Cons: Community package upgrade could have issue and cause regression. Version of ansible is pinned to 11.10.0. It's because pytest-ansible does not support the latest ansible due to pytest-ansible's stdout_callback fails on Ansible 2.19 ansible/pytest-ansible#489 Python packages are installed to /opt/venv by following the recommendation of Ubuntu 24.04. The dash-api package is reverted to install from source code. The dash-api debian package built in bookworm cannot be installed in Ubuntu 24.04 due to dependency issues. Default user "ubuntu" of Ubuntu 24.04 is removed from the image to avoid potential issues. For details, please refer to Improve setup-container.sh for Ubuntu 24.04 based docker-sonic-mgmt sonic-mgmt#20761. Skipped adding regular user. With this change, the image will only have root user. The setup-container.sh tool in the sonic-mgmt repository can add regular user. Recommend to use the setup-container.sh tool to create sonic-mgmt container. Improved the code for installing docker and azure-cli. Remove the build dependency of the ptf debian package. It's because the ptf package is installed by python pip. How to verify it After the upgrade, there are some compatibility issues. The compatibility issues are fixed in sonic-net/sonic-mgmt#21045. I am using that PR to verify that all PR test scripts can pass by using the upgraded docker-sonic-mgmt. The fix in sonic-net/sonic-mgmt#21045 is backward compatible. Backward compatibility is verified by PR testing of sonic-net/sonic-mgmt#20851 Signed-off-by: Navdha Jindal <navdhajindal@microsoft.com>
…c-net#21045) What is the motivation for this PR? This PR is to continue the effort made by @yutongzhang-microsoft in sonic-net#18339 The current docker-sonic-mgmt image is based on Ubuntu 20.04 which is end of support now. PR sonic-net/sonic-buildimage#24306 upgraded the base image of docker-sonic-mgmt to Ubuntu 24.04. Together, version of most packages are upgraded too. The upgrade introduced lots of compatibility issues. This PR is to fix all the compatibility issues. All the fixes are backward compatible. The code change woks with both current and new docker-sonic-mgmt. How did you do it? Fix the snmp code caused by pysnmp upgrade. Fix json dump of ansible result caused by pytest-ansible upgrade. How did you verify/test it? Take advantage of the current sonic-mgmt PR testing. Verified that the code change works with new docker-sonic-mgmt in sonic-net#20851 Verified that the code change works with the current docker-sonic-mgmt in this PR. Signed-off-by: Alberto Villarreal <alberto.villarreal@keysight.com>
|
Cherry-pick PR to 202511: #24704 |
Why I did it The base image Ubuntu 20.04 of docker-sonic-mgmt is end of support now. Need to upgrade the base image and the dependent packages to address potential vulnerability issues. DO NOT MERGE until sonic-net/sonic-mgmt#21045 is merged and cherry-picked to all current active branches. Work item tracking Microsoft ADO (number only): How I did it Upgraded base image of docker-sonic-mgmt to Ubuntu 24.04. Upgraded the build environment to bookworm. Removed the logic of building flag LEGACY_SONIC_MGMT_DOCKER. All the sonic-mgmt branches are using python3 now. It's not necessary to build docker-sonic-mgmt to support python2. And python2 is end of support too. Version of python packages are not pinned down. This change has pros and cons. Pros: Keep the docker-sonic-mgmt up to date to avoid future big version leap which could be difficult to handle. Cons: Community package upgrade could have issue and cause regression. Version of ansible is pinned to 11.10.0. It's because pytest-ansible does not support the latest ansible due to pytest-ansible's stdout_callback fails on Ansible 2.19 ansible/pytest-ansible#489 Python packages are installed to /opt/venv by following the recommendation of Ubuntu 24.04. The dash-api package is reverted to install from source code. The dash-api debian package built in bookworm cannot be installed in Ubuntu 24.04 due to dependency issues. Default user "ubuntu" of Ubuntu 24.04 is removed from the image to avoid potential issues. For details, please refer to Improve setup-container.sh for Ubuntu 24.04 based docker-sonic-mgmt sonic-mgmt#20761. Skipped adding regular user. With this change, the image will only have root user. The setup-container.sh tool in the sonic-mgmt repository can add regular user. Recommend to use the setup-container.sh tool to create sonic-mgmt container. Improved the code for installing docker and azure-cli. Remove the build dependency of the ptf debian package. It's because the ptf package is installed by python pip. How to verify it After the upgrade, there are some compatibility issues. The compatibility issues are fixed in sonic-net/sonic-mgmt#21045. I am using that PR to verify that all PR test scripts can pass by using the upgraded docker-sonic-mgmt. The fix in sonic-net/sonic-mgmt#21045 is backward compatible. Backward compatibility is verified by PR testing of sonic-net/sonic-mgmt#20851 Signed-off-by: Feng Pan <fenpan@microsoft.com>
…c-net#21045) What is the motivation for this PR? This PR is to continue the effort made by @yutongzhang-microsoft in sonic-net#18339 The current docker-sonic-mgmt image is based on Ubuntu 20.04 which is end of support now. PR sonic-net/sonic-buildimage#24306 upgraded the base image of docker-sonic-mgmt to Ubuntu 24.04. Together, version of most packages are upgraded too. The upgrade introduced lots of compatibility issues. This PR is to fix all the compatibility issues. All the fixes are backward compatible. The code change woks with both current and new docker-sonic-mgmt. How did you do it? Fix the snmp code caused by pysnmp upgrade. Fix json dump of ansible result caused by pytest-ansible upgrade. How did you verify/test it? Take advantage of the current sonic-mgmt PR testing. Verified that the code change works with new docker-sonic-mgmt in sonic-net#20851 Verified that the code change works with the current docker-sonic-mgmt in this PR. Signed-off-by: opcoder0 <110003254+opcoder0@users.noreply.github.com>
…c-net#21045) What is the motivation for this PR? This PR is to continue the effort made by @yutongzhang-microsoft in sonic-net#18339 The current docker-sonic-mgmt image is based on Ubuntu 20.04 which is end of support now. PR sonic-net/sonic-buildimage#24306 upgraded the base image of docker-sonic-mgmt to Ubuntu 24.04. Together, version of most packages are upgraded too. The upgrade introduced lots of compatibility issues. This PR is to fix all the compatibility issues. All the fixes are backward compatible. The code change woks with both current and new docker-sonic-mgmt. How did you do it? Fix the snmp code caused by pysnmp upgrade. Fix json dump of ansible result caused by pytest-ansible upgrade. How did you verify/test it? Take advantage of the current sonic-mgmt PR testing. Verified that the code change works with new docker-sonic-mgmt in sonic-net#20851 Verified that the code change works with the current docker-sonic-mgmt in this PR. Signed-off-by: selldinesh <dinesh.sellappan@keysight.com>
…c-net#21045) What is the motivation for this PR? This PR is to continue the effort made by @yutongzhang-microsoft in sonic-net#18339 The current docker-sonic-mgmt image is based on Ubuntu 20.04 which is end of support now. PR sonic-net/sonic-buildimage#24306 upgraded the base image of docker-sonic-mgmt to Ubuntu 24.04. Together, version of most packages are upgraded too. The upgrade introduced lots of compatibility issues. This PR is to fix all the compatibility issues. All the fixes are backward compatible. The code change woks with both current and new docker-sonic-mgmt. How did you do it? Fix the snmp code caused by pysnmp upgrade. Fix json dump of ansible result caused by pytest-ansible upgrade. How did you verify/test it? Take advantage of the current sonic-mgmt PR testing. Verified that the code change works with new docker-sonic-mgmt in sonic-net#20851 Verified that the code change works with the current docker-sonic-mgmt in this PR.
1 similar comment
…c-net#21045) What is the motivation for this PR? This PR is to continue the effort made by @yutongzhang-microsoft in sonic-net#18339 The current docker-sonic-mgmt image is based on Ubuntu 20.04 which is end of support now. PR sonic-net/sonic-buildimage#24306 upgraded the base image of docker-sonic-mgmt to Ubuntu 24.04. Together, version of most packages are upgraded too. The upgrade introduced lots of compatibility issues. This PR is to fix all the compatibility issues. All the fixes are backward compatible. The code change woks with both current and new docker-sonic-mgmt. How did you do it? Fix the snmp code caused by pysnmp upgrade. Fix json dump of ansible result caused by pytest-ansible upgrade. How did you verify/test it? Take advantage of the current sonic-mgmt PR testing. Verified that the code change works with new docker-sonic-mgmt in sonic-net#20851 Verified that the code change works with the current docker-sonic-mgmt in this PR. Signed-off-by: Saravanan <saravanan@nexthop.ai>
…c-net#21045) What is the motivation for this PR? This PR is to continue the effort made by @yutongzhang-microsoft in sonic-net#18339 The current docker-sonic-mgmt image is based on Ubuntu 20.04 which is end of support now. PR sonic-net/sonic-buildimage#24306 upgraded the base image of docker-sonic-mgmt to Ubuntu 24.04. Together, version of most packages are upgraded too. The upgrade introduced lots of compatibility issues. This PR is to fix all the compatibility issues. All the fixes are backward compatible. The code change woks with both current and new docker-sonic-mgmt. How did you do it? Fix the snmp code caused by pysnmp upgrade. Fix json dump of ansible result caused by pytest-ansible upgrade. How did you verify/test it? Take advantage of the current sonic-mgmt PR testing. Verified that the code change works with new docker-sonic-mgmt in sonic-net#20851 Verified that the code change works with the current docker-sonic-mgmt in this PR. Signed-off-by: Guy Shemesh <gshemesh@nvidia.com>
…c-net#21045) What is the motivation for this PR? This PR is to continue the effort made by @yutongzhang-microsoft in sonic-net#18339 The current docker-sonic-mgmt image is based on Ubuntu 20.04 which is end of support now. PR sonic-net/sonic-buildimage#24306 upgraded the base image of docker-sonic-mgmt to Ubuntu 24.04. Together, version of most packages are upgraded too. The upgrade introduced lots of compatibility issues. This PR is to fix all the compatibility issues. All the fixes are backward compatible. The code change woks with both current and new docker-sonic-mgmt. How did you do it? Fix the snmp code caused by pysnmp upgrade. Fix json dump of ansible result caused by pytest-ansible upgrade. How did you verify/test it? Take advantage of the current sonic-mgmt PR testing. Verified that the code change works with new docker-sonic-mgmt in sonic-net#20851 Verified that the code change works with the current docker-sonic-mgmt in this PR. Signed-off-by: Aharon Malkin <amalkin@nvidia.com>
…c-net#21045) What is the motivation for this PR? This PR is to continue the effort made by @yutongzhang-microsoft in sonic-net#18339 The current docker-sonic-mgmt image is based on Ubuntu 20.04 which is end of support now. PR sonic-net/sonic-buildimage#24306 upgraded the base image of docker-sonic-mgmt to Ubuntu 24.04. Together, version of most packages are upgraded too. The upgrade introduced lots of compatibility issues. This PR is to fix all the compatibility issues. All the fixes are backward compatible. The code change woks with both current and new docker-sonic-mgmt. How did you do it? Fix the snmp code caused by pysnmp upgrade. Fix json dump of ansible result caused by pytest-ansible upgrade. How did you verify/test it? Take advantage of the current sonic-mgmt PR testing. Verified that the code change works with new docker-sonic-mgmt in sonic-net#20851 Verified that the code change works with the current docker-sonic-mgmt in this PR. Signed-off-by: Guy Shemesh <gshemesh@nvidia.com>
Why I did it The base image Ubuntu 20.04 of docker-sonic-mgmt is end of support now. Need to upgrade the base image and the dependent packages to address potential vulnerability issues. DO NOT MERGE until sonic-net/sonic-mgmt#21045 is merged and cherry-picked to all current active branches. Work item tracking Microsoft ADO (number only): How I did it Upgraded base image of docker-sonic-mgmt to Ubuntu 24.04. Upgraded the build environment to bookworm. Removed the logic of building flag LEGACY_SONIC_MGMT_DOCKER. All the sonic-mgmt branches are using python3 now. It's not necessary to build docker-sonic-mgmt to support python2. And python2 is end of support too. Version of python packages are not pinned down. This change has pros and cons. Pros: Keep the docker-sonic-mgmt up to date to avoid future big version leap which could be difficult to handle. Cons: Community package upgrade could have issue and cause regression. Version of ansible is pinned to 11.10.0. It's because pytest-ansible does not support the latest ansible due to pytest-ansible's stdout_callback fails on Ansible 2.19 ansible/pytest-ansible#489 Python packages are installed to /opt/venv by following the recommendation of Ubuntu 24.04. The dash-api package is reverted to install from source code. The dash-api debian package built in bookworm cannot be installed in Ubuntu 24.04 due to dependency issues. Default user "ubuntu" of Ubuntu 24.04 is removed from the image to avoid potential issues. For details, please refer to Improve setup-container.sh for Ubuntu 24.04 based docker-sonic-mgmt sonic-mgmt#20761. Skipped adding regular user. With this change, the image will only have root user. The setup-container.sh tool in the sonic-mgmt repository can add regular user. Recommend to use the setup-container.sh tool to create sonic-mgmt container. Improved the code for installing docker and azure-cli. Remove the build dependency of the ptf debian package. It's because the ptf package is installed by python pip. How to verify it After the upgrade, there are some compatibility issues. The compatibility issues are fixed in sonic-net/sonic-mgmt#21045. I am using that PR to verify that all PR test scripts can pass by using the upgraded docker-sonic-mgmt. The fix in sonic-net/sonic-mgmt#21045 is backward compatible. Backward compatibility is verified by PR testing of sonic-net/sonic-mgmt#20851 Signed-off-by: xiaweijiang <xiaweijiang@microsoft.com>
…c-net#21045) What is the motivation for this PR? This PR is to continue the effort made by @yutongzhang-microsoft in sonic-net#18339 The current docker-sonic-mgmt image is based on Ubuntu 20.04 which is end of support now. PR sonic-net/sonic-buildimage#24306 upgraded the base image of docker-sonic-mgmt to Ubuntu 24.04. Together, version of most packages are upgraded too. The upgrade introduced lots of compatibility issues. This PR is to fix all the compatibility issues. All the fixes are backward compatible. The code change woks with both current and new docker-sonic-mgmt. How did you do it? Fix the snmp code caused by pysnmp upgrade. Fix json dump of ansible result caused by pytest-ansible upgrade. How did you verify/test it? Take advantage of the current sonic-mgmt PR testing. Verified that the code change works with new docker-sonic-mgmt in sonic-net#20851 Verified that the code change works with the current docker-sonic-mgmt in this PR.
…c-net#21045) What is the motivation for this PR? This PR is to continue the effort made by @yutongzhang-microsoft in sonic-net#18339 The current docker-sonic-mgmt image is based on Ubuntu 20.04 which is end of support now. PR sonic-net/sonic-buildimage#24306 upgraded the base image of docker-sonic-mgmt to Ubuntu 24.04. Together, version of most packages are upgraded too. The upgrade introduced lots of compatibility issues. This PR is to fix all the compatibility issues. All the fixes are backward compatible. The code change woks with both current and new docker-sonic-mgmt. How did you do it? Fix the snmp code caused by pysnmp upgrade. Fix json dump of ansible result caused by pytest-ansible upgrade. How did you verify/test it? Take advantage of the current sonic-mgmt PR testing. Verified that the code change works with new docker-sonic-mgmt in sonic-net#20851 Verified that the code change works with the current docker-sonic-mgmt in this PR. Signed-off-by: YiFan Wang <yifan@nexthop.ai>
…c-net#21045) What is the motivation for this PR? This PR is to continue the effort made by @yutongzhang-microsoft in sonic-net#18339 The current docker-sonic-mgmt image is based on Ubuntu 20.04 which is end of support now. PR sonic-net/sonic-buildimage#24306 upgraded the base image of docker-sonic-mgmt to Ubuntu 24.04. Together, version of most packages are upgraded too. The upgrade introduced lots of compatibility issues. This PR is to fix all the compatibility issues. All the fixes are backward compatible. The code change woks with both current and new docker-sonic-mgmt. How did you do it? Fix the snmp code caused by pysnmp upgrade. Fix json dump of ansible result caused by pytest-ansible upgrade. How did you verify/test it? Take advantage of the current sonic-mgmt PR testing. Verified that the code change works with new docker-sonic-mgmt in sonic-net#20851 Verified that the code change works with the current docker-sonic-mgmt in this PR. Signed-off-by: Guy Shemesh <gshemesh@nvidia.com>
Why I did it
The base image Ubuntu 20.04 of docker-sonic-mgmt is end of support now. Need to upgrade the base image and the dependent packages to address potential vulnerability issues.
DO NOT MERGE until sonic-net/sonic-mgmt#21045 is merged and cherry-picked to all current active branches.
Work item tracking
How I did it
LEGACY_SONIC_MGMT_DOCKER. All the sonic-mgmt branches are using python3 now. It's not necessary to build docker-sonic-mgmt to support python2. And python2 is end of support too.setup-container.shtool in the sonic-mgmt repository can add regular user. Recommend to use thesetup-container.shtool to create sonic-mgmt container.ptfdebian package. It's because theptfpackage is installed by python pip.How to verify it
After the upgrade, there are some compatibility issues. The compatibility issues are fixed in sonic-net/sonic-mgmt#21045.
I am using that PR to verify that all PR test scripts can pass by using the upgraded docker-sonic-mgmt.
The fix in sonic-net/sonic-mgmt#21045 is backward compatible. Backward compatibility is verified by PR testing of sonic-net/sonic-mgmt#20851
Which release branch to backport (provide reason below if selected)
Tested branch (Please provide the tested image version)
Description for the changelog
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)