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 VS syncd to Bookworm #18347

Merged
merged 3 commits into from
Apr 22, 2024
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
30 changes: 30 additions & 0 deletions platform/template/docker-gbsyncd-bookworm.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# docker image for gbsyncd


DOCKER_GBSYNCD_BASE_STEM = docker-gbsyncd-$(DOCKER_GBSYNCD_PLATFORM_CODE)
DOCKER_GBSYNCD_BASE = $(DOCKER_GBSYNCD_BASE_STEM).gz
DOCKER_GBSYNCD_BASE_DBG = $(DOCKER_GBSYNCD_BASE_STEM)-$(DBG_IMAGE_MARK).gz

$(DOCKER_GBSYNCD_BASE)_PATH = $(PLATFORM_PATH)/docker-gbsyncd-$(DOCKER_GBSYNCD_PLATFORM_CODE)

$(DOCKER_GBSYNCD_BASE)_FILES += $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT)

$(DOCKER_GBSYNCD_BASE)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BOOKWORM)

$(DOCKER_GBSYNCD_BASE)_DBG_DEPENDS += $($(DOCKER_CONFIG_ENGINE_BOOKWORM)_DBG_DEPENDS)

$(DOCKER_GBSYNCD_BASE)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BOOKWORM)_DBG_IMAGE_PACKAGES)

SONIC_DOCKER_IMAGES += $(DOCKER_GBSYNCD_BASE)
SONIC_BOOKWORM_DOCKERS += $(DOCKER_GBSYNCD_BASE)
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_GBSYNCD_BASE)

SONIC_DOCKER_DBG_IMAGES += $(DOCKER_GBSYNCD_BASE_DBG)
SONIC_BOOKWORM_DBG_DOCKERS += $(DOCKER_GBSYNCD_BASE_DBG)
SONIC_INSTALL_DOCKER_DBG_IMAGES += $(DOCKER_GBSYNCD_BASE_DBG)

$(DOCKER_GBSYNCD_BASE)_CONTAINER_NAME = gbsyncd
$(DOCKER_GBSYNCD_BASE)_RUN_OPT += --privileged -t
$(DOCKER_GBSYNCD_BASE)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf
$(DOCKER_GBSYNCD_BASE)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
$(DOCKER_GBSYNCD_BASE)_RUN_OPT += -v /host/warmboot:/var/warmboot
33 changes: 33 additions & 0 deletions platform/template/docker-syncd-bookworm.mk
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_BOOKWORM)
$(DOCKER_SYNCD_BASE)_DBG_DEPENDS += $($(DOCKER_CONFIG_ENGINE_BOOKWORM)_DBG_DEPENDS)
$(DOCKER_SYNCD_BASE)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BOOKWORM)_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_BOOKWORM_DOCKERS += $(DOCKER_SYNCD_BASE)
SONIC_BOOKWORM_DBG_DOCKERS += $(DOCKER_SYNCD_BASE_DBG)

2 changes: 1 addition & 1 deletion platform/vs/docker-gbsyncd-vs.mk
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# docker image for vs gbsyncd

DOCKER_GBSYNCD_PLATFORM_CODE = vs
include $(PLATFORM_PATH)/../template/docker-gbsyncd-base.mk
include $(PLATFORM_PATH)/../template/docker-gbsyncd-bookworm.mk

$(DOCKER_GBSYNCD_BASE)_DEPENDS += $(SYNCD_VS)

Expand Down
2 changes: 1 addition & 1 deletion platform/vs/docker-gbsyncd-vs/Dockerfile.j2
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM docker-config-engine-bullseye-{{DOCKER_USERNAME}}:{{DOCKER_USERTAG}}
FROM docker-config-engine-bookworm-{{DOCKER_USERNAME}}:{{DOCKER_USERTAG}}

ARG docker_container_name

Expand Down
3 changes: 1 addition & 2 deletions platform/vs/docker-sonic-vs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ $(DOCKER_SONIC_VS)_DEPENDS += $(SYNCD_VS) \
$(LIBYANG_CPP) \
$(LIBYANG_PY3) \
$(SONIC_UTILITIES_DATA) \
$(SONIC_HOST_SERVICES_DATA) \
$(IPROUTE2)
$(SONIC_HOST_SERVICES_DATA)

$(DOCKER_SONIC_VS)_PYTHON_WHEELS += $(SONIC_PY_COMMON_PY3) \
$(SONIC_PLATFORM_COMMON_PY3) \
Expand Down
33 changes: 16 additions & 17 deletions platform/vs/docker-sonic-vs/Dockerfile.j2
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files %}
FROM docker-swss-layer-bullseye-{{DOCKER_USERNAME}}:{{DOCKER_USERTAG}}

ARG docker_container_name
Expand Down Expand Up @@ -25,7 +26,6 @@ RUN apt-get install -y net-tools \
openssh-client \
openssh-server \
libc-ares2 \
iproute2 \
grub2-common \
bash-completion \
libelf1 \
Expand Down Expand Up @@ -69,6 +69,8 @@ RUN apt-get install -y net-tools \
libgssrpc4 \
libkdb5-10

