From 92c752888bc3f1f34ce864e3752b4991045b085c Mon Sep 17 00:00:00 2001 From: ArunSaravananBalachandran Date: Mon, 26 Feb 2024 11:09:54 +0530 Subject: [PATCH 1/2] Update PMON to bookworm - Use locally built ipmitool - Use latest version of smartmontools from Bookworm Debian repos - Update locally built lm-sensors to match version in Bookworm - Update grpcio and grpcio-tools python packages to match version in Bookworm --- dockers/docker-platform-monitor/Dockerfile.j2 | 9 ++++----- rules/docker-platform-monitor.mk | 13 +++++++------ rules/lm-sensors.mk | 2 +- sonic-slave-bookworm/Dockerfile.j2 | 4 ++++ 4 files changed, 16 insertions(+), 12 deletions(-) diff --git a/dockers/docker-platform-monitor/Dockerfile.j2 b/dockers/docker-platform-monitor/Dockerfile.j2 index aeb201a204..154dd06371 100755 --- a/dockers/docker-platform-monitor/Dockerfile.j2 +++ b/dockers/docker-platform-monitor/Dockerfile.j2 @@ -1,5 +1,5 @@ {% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files %} -FROM docker-config-engine-bullseye-{{DOCKER_USERNAME}}:{{DOCKER_USERTAG}} +FROM docker-config-engine-bookworm-{{DOCKER_USERNAME}}:{{DOCKER_USERTAG}} ARG docker_container_name ARG image_version @@ -15,7 +15,6 @@ RUN apt-get update && \ apt-get install -y \ build-essential \ python3-dev \ - ipmitool \ librrd8 \ librrd-dev \ rrdtool \ @@ -28,7 +27,7 @@ RUN apt-get update && \ iputils-ping \ pciutils \ # smartmontools version should match the installed smartmontools in sonic_debian_extension build template - smartmontools=7.2-1 \ + smartmontools \ ethtool # On Arista devices, the sonic_platform wheel is not installed in the container. @@ -36,8 +35,8 @@ RUN apt-get update && \ # doesn't ensure all dependencies are installed in the container. So here we # install any dependencies required by the Arista sonic_platform package. # TODO: eliminate the need to install these explicitly. -RUN pip3 install grpcio==1.39.0 \ - grpcio-tools==1.39.0 +RUN pip3 install grpcio==1.51.1 \ + grpcio-tools==1.51.1 # Barefoot platform vendors' sonic_platform packages import these Python libraries RUN pip3 install thrift==0.13.0 netifaces diff --git a/rules/docker-platform-monitor.mk b/rules/docker-platform-monitor.mk index a225ec99bc..99cca6f700 100644 --- a/rules/docker-platform-monitor.mk +++ b/rules/docker-platform-monitor.mk @@ -6,7 +6,7 @@ DOCKER_PLATFORM_MONITOR_DBG = $(DOCKER_PLATFORM_MONITOR_STEM)-$(DBG_IMAGE_MARK). $(DOCKER_PLATFORM_MONITOR)_PATH = $(DOCKERS_PATH)/$(DOCKER_PLATFORM_MONITOR_STEM) -$(DOCKER_PLATFORM_MONITOR)_DEPENDS += $(LIBSENSORS) $(LM_SENSORS) $(FANCONTROL) $(SENSORD) $(LIBSWSSCOMMON) $(PYTHON3_SWSSCOMMON) +$(DOCKER_PLATFORM_MONITOR)_DEPENDS += $(LIBSENSORS) $(LM_SENSORS) $(FANCONTROL) $(SENSORD) $(LIBSWSSCOMMON) $(PYTHON3_SWSSCOMMON) $(IPMITOOL) $(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_PLATFORM_COMMON_PY3) @@ -27,13 +27,14 @@ ifeq ($(PDDF_SUPPORT),y) $(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(PDDF_PLATFORM_API_BASE_PY3) endif -$(DOCKER_PLATFORM_MONITOR)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_BULLSEYE)_DBG_DEPENDS) +$(DOCKER_PLATFORM_MONITOR)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_BOOKWORM)_DBG_DEPENDS) $(DOCKER_PLATFORM_MONITOR)_DBG_DEPENDS += $(LIBSWSSCOMMON_DBG) $(LIBSENSORS_DBG) $(DOCKER_PLATFORM_MONITOR)_DBG_DEPENDS += $(LM_SENSORS_DBG) $(SENSORD_DBG) +$(DOCKER_PLATFORM_MONITOR)_DBG_DEPENDS += $(IPMITOOL_DBG) -$(DOCKER_PLATFORM_MONITOR)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BULLSEYE)_DBG_IMAGE_PACKAGES) +$(DOCKER_PLATFORM_MONITOR)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BOOKWORM)_DBG_IMAGE_PACKAGES) -$(DOCKER_PLATFORM_MONITOR)_LOAD_DOCKERS = $(DOCKER_CONFIG_ENGINE_BULLSEYE) +$(DOCKER_PLATFORM_MONITOR)_LOAD_DOCKERS = $(DOCKER_CONFIG_ENGINE_BOOKWORM) $(DOCKER_PLATFORM_MONITOR)_VERSION = 1.0.0 $(DOCKER_PLATFORM_MONITOR)_PACKAGE_NAME = pmon @@ -66,5 +67,5 @@ $(DOCKER_PLATFORM_MONITOR)_BASE_IMAGE_FILES += cmd_wrapper:/usr/sbin/SmartCmd $(DOCKER_PLATFORM_MONITOR)_BASE_IMAGE_FILES += cmd_wrapper:/usr/bin/ethtool $(DOCKER_PLATFORM_MONITOR)_FILES += $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT) -SONIC_BULLSEYE_DOCKERS += $(DOCKER_PLATFORM_MONITOR) -SONIC_BULLSEYE_DBG_DOCKERS += $(DOCKER_PLATFORM_MONITOR_DBG) +SONIC_BOOKWORM_DOCKERS += $(DOCKER_PLATFORM_MONITOR) +SONIC_BOOKWORM_DBG_DOCKERS += $(DOCKER_PLATFORM_MONITOR_DBG) diff --git a/rules/lm-sensors.mk b/rules/lm-sensors.mk index b33f7cc3a6..d5a76f076e 100644 --- a/rules/lm-sensors.mk +++ b/rules/lm-sensors.mk @@ -7,7 +7,7 @@ LM_SENSORS_PATCH_VERSION = 0 LIBSENSORS_VERSION = 5 LM_SENSORS_VERSION=$(LM_SENSORS_MAJOR_VERSION).$(LM_SENSORS_MINOR_VERSION).$(LM_SENSORS_PATCH_VERSION) -LM_SENSORS_VERSION_FULL=$(LM_SENSORS_VERSION)-7 +LM_SENSORS_VERSION_FULL=$(LM_SENSORS_VERSION)-7.1 LM_SENSORS = lm-sensors_$(LM_SENSORS_VERSION_FULL)_$(CONFIGURED_ARCH).deb $(LM_SENSORS)_SRC_PATH = $(SRC_PATH)/lm-sensors diff --git a/sonic-slave-bookworm/Dockerfile.j2 b/sonic-slave-bookworm/Dockerfile.j2 index 6bf09c425c..8408721950 100644 --- a/sonic-slave-bookworm/Dockerfile.j2 +++ b/sonic-slave-bookworm/Dockerfile.j2 @@ -479,6 +479,10 @@ RUN patch -p1 -i /disable-non-manylinux.patch /usr/local/lib/python3.11/dist-pac # For building sonic-utilities RUN pip3 install fastentrypoints mock +# For building sonic_ycabled +# Note: Match version in bookworm +RUN pip3 install grpcio==1.51.1 grpcio-tools==1.51.1 + # For running Python unit tests RUN pip3 install pytest-runner==5.2 RUN pip3 install mockredispy==2.9.3 From 4809c8fe47b5c0509dd0e704d691eee5dbfb8a3d Mon Sep 17 00:00:00 2001 From: ArunSaravananBalachandran Date: Thu, 7 Mar 2024 10:03:04 +0530 Subject: [PATCH 2/2] [PMON] Update smartmontool version >= 7.4 --- dockers/docker-platform-monitor/Dockerfile.j2 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dockers/docker-platform-monitor/Dockerfile.j2 b/dockers/docker-platform-monitor/Dockerfile.j2 index 154dd06371..ef6b2fcea8 100755 --- a/dockers/docker-platform-monitor/Dockerfile.j2 +++ b/dockers/docker-platform-monitor/Dockerfile.j2 @@ -26,9 +26,10 @@ RUN apt-get update && \ libpci3 \ iputils-ping \ pciutils \ + ethtool && \ # smartmontools version should match the installed smartmontools in sonic_debian_extension build template - smartmontools \ - ethtool + apt-get install -y -t bookworm-backports \ + smartmontools # On Arista devices, the sonic_platform wheel is not installed in the container. # Instead, the installation directory is mounted from the host OS. However, this method