From 54c1a4963414d0f70371d8d2547ac662e95f4f4f Mon Sep 17 00:00:00 2001 From: Mridul Bajpai <30709399+bmridul@users.noreply.github.com> Date: Fri, 23 Feb 2024 22:25:48 -0800 Subject: [PATCH] Sensormond support (#16089) Enable Sensormon daemon in PMON container. Pls see HLD : sonic-net/SONiC#1394 --- .../docker-pmon.supervisord.conf.j2 | 13 +++++++++++++ rules/docker-platform-monitor.mk | 1 + rules/sonic-sensormond.dep | 10 ++++++++++ rules/sonic-sensormond.mk | 10 ++++++++++ 4 files changed, 34 insertions(+) create mode 100644 rules/sonic-sensormond.dep create mode 100644 rules/sonic-sensormond.mk diff --git a/dockers/docker-platform-monitor/docker-pmon.supervisord.conf.j2 b/dockers/docker-platform-monitor/docker-pmon.supervisord.conf.j2 index 899160dd34..3cb5f0509a 100644 --- a/dockers/docker-platform-monitor/docker-pmon.supervisord.conf.j2 +++ b/dockers/docker-platform-monitor/docker-pmon.supervisord.conf.j2 @@ -183,3 +183,16 @@ startsecs=10 dependent_startup=true dependent_startup_wait_for=rsyslogd:running {% endif %} + +{% if include_sensormond %} +[program:sensormond] +command=/usr/local/bin/sensormond +priority=10 +autostart=false +autorestart=unexpected +stdout_logfile=syslog +stderr_logfile=syslog +startsecs=10 +dependent_startup=true +dependent_startup_wait_for=rsyslogd:running +{% endif %} diff --git a/rules/docker-platform-monitor.mk b/rules/docker-platform-monitor.mk index 5592341684..a225ec99bc 100644 --- a/rules/docker-platform-monitor.mk +++ b/rules/docker-platform-monitor.mk @@ -18,6 +18,7 @@ $(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_PCIED_PY3) $(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_PSUD_PY3) $(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_SYSEEPROMD_PY3) $(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_THERMALCTLD_PY3) +$(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_SENSORMOND_PY3) $(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_XCVRD_PY3) $(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_YCABLED_PY3) $(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_CHASSISD_PY3) diff --git a/rules/sonic-sensormond.dep b/rules/sonic-sensormond.dep new file mode 100644 index 0000000000..6346c803b9 --- /dev/null +++ b/rules/sonic-sensormond.dep @@ -0,0 +1,10 @@ +SPATH := $($(SONIC_SENSORMOND_PY3)_SRC_PATH) +DEP_FILES := $(SONIC_COMMON_FILES_LIST) rules/sonic-sensormond.mk rules/sonic-sensormond.dep +DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST) +SMDEP_FILES := $(addprefix $(SPATH)/,$(shell cd $(SPATH) && git ls-files)) + +$(SONIC_SENSORMOND_PY3)_CACHE_MODE := GIT_CONTENT_SHA +$(SONIC_SENSORMOND_PY3)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST) +$(SONIC_SENSORMOND_PY3)_DEP_FILES := $(DEP_FILES) +$(SONIC_SENSORMOND_PY3)_SMDEP_FILES := $(SMDEP_FILES) +$(SONIC_SENSORMOND_PY3)_SMDEP_PATHS := $(SPATH) diff --git a/rules/sonic-sensormond.mk b/rules/sonic-sensormond.mk new file mode 100644 index 0000000000..0daccdb25d --- /dev/null +++ b/rules/sonic-sensormond.mk @@ -0,0 +1,10 @@ +# sonic-sensormond (SONiC Thermal control daemon) Debian package + +# SONIC_SENSORMOND_PY3 package + +SONIC_SENSORMOND_PY3 = sonic_sensormond-1.0-py3-none-any.whl +$(SONIC_SENSORMOND_PY3)_SRC_PATH = $(SRC_PATH)/sonic-platform-daemons/sonic-sensormond +$(SONIC_SENSORMOND_PY3)_DEPENDS = $(SONIC_PY_COMMON_PY3) $(SONIC_PLATFORM_COMMON_PY3) +$(SONIC_SENSORMOND_PY3)_DEBS_DEPENDS = $(LIBSWSSCOMMON) $(PYTHON3_SWSSCOMMON) +$(SONIC_SENSORMOND_PY3)_PYTHON_VERSION = 3 +SONIC_PYTHON_WHEELS += $(SONIC_SENSORMOND_PY3)