From 9ef846496423ab7b37c324f5615e944047f6990b Mon Sep 17 00:00:00 2001 From: cytsao1 <111393130+cytsao1@users.noreply.github.com> Date: Mon, 17 Oct 2022 13:26:31 -0700 Subject: [PATCH] [pmon] Add smartmontools to pmon docker (#11837) * Add smartmontools to pmon docker * Set smartmontools to install version 7.2-1 in pmon to match host; clean up smartmontools build files * Add comments on smartmontools version for both host and pmon --- dockers/docker-platform-monitor/Dockerfile.j2 | 4 +++- files/build_templates/sonic_debian_extension.j2 | 2 +- rules/smartmontools.dep | 10 ---------- rules/smartmontools.mk | 12 ------------ 4 files changed, 4 insertions(+), 24 deletions(-) delete mode 100644 rules/smartmontools.dep delete mode 100644 rules/smartmontools.mk diff --git a/dockers/docker-platform-monitor/Dockerfile.j2 b/dockers/docker-platform-monitor/Dockerfile.j2 index 5c34246ca8..51d944d170 100755 --- a/dockers/docker-platform-monitor/Dockerfile.j2 +++ b/dockers/docker-platform-monitor/Dockerfile.j2 @@ -26,7 +26,9 @@ RUN apt-get update && \ psmisc \ python3-jsonschema \ libpci3 \ - iputils-ping + iputils-ping \ +# smartmontools version should match the installed smartmontools in sonic_debian_extension build template + smartmontools=7.2-1 # 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 diff --git a/files/build_templates/sonic_debian_extension.j2 b/files/build_templates/sonic_debian_extension.j2 index 0e219e9fa2..57438ef785 100644 --- a/files/build_templates/sonic_debian_extension.j2 +++ b/files/build_templates/sonic_debian_extension.j2 @@ -344,7 +344,7 @@ sudo chmod 755 $FILESYSTEM_ROOT/usr/bin/memory_checker sudo cp $IMAGE_CONFIGS/monit/restart_service $FILESYSTEM_ROOT/usr/bin/ sudo chmod 755 $FILESYSTEM_ROOT/usr/bin/restart_service -# Install custom-built smartmontools +# Installed smartmontools version should match installed smartmontools in docker-platform-monitor Dockerfile sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install smartmontools=7.2-1 # Install custom-built openssh sshd diff --git a/rules/smartmontools.dep b/rules/smartmontools.dep deleted file mode 100644 index 0ca63f5f1f..0000000000 --- a/rules/smartmontools.dep +++ /dev/null @@ -1,10 +0,0 @@ - -SPATH := $($(SMARTMONTOOLS)_SRC_PATH) -DEP_FILES := $(SONIC_COMMON_FILES_LIST) rules/smartmontools.mk rules/smartmontools.dep -DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST) -DEP_FILES += $(shell git ls-files $(SPATH)) - -$(SMARTMONTOOLS)_CACHE_MODE := GIT_CONTENT_SHA -$(SMARTMONTOOLS)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST) -$(SMARTMONTOOLS)_DEP_FILES := $(DEP_FILES) - diff --git a/rules/smartmontools.mk b/rules/smartmontools.mk deleted file mode 100644 index 7cc61eee6f..0000000000 --- a/rules/smartmontools.mk +++ /dev/null @@ -1,12 +0,0 @@ -# smartmontools package -# - -SMARTMONTOOLS_VERSION_MAJOR = 6.6 -SMARTMONTOOLS_VERSION_FULL = $(SMARTMONTOOLS_VERSION_MAJOR)-1 - -export SMARTMONTOOLS_VERSION_MAJOR SMARTMONTOOLS_VERSION_FULL - -SMARTMONTOOLS = smartmontools_$(SMARTMONTOOLS_VERSION_FULL)_$(CONFIGURED_ARCH).deb -$(SMARTMONTOOLS)_SRC_PATH = $(SRC_PATH)/smartmontools - -SONIC_MAKE_DEBS += $(SMARTMONTOOLS)