-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Upgrade mellanox platform containers (syncd / saiserver / syncd-rpc) and pmon to bullseye #10580
Merged
liat-grozovik
merged 8 commits into
sonic-net:master
from
alexrallen:syncd_bullseye_merge_2
May 10, 2022
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
7c09e36
Upgrade mellanox platform containers (syncd / saiserver / syncd-rpc) …
alexrallen 7279797
Merge branch 'master' into syncd_bullseye_merge_2
alexrallen edd5468
Merge branch 'master' into syncd_bullseye_merge_2
alexrallen 1fe84f4
Add libsensors-dev to targets
alexrallen 290fc78
Export LIBSENSORS_DEV target
alexrallen 8e10bb2
Add dependency of libsensors-dev
alexrallen 7d04e1a
Revert attempts to add libsensors-dev as a target and elect to upgrad…
alexrallen 1818429
Merge branch 'master' into syncd_bullseye_merge_2
alexrallen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,21 +24,10 @@ RUN mkdir -p /var/run/sx_sdk | |
|
||
RUN apt-get purge -y syncd | ||
|
||
{% if docker_syncd_mlnx_rpc_debs.strip() -%} | ||
# Copy locally-built Debian package dependencies | ||
{{ copy_files("debs/", docker_syncd_mlnx_rpc_debs.split(' '), "/debs/") }} | ||
{% endif %} | ||
|
||
{% if docker_syncd_mlnx_rpc_pydebs.strip() -%} | ||
# Copy locally-built Debian package dependencies | ||
{{ copy_files("python-debs/", docker_syncd_mlnx_rpc_pydebs.split(' '), "/debs/") }} | ||
{% endif %} | ||
|
||
## Pre-install the fundamental packages | ||
RUN apt-get update \ | ||
&& apt-get -y install \ | ||
net-tools \ | ||
python-pip \ | ||
python-setuptools \ | ||
build-essential \ | ||
libssl-dev \ | ||
|
@@ -48,7 +37,22 @@ RUN apt-get update \ | |
cmake \ | ||
libqt5core5a \ | ||
libqt5network5 \ | ||
libboost-atomic1.71.0 | ||
libboost-atomic1.74.0 | ||
|
||
# Build and install python-scapy | ||
RUN curl http://ftp.us.debian.org/debian/pool/main/s/scapy/python-scapy_2.4.0-2_all.deb --output python-scapy_2.4.0-2_all.deb \ | ||
&& dpkg -i python-scapy_2.4.0-2_all.deb \ | ||
&& apt install -f | ||
|
||
{% if docker_syncd_mlnx_rpc_debs.strip() -%} | ||
# Copy locally-built Debian package dependencies | ||
{{ copy_files("debs/", docker_syncd_mlnx_rpc_debs.split(' '), "/debs/") }} | ||
{% endif %} | ||
|
||
{% if docker_syncd_mlnx_rpc_pydebs.strip() -%} | ||
# Copy locally-built Debian package dependencies | ||
{{ copy_files("python-debs/", docker_syncd_mlnx_rpc_pydebs.split(' '), "/debs/") }} | ||
{% endif %} | ||
alexrallen marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
{% if docker_syncd_mlnx_rpc_debs.strip() -%} | ||
# Install locally-built Debian packages and implicitly install their dependencies | ||
|
@@ -60,6 +64,9 @@ RUN apt-get update \ | |
{{ install_debian_packages(docker_syncd_mlnx_rpc_pydebs.split(' ')) }} | ||
{% endif %} | ||
|
||
# Install pip2 since it is no longer in the APT upstream | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
RUN curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py \ | ||
&& python2 get-pip.py | ||
|
||
RUN wget https://github.com/nanomsg/nanomsg/archive/1.0.0.tar.gz \ | ||
&& tar xvfz 1.0.0.tar.gz \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# docker image for syncd | ||
|
||
|
||
DOCKER_SYNCD_BASE_STEM = docker-syncd-$(DOCKER_SYNCD_PLATFORM_CODE) | ||
DOCKER_SYNCD_BASE = $(DOCKER_SYNCD_BASE_STEM).gz | ||
DOCKER_SYNCD_BASE_DBG = $(DOCKER_SYNCD_BASE_STEM)-$(DBG_IMAGE_MARK).gz | ||
|
||
$(DOCKER_SYNCD_BASE)_PATH = $(PLATFORM_PATH)/docker-syncd-$(DOCKER_SYNCD_PLATFORM_CODE) | ||
|
||
$(DOCKER_SYNCD_BASE)_FILES += $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT) | ||
|
||
$(DOCKER_SYNCD_BASE)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BULLSEYE) | ||
$(DOCKER_SYNCD_BASE)_DBG_DEPENDS += $($(DOCKER_CONFIG_ENGINE_BULLSEYE)_DBG_DEPENDS) | ||
$(DOCKER_SYNCD_BASE)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BULLSEYE)_DBG_IMAGE_PACKAGES) | ||
|
||
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_BASE) | ||
ifneq ($(ENABLE_SYNCD_RPC),y) | ||
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_BASE) | ||
endif | ||
|
||
SONIC_DOCKER_DBG_IMAGES += $(DOCKER_SYNCD_BASE_DBG) | ||
ifneq ($(ENABLE_SYNCD_RPC),y) | ||
SONIC_INSTALL_DOCKER_DBG_IMAGES += $(DOCKER_SYNCD_BASE_DBG) | ||
endif | ||
|
||
$(DOCKER_SYNCD_BASE)_CONTAINER_NAME = syncd | ||
$(DOCKER_SYNCD_BASE)_RUN_OPT += --privileged -t | ||
$(DOCKER_SYNCD_BASE)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf | ||
$(DOCKER_SYNCD_BASE)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro | ||
|
||
SONIC_BULLSEYE_DOCKERS += $(DOCKER_SYNCD_BASE) | ||
SONIC_BULLSEYE_DBG_DOCKERS += $(DOCKER_SYNCD_BASE_DBG) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use python3 version? #Pending
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this being manually downloaded and installed here, instead of from a repo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This package is not available in bullseye but all its dependencies are. Until ptf can sort itself out we will need to have this workaround for RPC.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Share the same concern with @saiarcot895.
Generally speaking, you are upgrading distro, not to add new feature or fix bugs, why introduce
python-scapy
? If it is needed, why not install byapt
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This package only exists on buster but we need it for PTF.
https://github.com/p4lang/ptf/blob/36a3e3d9ac0447d28161d24028401239d756875f/debian/control#L10
I believe it was automatically getting installed as a dependency for PTF prior to this but could not be automatically installed any longer now that python-scapy is no longer in the upstream repo.
It would be a worse hack to add buster repositories to our apt index rather than just work around and pull this manually. The problem being we need the python 2 version of this package and bullseye has removed most python2 packages.
https://packages.debian.org/buster/python-scapy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like the following PR added python3 support for PTF. So we will be able to adjust this. However I don't wish to integrate these changes into this PR, bloating this PR with even more changes than are already in it that we would have to go and test again would be unwise.
#10599
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to use https://packages.debian.org/bullseye/python3-scapy? or https://pypi.org/project/scapy/#history?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Offline discussed and this is a temporary solution.