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

Upgrade docker-sonic-vs and docker-syncd-vs to Bullseye #13294

Merged
merged 4 commits into from
Mar 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions platform/vs/docker-sonic-vs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

DOCKER_SONIC_VS = docker-sonic-vs.gz
$(DOCKER_SONIC_VS)_PATH = $(PLATFORM_PATH)/docker-sonic-vs
$(DOCKER_SONIC_VS)_DEPENDS += $(SWSS) \
Copy link

Choose a reason for hiding this comment

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

Curious why $(SWSS) is removed here? Is it because it's now taken care of in the addition on line 46?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, docker-sonic-vs will be based on top of docker-swss-layer-bullseye, which will contain SWSS.

The initial intention of that layer was to save space by having SWSS be in a single layer and then other containers can be built on top of this layer. In this case, since docker-sonic-vs won't actually be part of the SONiC image, there's effectively no impact.

$(SYNCD_VS) \
$(PYTHON_SWSSCOMMON) \
$(DOCKER_SONIC_VS)_DEPENDS += $(SYNCD_VS) \
$(PYTHON3_SWSSCOMMON) \
$(LIBTEAMDCTL) \
$(LIBTEAM_UTILS) \
Expand All @@ -24,8 +22,7 @@ $(DOCKER_SONIC_VS)_PYTHON_WHEELS += $(SONIC_PY_COMMON_PY3) \
$(SONIC_HOST_SERVICES_PY3)

ifeq ($(INSTALL_DEBUG_TOOLS), y)
$(DOCKER_SONIC_VS)_DEPENDS += $(SWSS_DBG) \
$(LIBSWSSCOMMON_DBG) \
$(DOCKER_SONIC_VS)_DEPENDS += $(LIBSWSSCOMMON_DBG) \
$(LIBSAIREDIS_DBG) \
$(LIBSAIVS_DBG) \
$(SYNCD_VS_DBG)
Expand All @@ -46,7 +43,7 @@ $(DOCKER_SONIC_VS)_FILES += $(CONFIGDB_LOAD_SCRIPT) \
$(UPDATE_CHASSISDB_CONFIG_SCRIPT) \
$(COPP_CONFIG_TEMPLATE)

$(DOCKER_SONIC_VS)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BUSTER)
$(DOCKER_SONIC_VS)_LOAD_DOCKERS += $(DOCKER_SWSS_LAYER_BULLSEYE)
SONIC_DOCKER_IMAGES += $(DOCKER_SONIC_VS)

SONIC_BUSTER_DOCKERS += $(DOCKER_SONIC_VS)
SONIC_BULLSEYE_DOCKERS += $(DOCKER_SONIC_VS)
52 changes: 6 additions & 46 deletions platform/vs/docker-sonic-vs/Dockerfile.j2
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM docker-config-engine-buster-{{DOCKER_USERNAME}}:{{DOCKER_USERTAG}}
FROM docker-swss-layer-bullseye-{{DOCKER_USERNAME}}:{{DOCKER_USERTAG}}

ARG docker_container_name

Expand All @@ -24,10 +24,6 @@ RUN apt-get install -y net-tools \
python-ply \
libqt5core5a \
libqt5network5 \
libboost-program-options1.71.0 \
libboost-serialization1.71.0 \
Copy link
Contributor

@liushilongbuaa liushilongbuaa Mar 23, 2023

Choose a reason for hiding this comment

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

Hi @saiarcot895 , why removed libboost package?
sonic-swss/sonic-sairedis pipelines are affected. Because they install swsscommon in docker-sonic-vs docker.
https://dev.azure.com/mssonic/build/_build/results?buildId=238973&view=logs&jobId=83516c17-6666-5250-abde-63983ce72a49&j=ec04b24c-02f9-5d3d-ea93-ae01af596cc2&t=efc0b8f4-1762-5832-d518-167f53484867

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Boost 1.71 is not available in Bullseye, Bullseye has Boost 1.74. Because of this (and other differences), the pipelines for swss-common, swss, and sairedis were bound to fail. In addition, the base layer of this container has changed; it's now based on swss-layer-bullseye (which will contain both swss and swsscommon).

As for the pipeline breakages, I've already opened sonic-net/sonic-swss-common#716 to fix it for swss-common. Once that is fixed, I should be able to fix it for sairedis (sonic-net/sonic-sairedis#1225) and swss (PR to be opened).

