From 204d9aefa18d2c4c63c80de5a521c32fafbff478 Mon Sep 17 00:00:00 2001 From: sujinmkang Date: Fri, 17 Jul 2020 23:35:03 -0700 Subject: [PATCH 1/5] Add pcied to PMON container --- .../docker-pmon.supervisord.conf.j2 | 13 +++++++++++++ rules/docker-platform-monitor.mk | 2 +- rules/sonic-pcied.dep | 12 ++++++++++++ rules/sonic-pcied.mk | 6 ++++++ 4 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 rules/sonic-pcied.dep create mode 100644 rules/sonic-pcied.mk diff --git a/dockers/docker-platform-monitor/docker-pmon.supervisord.conf.j2 b/dockers/docker-platform-monitor/docker-pmon.supervisord.conf.j2 index a002d2bded83..7c1b96b2063d 100644 --- a/dockers/docker-platform-monitor/docker-pmon.supervisord.conf.j2 +++ b/dockers/docker-platform-monitor/docker-pmon.supervisord.conf.j2 @@ -127,3 +127,16 @@ startsecs=10 dependent_startup=true dependent_startup_wait_for=start:exited {% endif %} + +{% if not skip_pcied %} +[program:pcied] +command=/usr/bin/pcied +priority=10 +autostart=false +autorestart=unexpected +stdout_logfile=syslog +stderr_logfile=syslog +startsecs=10 +dependent_startup=true +dependent_startup_wait_for=start:exited +{% endif %} diff --git a/rules/docker-platform-monitor.mk b/rules/docker-platform-monitor.mk index db1c8c5a0289..eeb99dd4ddf8 100644 --- a/rules/docker-platform-monitor.mk +++ b/rules/docker-platform-monitor.mk @@ -10,7 +10,7 @@ $(DOCKER_PLATFORM_MONITOR)_DEPENDS += $(LIBSENSORS) $(LM_SENSORS) $(FANCONTROL) ifeq ($(CONFIGURED_PLATFORM),barefoot) $(DOCKER_PLATFORM_MONITOR)_DEPENDS += $(PYTHON_THRIFT) endif -$(DOCKER_PLATFORM_MONITOR)_PYTHON_DEBS += $(SONIC_LEDD) $(SONIC_XCVRD) $(SONIC_PSUD) $(SONIC_SYSEEPROMD) $(SONIC_THERMALCTLD) +$(DOCKER_PLATFORM_MONITOR)_PYTHON_DEBS += $(SONIC_LEDD) $(SONIC_XCVRD) $(SONIC_PSUD) $(SONIC_SYSEEPROMD) $(SONIC_THERMALCTLD) $(SONIC_PCIED) $(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_PLATFORM_COMMON_PY2) $(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SWSSSDK_PY2) $(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_PLATFORM_API_PY2) diff --git a/rules/sonic-pcied.dep b/rules/sonic-pcied.dep new file mode 100644 index 000000000000..f602f0177018 --- /dev/null +++ b/rules/sonic-pcied.dep @@ -0,0 +1,12 @@ + +SPATH := $($(SONIC_PCIED)_SRC_PATH) +DEP_FILES := $(SONIC_COMMON_FILES_LIST) rules/sonic-pcied.mk rules/sonic-pcied.dep +DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST) +SMDEP_FILES := $(addprefix $(SPATH)/,$(shell cd $(SPATH) && git ls-files)) + +$(SONIC_PCIED)_CACHE_MODE := GIT_CONTENT_SHA +$(SONIC_PCIED)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST) +$(SONIC_PCIED)_DEP_FILES := $(DEP_FILES) +$(SONIC_PCIED)_SMDEP_FILES := $(SMDEP_FILES) +$(SONIC_PCIED)_SMDEP_PATHS := $(SPATH) + diff --git a/rules/sonic-pcied.mk b/rules/sonic-pcied.mk new file mode 100644 index 000000000000..91796f4da54f --- /dev/null +++ b/rules/sonic-pcied.mk @@ -0,0 +1,6 @@ +# sonic-pcied (SONiC PCIe Monitor daemon) Debian package + +SONIC_PCIED = python-sonic-pcied_1.0-1_all.deb +$(SONIC_PCIED)_SRC_PATH = $(SRC_PATH)/sonic-platform-daemons/sonic-pcied +$(SONIC_PCIED)_WHEEL_DEPENDS = $(SONIC_DAEMON_BASE_PY2) +SONIC_PYTHON_STDEB_DEBS += $(SONIC_PCIED) From 1f6be3e07f50d8efa287fd71628af15717c94fe3 Mon Sep 17 00:00:00 2001 From: sujinmkang Date: Sat, 18 Jul 2020 00:08:06 -0700 Subject: [PATCH 2/5] remove tailing spaces --- rules/sonic-pcied.dep | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/rules/sonic-pcied.dep b/rules/sonic-pcied.dep index f602f0177018..e70e076c9372 100644 --- a/rules/sonic-pcied.dep +++ b/rules/sonic-pcied.dep @@ -1,12 +1,11 @@ -SPATH := $($(SONIC_PCIED)_SRC_PATH) -DEP_FILES := $(SONIC_COMMON_FILES_LIST) rules/sonic-pcied.mk rules/sonic-pcied.dep -DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST) -SMDEP_FILES := $(addprefix $(SPATH)/,$(shell cd $(SPATH) && git ls-files)) - -$(SONIC_PCIED)_CACHE_MODE := GIT_CONTENT_SHA -$(SONIC_PCIED)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST) -$(SONIC_PCIED)_DEP_FILES := $(DEP_FILES) -$(SONIC_PCIED)_SMDEP_FILES := $(SMDEP_FILES) -$(SONIC_PCIED)_SMDEP_PATHS := $(SPATH) +SPATH:= $($(SONIC_PCIED)_SRC_PATH) +DEP_FILES:= $(SONIC_COMMON_FILES_LIST) rules/sonic-pcied.mk rules/sonic-pcied.dep +DEP_FILES+= $(SONIC_COMMON_BASE_FILES_LIST) +SMDEP_FILES:= $(addprefix $(SPATH)/,$(shell cd $(SPATH) && git ls-files)) +$(SONIC_PCIED)_CACHE_MODE:= GIT_CONTENT_SHA +$(SONIC_PCIED)_DEP_FLAGS:= $(SONIC_COMMON_FLAGS_LIST) +$(SONIC_PCIED)_DEP_FILES:= $(DEP_FILES) +$(SONIC_PCIED)_SMDEP_FILES:= $(SMDEP_FILES) +$(SONIC_PCIED)_SMDEP_PATHS:= $(SPATH) From 57066ca318447e02d753384028d931c46f6d52a3 Mon Sep 17 00:00:00 2001 From: sujkang Date: Sat, 18 Jul 2020 00:37:11 -0700 Subject: [PATCH 3/5] update pmon submodule --- src/sonic-platform-daemons | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-platform-daemons b/src/sonic-platform-daemons index 9b8bfa10b2ba..4f42a798c545 160000 --- a/src/sonic-platform-daemons +++ b/src/sonic-platform-daemons @@ -1 +1 @@ -Subproject commit 9b8bfa10b2ba57129edfe5447880afea02b5692d +Subproject commit 4f42a798c54564a67014a3c9d115f67975c1c7d9 From 964868eec4b49432e03e9f8e46b796880dfa3711 Mon Sep 17 00:00:00 2001 From: sujkang Date: Mon, 20 Jul 2020 12:36:37 -0700 Subject: [PATCH 4/5] review comments --- rules/sonic-pcied.dep | 1 - 1 file changed, 1 deletion(-) diff --git a/rules/sonic-pcied.dep b/rules/sonic-pcied.dep index e70e076c9372..b191d36ec9d5 100644 --- a/rules/sonic-pcied.dep +++ b/rules/sonic-pcied.dep @@ -1,4 +1,3 @@ - SPATH:= $($(SONIC_PCIED)_SRC_PATH) DEP_FILES:= $(SONIC_COMMON_FILES_LIST) rules/sonic-pcied.mk rules/sonic-pcied.dep DEP_FILES+= $(SONIC_COMMON_BASE_FILES_LIST) From 7d2e76f9911513420b62115503bb997d6f1e0862 Mon Sep 17 00:00:00 2001 From: sujkang Date: Mon, 27 Jul 2020 01:30:36 -0700 Subject: [PATCH 5/5] rebase to the latest --- src/sonic-platform-daemons | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-platform-daemons b/src/sonic-platform-daemons index 4f42a798c545..029d5a566da8 160000 --- a/src/sonic-platform-daemons +++ b/src/sonic-platform-daemons @@ -1 +1 @@ -Subproject commit 4f42a798c54564a67014a3c9d115f67975c1c7d9 +Subproject commit 029d5a566da82dc50c39732396a7d373c301755d