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

Bookworm Base-image Upgrade #17234

Merged
merged 42 commits into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
b9a1705
Disable FIPS for Bookworm
saiarcot895 Jul 21, 2023
ca89929
Add Bookworm slave container
saiarcot895 Jun 26, 2023
3363398
Update slave.mk to assume a Bookworm base image
saiarcot895 Aug 21, 2023
5d22226
Update sonic-linux-kernel to use 6.1.38
saiarcot895 Aug 21, 2023
b4c094b
Update Python build commands for Bookworm
saiarcot895 Sep 8, 2023
92db6ec
sonic-yang-mgmt and sonic-yang-models: Update Python dependencies
saiarcot895 Sep 7, 2023
6a92343
sonic-yang-models: Specify test dependencies under extra_requires
saiarcot895 Sep 7, 2023
5564e96
Update openssh to 9.2p1-2+deb12u1 (the version in Debian Bookworm)
saiarcot895 Sep 8, 2023
86fdc7e
Mark many (but not all) of the dockers as Bullseye dockers
saiarcot895 Sep 8, 2023
6b9c462
For libyang, don't add an ordering dependency on frr for Bookworm
saiarcot895 Sep 8, 2023
aea724f
Migrate from ntp to ntpsec
saiarcot895 Oct 23, 2023
64fc343
Upgrade kdump-tools
saiarcot895 Oct 23, 2023
f48fb45
Fix libnss-tacplus compilation
saiarcot895 Sep 25, 2023
d5b2c87
Upgrade initramfs-tools to 0.142
saiarcot895 Sep 6, 2023
a0391a0
Update bitarray to 2.8.1 and pyyaml to 6.0 for sonic-config-engine
saiarcot895 Sep 6, 2023
7ca2ff3
Loosen help text test for sonic-yang-mgmt
saiarcot895 Sep 7, 2023
084d678
Update sonic-config-engine tests for Bookworm
saiarcot895 Sep 6, 2023
a9707b2
Update sonic-utilities for changes in Python
saiarcot895 Sep 7, 2023
9d7905f
Update sonic-host-services for changes in Python
saiarcot895 Sep 7, 2023
ebb7165
Update Debian build script for Bookworm
saiarcot895 Sep 6, 2023
8a03295
For Bookworm, use non-free-firmware instead of non-free
saiarcot895 Sep 6, 2023
f36ba9e
Disable several platform modules for Bookworm
saiarcot895 Sep 8, 2023
befd2bd
[PR:16737, PR:16739] platform-modules: pddf, broadcom/cel: adapt for …
rchandramouli Sep 8, 2023
796ce30
[Edgecore][sonic-platform-modules-accton]Support kernel 6.1 and bookw…
jostar-yang Oct 31, 2023
cf34288
Update pyyaml in sonic-bgpcfgd and sonic-frr-mgmt-framework to 6.0
saiarcot895 Sep 9, 2023
2f81de1
[marvell-arm64]: Enable SDK module for bookworm (#16909)
Keshavg-marvell Nov 3, 2023
9c46c9a
Modify rasdaemon service on amd64 only
saiarcot895 Sep 17, 2023
6cc5f94
[Nvidia] Fix mlnx-sai build failure (#14)
vivekrnv Sep 18, 2023
c91e2ae
Fix PAM module configuration issue
saiarcot895 Oct 10, 2023
536505e
Upgrade lldpd to 1.0.16
saiarcot895 Oct 11, 2023
8a95be1
Fix container down event not sending out a notification
saiarcot895 Oct 13, 2023
77ad488
Modify the sudoers file to lecture RO users once
saiarcot895 Oct 14, 2023
84b6cf4
Fix docker-sonic-mgmt-framework for armhf
saiarcot895 Oct 17, 2023
589bba3
[ci/build]: Upgrade SONiC package versions (#17035)
mssonicbld Oct 19, 2023
351560e
Add note about minimum Docker version due to clone3 syscall usage
saiarcot895 Oct 26, 2023
a2a8944
[Bookworm] [Secure Boot] Fix the updated path for extract-cert binary…
vivekrnv Oct 30, 2023
299cec4
[marvell-armhf]: Enable SDK module for bookworm (#17110)
pavannaregundi Nov 10, 2023
e62ba31
[bookworm] Fix docker gid mismatch with host (#17158)
vivekrnv Nov 17, 2023
7c5cbd0
[Mellanox] Upgrade HW-MGMT to 7.0030.2008 and update platform-api (#1…
vivekrnv Nov 17, 2023
80de08d
[mellanox] Update SAI to SAIBuild2311.25.0.36, SDK/FW to 4.6.2104/201…
vivekrnv Nov 17, 2023
ee02f1a
[Bookworm] Upgrade Dell platforms to Bookworm (#17003)
aravindmani-1 Oct 26, 2023
9ffd1af
don't build debootstrap from source
k-v1 Nov 19, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .azure-pipelines/docker-sonic-slave-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ parameters:
- name: dist
type: string
values:
- bookworm
- bullseye
- buster
- stretch
Expand Down
3 changes: 2 additions & 1 deletion .azure-pipelines/docker-sonic-slave.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ resources:
- repository: buildimage
type: github
name: sonic-net/sonic-buildimage
ref: master
ref: bookworm
endpoint: sonic-net

schedules:
Expand Down Expand Up @@ -44,6 +44,7 @@ parameters:
- name: 'dists'
type: object
default:
- bookworm
- bullseye
- buster
- stretch
Expand Down
19 changes: 17 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ NOJESSIE ?= 1
NOSTRETCH ?= 1
NOBUSTER ?= 0
NOBULLSEYE ?= 0
NOBOOKWORM ?= 0

override Q := @
ifeq ($(QUIET),n)
Expand All @@ -29,6 +30,10 @@ ifeq ($(NOBULLSEYE),0)
BUILD_BULLSEYE=1
endif

ifeq ($(NOBOOKWORM),0)
BUILD_BOOKWORM=1
endif

PLATFORM_PATH := platform/$(if $(PLATFORM),$(PLATFORM),$(CONFIGURED_PLATFORM))
PLATFORM_CHECKOUT := platform/checkout
PLATFORM_CHECKOUT_FILE := $(PLATFORM_CHECKOUT)/$(PLATFORM).ini
Expand All @@ -47,9 +52,12 @@ ifeq ($(NOBUSTER), 0)
$(MAKE_WITH_RETRY) EXTRA_DOCKER_TARGETS=$(notdir $@) BLDENV=buster -f Makefile.work buster
endif
ifeq ($(NOBULLSEYE), 0)
$(MAKE_WITH_RETRY) BLDENV=bullseye -f Makefile.work $@
$(MAKE_WITH_RETRY) EXTRA_DOCKER_TARGETS=$(notdir $@) BLDENV=bullseye -f Makefile.work bullseye
endif
BLDENV=bullseye $(MAKE) -f Makefile.work docker-cleanup
ifeq ($(NOBOOKWORM), 0)
$(MAKE_WITH_RETRY) BLDENV=bookworm -f Makefile.work $@
endif
BLDENV=bookworm $(MAKE) -f Makefile.work docker-cleanup

jessie:
@echo "+++ Making $@ +++"
Expand All @@ -69,6 +77,12 @@ ifeq ($(NOBUSTER), 0)
$(MAKE) -f Makefile.work buster
endif

bullseye:
@echo "+++ Making $@ +++"
ifeq ($(NOBUSTER), 0)
$(MAKE) -f Makefile.work bullseye
endif

init:
@echo "+++ Making $@ +++"
$(MAKE) -f Makefile.work $@
Expand All @@ -82,6 +96,7 @@ define make_work
$(if $(BUILD_STRETCH),BLDENV=stretch $(MAKE) -f Makefile.work $@,)
$(if $(BUILD_BUSTER),BLDENV=buster $(MAKE) -f Makefile.work $@,)
$(if $(BUILD_BULLSEYE),BLDENV=bullseye $(MAKE) -f Makefile.work $@,)
$(if $(BUILD_BOOKWORM),BLDENV=bookworm $(MAKE) -f Makefile.work $@,)
endef

.PHONY: $(PLATFORM_PATH)
Expand Down
3 changes: 2 additions & 1 deletion Makefile.cache
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ SONIC_COMMON_DPKG_LIST := debian/control debian/changelog debian/rules \
SONIC_COMMON_BASE_FILES_LIST := sonic-slave-jessie/Dockerfile.j2 sonic-slave-jessie/Dockerfile.user.j2 \
sonic-slave-stretch/Dockerfile.j2 sonic-slave-stretch/Dockerfile.user.j2 \
sonic-slave-buster/Dockerfile.j2 sonic-slave-buster/Dockerfile.user.j2 \
sonic-slave-bullseye/Dockerfile.j2 sonic-slave-bullseye/Dockerfile.user.j2
sonic-slave-bullseye/Dockerfile.j2 sonic-slave-bullseye/Dockerfile.user.j2 \
sonic-slave-bookworm/Dockerfile.j2 sonic-slave-bookworm/Dockerfile.user.j2



Expand Down
13 changes: 11 additions & 2 deletions Makefile.work
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ USER := $(shell id -un)
PWD := $(shell pwd)
USER_LC := $(shell echo $(USER) | tr A-Z a-z)
DOCKER_MACHINE := $(shell docker run --rm debian:buster uname -m)
HOST_DOCKERD_GID := $(shell getent group docker | cut -d : -f3)

comma := ,

Expand Down Expand Up @@ -121,7 +122,9 @@ else
TARGET_BOOTLOADER = uboot
endif

ifeq ($(BLDENV), bullseye)
ifeq ($(BLDENV), bookworm)
SLAVE_DIR = sonic-slave-bookworm
else ifeq ($(BLDENV), bullseye)
SLAVE_DIR = sonic-slave-bullseye
else ifeq ($(BLDENV), buster)
SLAVE_DIR = sonic-slave-buster
Expand Down Expand Up @@ -184,6 +187,12 @@ INCLUDE_FIPS := n
ENABLE_FIPS := n
endif

# FIPS not yet available on Bookworm
ifeq ($(BLDENV),bookworm)
$(warning FIPS support not yet available on Bookworm)
INCLUDE_FIPS := n
endif

ifeq ($(INCLUDE_FIPS), n)
ifeq ($(ENABLE_FIPS), y)
$(error Cannot set fips config ENABLE_FIPS=y when INCLUDE_FIPS=n)
Expand Down Expand Up @@ -381,7 +390,7 @@ endif

ifeq ($(SONIC_CONFIG_USE_NATIVE_DOCKERD_FOR_BUILD), y)
ifneq ($(MULTIARCH_QEMU_ENVIRON), y)
DOCKER_RUN += -v /var/run/docker.sock:/var/run/docker.sock
DOCKER_RUN += -v /var/run/docker.sock:/var/run/docker.sock --group-add $(HOST_DOCKERD_GID)
endif
endif

Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ pip3 install --user j2cli
system to allow running the 'docker' command without 'sudo':
* Add current user to the docker group: `sudo gpasswd -a ${USER} docker`
* Log out and log back in so that your group membership is re-evaluated
* If you are using Linux kernel 5.3 or newer, then you must use Docker 20.10.10 or newer. This is because older Docker versions did not allow the `clone3` syscall, which is now used in Bookworm.

> Note: If a previous installation of Docker using snap was present on the
> system, remove it and also remove docker from snap before reinstallating docker.
Expand Down Expand Up @@ -187,9 +188,6 @@ The supported ASIC vendors are:

## Usage for ARM Architecture

ARM build has dependency in docker version 18.
If docker version is 19, downgrade to 18 with:

```shell
sudo apt-get install --allow-downgrades -y docker-ce=5:18.09.0~3-0~ubuntu-xenial
sudo apt-get install --allow-downgrades -y docker-ce-cli=5:18.09.0~3-0~ubuntu-xenial
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ variables:
- name: CACHE_MODE
value: rcache
- name: ENABLE_FIPS
value: y
value: n

stages:
- stage: BuildVS
Expand Down
53 changes: 18 additions & 35 deletions build_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ set -x -e
CONFIGURED_ARCH=$([ -f .arch ] && cat .arch || echo amd64)

## docker engine version (with platform)
DOCKER_VERSION=5:24.0.2-1~debian.11~$IMAGE_DISTRO
DOCKER_VERSION=5:24.0.2-1~debian.12~$IMAGE_DISTRO
CONTAINERD_IO_VERSION=1.6.21-1
LINUX_KERNEL_VERSION=5.10.0-23-2
LINUX_KERNEL_VERSION=6.1.0-11-2

## Working directory to prepare the file system
FILESYSTEM_ROOT=./fsroot
Expand Down Expand Up @@ -256,24 +256,19 @@ sudo LANG=C chroot $FILESYSTEM_ROOT apt-get -y install apparmor
sudo cp files/image_config/ntp/ntp-apparmor $FILESYSTEM_ROOT/etc/apparmor.d/local/usr.sbin.ntpd
sudo LANG=C chroot $FILESYSTEM_ROOT apt-get -y install apt-transport-https \
ca-certificates \
curl \
gnupg2 \
Copy link
Collaborator

Choose a reason for hiding this comment

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

gnupg2

why remove gnupg2?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was being removed in line 275 below, after docker-ce was installed. This package is technically not needed for the purpose of installing docker-ce.

software-properties-common
curl
if [[ $CONFIGURED_ARCH == armhf ]]; then
# update ssl ca certificates for secure pem
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT c_rehash
fi
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT curl -o /tmp/docker.asc -fsSL https://download.docker.com/linux/debian/gpg
sudo LANG=C chroot $FILESYSTEM_ROOT mv /tmp/docker.asc /etc/apt/trusted.gpg.d/
sudo LANG=C chroot $FILESYSTEM_ROOT add-apt-repository \
"deb [arch=$CONFIGURED_ARCH] https://download.docker.com/linux/debian $IMAGE_DISTRO stable"
sudo tee $FILESYSTEM_ROOT/etc/apt/sources.list.d/docker.list >/dev/null <<EOF
deb [arch=$CONFIGURED_ARCH] https://download.docker.com/linux/debian $IMAGE_DISTRO stable
EOF
sudo LANG=C chroot $FILESYSTEM_ROOT apt-get update
sudo LANG=C chroot $FILESYSTEM_ROOT apt-get -y install docker-ce=${DOCKER_VERSION} docker-ce-cli=${DOCKER_VERSION} containerd.io=${CONTAINERD_IO_VERSION}

# Uninstall 'python3-gi' installed as part of 'software-properties-common' to remove debian version of 'PyGObject'
# pip version of 'PyGObject' will be installed during installation of 'sonic-host-services'
sudo LANG=C chroot $FILESYSTEM_ROOT apt-get -y remove software-properties-common gnupg2 python3-gi

install_kubernetes () {
local ver="$1"
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT curl -fsSL \
Expand Down Expand Up @@ -375,6 +370,7 @@ sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y in
sysfsutils \
squashfs-tools \
$bootloader_packages \
rsyslog \
screen \
hping3 \
tcptraceroute \
Expand All @@ -390,9 +386,9 @@ sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y in
python3-pip \
python-is-python3 \
cron \
libprotobuf23 \
libprotobuf32 \
libgrpc++1 \
libgrpc10 \
libgrpc29 \
haveged \
fdisk \
gpg \
Expand All @@ -401,11 +397,9 @@ sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y in
linux-perf \
resolvconf \
lsof \
sysstat

# default rsyslog version is 8.2110.0 which has a bug on log rate limit,
# use backport version
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -t bullseye-backports -y install rsyslog
sysstat \
xxd \
zstd

# Have systemd create the auditd log directory
sudo mkdir -p ${FILESYSTEM_ROOT}/etc/systemd/system/auditd.service.d
Expand Down Expand Up @@ -451,14 +445,6 @@ sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y in
systemd-sysv \
ntp

# Workaround for issue: The udev rule may fail to be executed because the
# daemon-reload command is executed in parallel
# Github issue: https://github.com/systemd/systemd/issues/24668
# Github PR: https://github.com/systemd/systemd/pull/24673
# This workaround should be removed after a upstream already contains the fixes
sudo patch $FILESYSTEM_ROOT/lib/systemd/system/systemd-udevd.service \
files/image_config/systemd/systemd-udevd/fix-udev-rule-may-fail-if-daemon-reload-command-runs.patch

if [[ $TARGET_BOOTLOADER == grub ]]; then
if [[ $CONFIGURED_ARCH == amd64 ]]; then
GRUB_PKG=grub-pc-bin
Expand Down Expand Up @@ -535,13 +521,11 @@ done < files/image_config/sysctl/sysctl-net.conf

sudo augtool --autosave "$sysctl_net_cmd_string" -r $FILESYSTEM_ROOT

# Upgrade pip via PyPI and uninstall the Debian version
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip3 install --upgrade pip
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get purge -y python3-pip
# Specify that we want to explicitly install Python packages into the system environment, and risk breakages
sudo cp files/image_config/pip/pip.conf $FILESYSTEM_ROOT/etc/pip.conf

# For building Python packages
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip3 install 'setuptools==49.6.00'
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip3 install 'wheel==0.35.1'
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install python3-setuptools python3-wheel

# docker Python API package is needed by Ansible docker module as well as some SONiC applications
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip3 install 'docker==6.1.1'
Expand Down Expand Up @@ -574,13 +558,12 @@ sudo cp files/dhcp/sethostname6 $FILESYSTEM_ROOT/etc/dhcp/dhclient-exit-hooks.d/
sudo cp files/dhcp/graphserviceurl $FILESYSTEM_ROOT/etc/dhcp/dhclient-exit-hooks.d/
sudo cp files/dhcp/snmpcommunity $FILESYSTEM_ROOT/etc/dhcp/dhclient-exit-hooks.d/
sudo cp files/dhcp/vrf $FILESYSTEM_ROOT/etc/dhcp/dhclient-exit-hooks.d/
if [ -f files/image_config/ntp/ntp ]; then
sudo cp ./files/image_config/ntp/ntp $FILESYSTEM_ROOT/etc/init.d/
if [ -f files/image_config/ntp/ntpsec ]; then
sudo cp ./files/image_config/ntp/ntpsec $FILESYSTEM_ROOT/etc/init.d/
fi

if [ -f files/image_config/ntp/ntp-systemd-wrapper ]; then
sudo mkdir -p $FILESYSTEM_ROOT/usr/lib/ntp/
sudo cp ./files/image_config/ntp/ntp-systemd-wrapper $FILESYSTEM_ROOT/usr/lib/ntp/
sudo cp ./files/image_config/ntp/ntp-systemd-wrapper $FILESYSTEM_ROOT/usr/libexec/ntpsec/
fi

## Version file part 1
Expand Down
33 changes: 16 additions & 17 deletions device/mellanox/x86_64-mlnx_msn2700-r0/platform_wait
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ declare -r SYSLOG_INFO="info"

declare -r HW_MGMT_CONFIG="/var/run/hw-management/config"

declare -r MODULE_COUNTER="${HW_MGMT_CONFIG}/module_counter"
declare -r SFP_COUNTER="${HW_MGMT_CONFIG}/sfp_counter"
declare -r ASIC_INIT_DONE="${HW_MGMT_CONFIG}/asics_init_done"
declare -r NUM_ASICS="${HW_MGMT_CONFIG}/asic_num"
declare -r ASIC_CHIPUP_COMPLETED="${HW_MGMT_CONFIG}/asic_chipup_completed"

declare -r EXIT_SUCCESS="0"
declare -r EXIT_TIMEOUT="1"
Expand All @@ -26,44 +27,42 @@ function log_info() {
eval "${SYSLOG_LOGGER} -t ${SYSLOG_IDENTIFIER} -p ${SYSLOG_INFO} $@"
}

function wait_for_sfp() {
local -r _NUM_MATCH="^[0-9]+$"
local -r _NUM_ZERO="0"
function wait_for_asic_chipup() {

local _MODULE_CNT="0"
local _SFP_CNT="0"
local _ASIC_INIT="0"
local _ASIC_COUNT="0"
local _ASICS_CHIPUP="0"

local -i _WDOG_CNT="1"
local -ir _WDOG_MAX="300"

local -r _TIMEOUT="1s"

while [[ "${_WDOG_CNT}" -le "${_WDOG_MAX}" ]]; do
_MODULE_CNT="$(cat ${MODULE_COUNTER} 2>&1)"
_SFP_CNT="$(cat ${SFP_COUNTER} 2>&1)"
_ASIC_INIT="$(cat ${ASIC_INIT_DONE} 2>&1)"
_ASIC_COUNT="$(cat ${NUM_ASICS} 2>&1)"
_ASICS_CHIPUP="$(cat ${ASIC_CHIPUP_COMPLETED} 2>&1)"

if [[ "${_MODULE_CNT}" =~ ${_NUM_MATCH} && "${_SFP_CNT}" =~ ${_NUM_MATCH} ]]; then
if [[ "${_SFP_CNT}" -gt "${_NUM_ZERO}" && "${_MODULE_CNT}" -eq "${_SFP_CNT}" ]]; then
return "${EXIT_SUCCESS}"
fi
if [[ "${_ASIC_INIT}" -eq 1 && "${_ASIC_COUNT}" -eq "${_ASICS_CHIPUP}" ]]; then
return "${EXIT_SUCCESS}"
fi

let "_WDOG_CNT++"
sleep "${_TIMEOUT}"
done

log_error "Mellanox ASIC is not ready: INIT: ${_ASIC_INIT}, NUM_ASIC: ${_ASIC_COUNT}, CHIPUP: ${_ASICS_CHIPUP} timeout...."
return "${EXIT_TIMEOUT}"
}

log_info "Wait for SFP interfaces to be ready"
log_info "Wait for Mellanox ASIC to be ready"

wait_for_sfp
wait_for_asic_chipup
EXIT_CODE="$?"
if [[ "${EXIT_CODE}" != "${EXIT_SUCCESS}" ]]; then
log_error "SFP interfaces are not ready: timeout"
exit "${EXIT_CODE}"
fi

log_info "SFP interfaces are ready"
log_notice "Mellanox ASIC is ready"

exit "${EXIT_SUCCESS}"
2 changes: 2 additions & 0 deletions dockers/docker-sonic-mgmt-framework/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y g++ python3-dev libxml2 libcurl3-gnutls libcjson-dev

# Limited to grpcio 1.58.0 due to armhf
RUN pip3 install connexion==2.7.0 \
setuptools==21.0.0 \
grpcio==1.58.0 \
grpcio-tools==1.20.0 \
certifi==2017.4.17 \
python-dateutil==2.6.0 \
Expand Down
20 changes: 13 additions & 7 deletions files/apt/sources.list.j2
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
# The configuration is generated by template
# Please add additional sources in /etc/apt/sources.list.d

{% if DISTRIBUTION == 'bookworm' -%}
{%- set nonfree_component='non-free-firmware' -%}
{%- else -%}
{%- set nonfree_component='non-free' -%}
{%- endif %}

{% for mirror_url in MIRROR_URLS.split(',') %}
deb [arch={{ ARCHITECTURE }}] {{ mirror_url }} {{ DISTRIBUTION }} main contrib non-free
deb-src [arch={{ ARCHITECTURE }}] {{ mirror_url }} {{ DISTRIBUTION }} main contrib non-free
deb [arch={{ ARCHITECTURE }}] {{ mirror_url }} {{ DISTRIBUTION }}-updates main contrib non-free
deb-src [arch={{ ARCHITECTURE }}] {{ mirror_url }} {{ DISTRIBUTION }}-updates main contrib non-free
deb [arch={{ ARCHITECTURE }}] {{ mirror_url }} {{ DISTRIBUTION }}-backports main contrib non-free
deb [arch={{ ARCHITECTURE }}] {{ mirror_url }} {{ DISTRIBUTION }} main contrib {{ nonfree_component }}
deb-src [arch={{ ARCHITECTURE }}] {{ mirror_url }} {{ DISTRIBUTION }} main contrib {{ nonfree_component }}
deb [arch={{ ARCHITECTURE }}] {{ mirror_url }} {{ DISTRIBUTION }}-updates main contrib {{ nonfree_component }}
deb-src [arch={{ ARCHITECTURE }}] {{ mirror_url }} {{ DISTRIBUTION }}-updates main contrib {{ nonfree_component }}
deb [arch={{ ARCHITECTURE }}] {{ mirror_url }} {{ DISTRIBUTION }}-backports main contrib {{ nonfree_component }}
{% endfor %}
{% for mirror_url in MIRROR_SECURITY_URLS.split(',') %}
{% set dist_separator='/' %}{% if 'packages.trafficmanager.net/debian' in mirror_url %}{% set dist_separator='_' %}{% endif %}
{% if DISTRIBUTION == 'stretch' or DISTRIBUTION == 'buster' %}
deb [arch={{ ARCHITECTURE }}] {{ mirror_url }} {{ DISTRIBUTION }}{{ dist_separator }}updates main contrib non-free
deb-src [arch={{ ARCHITECTURE }}] {{ mirror_url }} {{ DISTRIBUTION }}{{ dist_separator }}updates main contrib non-free
{% else %}
deb [arch={{ ARCHITECTURE }}] {{ mirror_url }} {{ DISTRIBUTION }}-security main contrib non-free
deb-src [arch={{ ARCHITECTURE }}] {{ mirror_url }} {{ DISTRIBUTION }}-security main contrib non-free
deb [arch={{ ARCHITECTURE }}] {{ mirror_url }} {{ DISTRIBUTION }}-security main contrib {{ nonfree_component }}
deb-src [arch={{ ARCHITECTURE }}] {{ mirror_url }} {{ DISTRIBUTION }}-security main contrib {{ nonfree_component }}
{% endif %}
{% endfor %}
Loading
Loading