RUN apt-get install -y -t bullseye-backports iproute2

# For sonic-config-engine Python 3 package
# Install pyangbind here, outside sonic-config-engine dependencies, as pyangbind causes enum34 to be installed.
# Then immediately uninstall enum34, as enum34 should not be installed for Python >= 3.4, as it causes a
Expand All @@ -84,32 +86,29 @@ RUN pip3 install \
netifaces==0.10.9

{% if docker_sonic_vs_debs.strip() -%}
# Copy locally-built Debian package dependencies
COPY {%- for deb in docker_sonic_vs_debs.split(' ') %} debs/{{ deb }}{%- endfor %} /debs/
# Copy built Debian packages
{{ copy_files("debs/", docker_sonic_vs_debs.split(' '), "/debs/") }}

# Install locally-built Debian packages and implicitly install their dependencies
RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; {%- for deb in docker_sonic_vs_debs.split(' ') %} dpkg_apt /debs/{{ deb }};{%- endfor %}
# Install built Debian packages and implicitly install their dependencies
{{ install_debian_packages(docker_sonic_vs_debs.split(' ')) }}
{%- endif %}

RUN apt-get install -y libzmq3-dev

{% if docker_sonic_vs_pydebs.strip() -%}
# Copy locally-built Debian package dependencies
COPY {%- for deb in docker_sonic_vs_pydebs.split(' ') %} python-debs/{{ deb }}{%- endfor %} /debs/
# Copy built Debian packages
{{ copy_files("python-debs/", docker_sonic_vs_pydebs.split(' '), "/debs/") }}

# Install locally-built Debian packages and implicitly install their dependencies
RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; {%- for deb in docker_sonic_vs_pydebs.split(' ') %} dpkg_apt /debs/{{ deb }};{%- endfor %}
# Install built Debian packages and implicitly install their dependencies
{{ install_debian_packages(docker_sonic_vs_pydebs.split(' ')) }}
{%- endif %}

{% if docker_sonic_vs_whls.strip() %}
# copy all whl PKGs first,
copy {%- for whl in docker_sonic_vs_whls.split(' ') %} python-wheels/{{ whl }}{%- endfor %} python-wheels/

# install PKGs after copying all PKGs to avoid dependency failure
# use py3 to find python3 package, which is forced by wheel as of now
{%- for whl in docker_sonic_vs_whls.split(' ') %}
RUN pip{% if 'py3' in whl %}3{% else %}2{% endif %} install python-wheels/{{ whl }}
{%- endfor %}
# Copy locally-built Python wheel dependencies
{{ copy_files("python-wheels/", docker_sonic_vs_whls.split(' '), "/python-wheels/") }}

# Install locally-built Python wheel dependencies
{{ install_python_wheels(docker_sonic_vs_whls.split(' ')) }}
{% endif %}

# Clean up
Expand Down
5 changes: 2 additions & 3 deletions platform/vs/docker-syncd-vs.mk
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
# docker image for vs syncd

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

$(DOCKER_SYNCD_BASE)_DEPENDS += $(SYNCD_VS) \
$(IPROUTE2)
$(DOCKER_SYNCD_BASE)_DEPENDS += $(SYNCD_VS)

$(DOCKER_SYNCD_BASE)_DBG_DEPENDS += $(SYNCD_VS_DBG) \
$(LIBSWSSCOMMON_DBG) \
Expand Down
20 changes: 9 additions & 11 deletions platform/vs/docker-syncd-vs/Dockerfile.j2
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM docker-config-engine-bullseye-{{DOCKER_USERNAME}}:{{DOCKER_USERTAG}}
{% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files %}
FROM docker-config-engine-bookworm-{{DOCKER_USERNAME}}:{{DOCKER_USERTAG}}

ARG docker_container_name

Expand All @@ -7,18 +8,15 @@ ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update

RUN apt-get install -f -y libcap2-bin
RUN apt-get install -y libcap2-bin

COPY \
{% for deb in docker_syncd_vs_debs.split(' ') -%}
debs/{{ deb }}{{' '}}
{%- endfor -%}
debs/
{% if docker_syncd_vs_debs.strip() -%}
# Copy built Debian packages
{{ copy_files("debs/", docker_syncd_vs_debs.split(' '), "/debs/") }}

RUN dpkg -i \
{% for deb in docker_syncd_vs_debs.split(' ') -%}
debs/{{ deb }}{{' '}}
{%- endfor %} || apt-get install -f -y
# Install built Debian packages and implicitly install their dependencies
{{ install_debian_packages(docker_syncd_vs_debs.split(' ')) }}
{%- endif %}

COPY ["start.sh", "/usr/bin/"]

Expand Down
10 changes: 0 additions & 10 deletions rules/iproute2.dep

This file was deleted.

13 changes: 0 additions & 13 deletions rules/iproute2.mk

This file was deleted.

4 changes: 0 additions & 4 deletions src/iproute2/.gitignore

This file was deleted.

28 changes: 0 additions & 28 deletions src/iproute2/Makefile

This file was deleted.

Loading
Loading