libboost-system1.71.0 \
libboost-thread1.71.0 \
libgmp10 \
libjudydebian1 \
openssh-client \
Expand All @@ -41,8 +37,7 @@ RUN apt-get install -y net-tools \
logrotate \
apt-utils \
psmisc \
tcpdump \
python-scapy \
python3-scapy \
conntrack \
iptables \
jq \
Expand All @@ -52,8 +47,6 @@ RUN apt-get install -y net-tools \
# For installing Python m2crypto package
# (these can be uninstalled after installation)
build-essential \
python-dev \
python-pip \
python3-dev \
libssl-dev \
swig \
Expand All @@ -72,40 +65,10 @@ RUN apt-get install -y net-tools \
libdbus-1-3 \
libgirepository-1.0-1 \
{%- if ENABLE_ASAN == "y" %}
libasan5 \
libasan6 \
{%- endif %}
libsystemd0 \
dbus

# Install redis-server
{% if CONFIGURED_ARCH == "armhf" %}
RUN curl -k -o redis-tools_6.0.6-1~bpo10+1_armhf.deb "https://sonicstorage.blob.core.windows.net/packages/redis/redis-tools_6.0.6-1_bpo10+1_armhf.deb?sv=2015-04-05&sr=b&sig=67vHAMxsl%2BS3X1KsqhdYhakJkGdg5FKSPgU8kUiw4as%3D&se=2030-10-24T04%3A22%3A40Z&sp=r"
RUN curl -k -o redis-server_6.0.6-1~bpo10+1_armhf.deb "https://sonicstorage.blob.core.windows.net/packages/redis/redis-server_6.0.6-1_bpo10+1_armhf.deb?sv=2015-04-05&sr=b&sig=xTdayvm0RBguxi9suyv855jKRjU%2FmKQ8nHuct4WSX%2FA%3D&se=2030-10-24T04%3A22%3A05Z&sp=r"
RUN dpkg -i redis-tools_6.0.6-1~bpo10+1_armhf.deb redis-server_6.0.6-1~bpo10+1_armhf.deb || apt-get install -f
RUN rm redis-tools_6.0.6-1~bpo10+1_armhf.deb redis-server_6.0.6-1~bpo10+1_armhf.deb
{% elif CONFIGURED_ARCH == "arm64" %}
RUN curl -o redis-tools_6.0.6-1~bpo10+1_arm64.deb "https://sonicstorage.blob.core.windows.net/packages/redis/redis-tools_6.0.6-1_bpo10+1_arm64.deb?sv=2015-04-05&sr=b&sig=GbkJV2wWln3hoz27zKi5erdk3NDKrAFrQriA97bcRCY%3D&se=2030-10-24T04%3A22%3A21Z&sp=r"
RUN curl -o redis-server_6.0.6-1~bpo10+1_arm64.deb "https://sonicstorage.blob.core.windows.net/packages/redis/redis-server_6.0.6-1_bpo10+1_arm64.deb?sv=2015-04-05&sr=b&sig=622w2KzIKIjAaaA0Bz12MzU%2BUBzY2AiXFIFfuKNoKSk%3D&se=2030-10-24T04%3A21%3A44Z&sp=r"
RUN dpkg -i redis-tools_6.0.6-1~bpo10+1_arm64.deb redis-server_6.0.6-1~bpo10+1_arm64.deb || apt-get install -f
RUN rm redis-tools_6.0.6-1~bpo10+1_arm64.deb redis-server_6.0.6-1~bpo10+1_arm64.deb
{% else %}
RUN curl -o redis-tools_6.0.6-1~bpo10+1_amd64.deb "https://sonicstorage.blob.core.windows.net/packages/redis/redis-tools_6.0.6-1~bpo10+1_amd64.deb?sv=2015-04-05&sr=b&sig=73zbmjkf3pi%2Bn0R8Hy7CWT2EUvOAyzM5aLYJWCLySGM%3D&se=2030-09-06T19%3A44%3A59Z&sp=r"
RUN curl -o redis-server_6.0.6-1~bpo10+1_amd64.deb "https://sonicstorage.blob.core.windows.net/packages/redis/redis-server_6.0.6-1~bpo10+1_amd64.deb?sv=2015-04-05&sr=b&sig=2Ketg7BmkZEaTxR%2FgvAFVmhjn7ywdmkc7l2T2rsL57o%3D&se=2030-09-06T19%3A45%3A20Z&sp=r"
RUN dpkg -i redis-tools_6.0.6-1~bpo10+1_amd64.deb redis-server_6.0.6-1~bpo10+1_amd64.deb || apt-get install -f
RUN rm redis-tools_6.0.6-1~bpo10+1_amd64.deb redis-server_6.0.6-1~bpo10+1_amd64.deb
{% endif %}

RUN pip2 install --upgrade 'pip<21'
RUN apt-get purge -y python-pip
RUN pip2 install setuptools==40.8.0
RUN pip2 install wheel==0.33.6
RUN pip2 install py2_ipaddress
RUN pip2 install six
RUN pip2 install pyroute2==0.5.3 netifaces==0.10.7
RUN pip2 install monotonic==1.5
RUN pip2 install urllib3
RUN pip2 install requests
RUN pip2 install crontab
dbus \
redis-server

# For sonic-config-engine Python 3 package
# Install pyangbind here, outside sonic-config-engine dependencies, as pyangbind causes enum34 to be installed.
Expand Down Expand Up @@ -150,7 +113,7 @@ RUN pip{% if 'py3' in whl %}3{% else %}2{% endif %} install python-wheels/{{ whl

# Clean up
RUN apt-get purge -y build-essential libssl-dev swig
RUN apt-get purge -y python-dev python3-dev
RUN apt-get purge -y python3-dev
RUN apt-get purge -y libcairo2-dev libdbus-1-dev libgirepository1.0-dev libsystemd-dev pkg-config
RUN apt-get clean -y
RUN apt-get autoclean -y
Expand Down Expand Up @@ -196,9 +159,6 @@ RUN rm -f /usr/share/sonic/templates/supervisord.conf.j2
RUN mkdir -p /var/log/asan
{%- endif %}

# Workaround the tcpdump issue
RUN mv /usr/sbin/tcpdump /usr/bin/tcpdump

RUN echo "docker-sonic-vs" > /etc/hostname
RUN mkdir -p /etc/quagga
RUN touch /etc/quagga/zebra.conf
Expand Down
2 changes: 1 addition & 1 deletion platform/vs/docker-syncd-vs.mk
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# docker image for vs syncd

DOCKER_SYNCD_PLATFORM_CODE = vs
include $(PLATFORM_PATH)/../template/docker-syncd-base.mk
include $(PLATFORM_PATH)/../template/docker-syncd-bullseye.mk

$(DOCKER_SYNCD_BASE)_DEPENDS += $(SYNCD_VS) \
$(IPROUTE2)
Expand Down
2 changes: 1 addition & 1 deletion platform/vs/docker-syncd-vs/Dockerfile.j2
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM docker-config-engine-buster-{{DOCKER_USERNAME}}:{{DOCKER_USERTAG}}
FROM docker-config-engine-bullseye-{{DOCKER_USERNAME}}:{{DOCKER_USERTAG}}

ARG docker_container_name

Expand Down
6 changes: 4 additions & 2 deletions rules/iproute2.mk
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# iproute2 package

IPROUTE2_VERSION = 5.10.0
IPROUTE2_VERSION_FULL = $(IPROUTE2_VERSION)-4~bpo10+1
IPROUTE2_VERSION_FULL = $(IPROUTE2_VERSION)-4
IPROUTE2_VERSION_SONIC = $(IPROUTE2_VERSION)-4sonic1

export IPROUTE2_VERSION
export IPROUTE2_VERSION_FULL
export IPROUTE2_VERSION_SONIC

IPROUTE2 = iproute2_$(IPROUTE2_VERSION_FULL)_$(CONFIGURED_ARCH).deb
IPROUTE2 = iproute2_$(IPROUTE2_VERSION_SONIC)_$(CONFIGURED_ARCH).deb
$(IPROUTE2)_SRC_PATH = $(SRC_PATH)/iproute2
SONIC_MAKE_DEBS += $(IPROUTE2)
3 changes: 2 additions & 1 deletion sonic-slave-bullseye/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ RUN apt-get update && apt-get install -y \
# For iproute2
cm-super-minimal \
libatm1-dev \
libbpf-dev \
libelf-dev \
libmnl-dev \
libselinux1-dev \
Expand Down Expand Up @@ -597,7 +598,7 @@ RUN apt-get install -y nodejs
{%- if CROSS_BUILD_ENVIRON == "y" %}
RUN apt-get install -y rsync dh-python

RUN apt-get install -y libelf-dev:$arch libdw-dev:$arch libbz2-dev:$arch liblzo2-dev:$arch libedit-dev:$arch libevent-dev:$arch libopts25-dev:$arch libssl-dev:$arch pps-tools:$arch libpam-cap:$arch libcap-dev:$arch libpam0g-dev:$arch libaudit-dev:$arch libgtk-3-dev:$arch libkrb5-dev:$arch libsystemd-dev:$arch libwrap0-dev:$arch libkrb5-dev:$arch libboost1.74-dev:$arch libboost-dev:$arch libzmq5:$arch libzmq3-dev:$arch libdaemon-dev:$arch libjansson-dev:$arch libmnl-dev:$arch libsensors5:$arch libsensors4-dev:$arch libperl-dev:$arch libmariadb-dev:$arch libmariadb-dev-compat:$arch libpci-dev:$arch libjson-c-dev:$arch libreadline-dev:$arch librtr-dev:$arch librrd-dev:$arch libnetfilter-conntrack-dev:$arch libnetfilter-conntrack3:$arch libnfnetlink-dev:$arch libnftnl-dev:$arch libldap2-dev:$arch libbind-export-dev:$arch check:$arch libboost-atomic-dev:$arch libboost-test-dev:$arch libglib2.0-dev:$arch libexplain-dev:$arch libc-ares-dev:$arch libiptc0:$arch libxtables12:$arch libatm1-dev:$arch libdb-dev:$arch pkg-config:$arch libnghttp2-14:$arch librtmp1:$arch libssh2-1:$arch libcjson1:$arch libcjson-dev:$arch libcurl3-gnutls:$arch libcurl3-nss-dev:$arch libboost-thread1.74-dev:$arch libboost-thread-dev:$arch libboost-system1.74-dev:$arch libboost-system-dev:$arch libgtest-dev:$arch libgmock-dev:$arch libfido2-dev:$arch libcunit1:$arch libcunit1-dev:$arch libauparse-dev:$arch libnetsnmptrapd40:$arch qtbase5-dev:$arch libboost-log-dev:$arch libboost-filesystem-dev:$arch libboost-program-options-dev:$arch
RUN apt-get install -y libelf-dev:$arch libdw-dev:$arch libbz2-dev:$arch liblzo2-dev:$arch libedit-dev:$arch libevent-dev:$arch libopts25-dev:$arch libssl-dev:$arch pps-tools:$arch libpam-cap:$arch libcap-dev:$arch libpam0g-dev:$arch libaudit-dev:$arch libgtk-3-dev:$arch libkrb5-dev:$arch libsystemd-dev:$arch libwrap0-dev:$arch libkrb5-dev:$arch libboost1.74-dev:$arch libboost-dev:$arch libzmq5:$arch libzmq3-dev:$arch libdaemon-dev:$arch libjansson-dev:$arch libmnl-dev:$arch libsensors5:$arch libsensors4-dev:$arch libperl-dev:$arch libmariadb-dev:$arch libmariadb-dev-compat:$arch libpci-dev:$arch libjson-c-dev:$arch libreadline-dev:$arch librtr-dev:$arch librrd-dev:$arch libnetfilter-conntrack-dev:$arch libnetfilter-conntrack3:$arch libnfnetlink-dev:$arch libnftnl-dev:$arch libldap2-dev:$arch libbind-export-dev:$arch check:$arch libboost-atomic-dev:$arch libboost-test-dev:$arch libglib2.0-dev:$arch libexplain-dev:$arch libc-ares-dev:$arch libiptc0:$arch libxtables12:$arch libatm1-dev:$arch libbpf-dev:$arch libdb-dev:$arch pkg-config:$arch libnghttp2-14:$arch librtmp1:$arch libssh2-1:$arch libcjson1:$arch libcjson-dev:$arch libcurl3-gnutls:$arch libcurl3-nss-dev:$arch libboost-thread1.74-dev:$arch libboost-thread-dev:$arch libboost-system1.74-dev:$arch libboost-system-dev:$arch libgtest-dev:$arch libgmock-dev:$arch libfido2-dev:$arch libcunit1:$arch libcunit1-dev:$arch libauparse-dev:$arch libnetsnmptrapd40:$arch qtbase5-dev:$arch libboost-log-dev:$arch libboost-filesystem-dev:$arch libboost-program-options-dev:$arch

RUN apt-get download libgirepository1.0-dev:$arch && dpkg --force-all -i libgirepository1.0-dev*
RUN PATH=/python_virtualenv/env3/bin/:$PATH pip3 install pycairo
Expand Down
2 changes: 1 addition & 1 deletion src/iproute2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ SHELL = /bin/bash
.ONESHELL:
.SHELLFLAGS += -e

MAIN_TARGET = iproute2_$(IPROUTE2_VERSION_FULL)_$(CONFIGURED_ARCH).deb
MAIN_TARGET = iproute2_$(IPROUTE2_VERSION_SONIC)_$(CONFIGURED_ARCH).deb

$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
# Remove any stale files
Expand Down
14 changes: 14 additions & 0 deletions src/iproute2/patch/0001-patch-macsec-xpn-support.patch
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,20 @@ Signed-off-by: Ze Gan <ganze718@gmail.com>
ip/ipmacsec.c | 97 +++++++++++++++++++++++++++++++++++++++++++--------
1 file changed, 83 insertions(+), 14 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 2b114c1..bf3c253 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+iproute2 (5.10.0-4sonic1) unstable; urgency=medium
+
+ * Enhance iproute2 to update PN for XPN
+
+ -- Ze Gan <ganze718@gmail.com> Wed, 25 Jan 2023 11:25:50 -0800
+
iproute2 (5.10.0-4) unstable; urgency=medium

* Backport 0012-iproute-force-rtm_dst_len-to-32-128.patch to fix ip
diff --git a/ip/ipmacsec.c b/ip/ipmacsec.c
index 18289ec..fffe94a 100644
--- a/ip/ipmacsec.c
Expand Down