From c92751735577346923dcc929ea934fd0d046a9b7 Mon Sep 17 00:00:00 2001 From: Kebo Liu Date: Sat, 15 Jun 2019 08:38:24 +0800 Subject: [PATCH] [Mellanox] Inject SDK libs dependency to pmon on Mellanox platform (#3000) * inject sdk libs to pmon * fix wrong code --- files/build_templates/docker_image_ctl.j2 | 11 ++++------- platform/mellanox/rules.mk | 3 +++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/files/build_templates/docker_image_ctl.j2 b/files/build_templates/docker_image_ctl.j2 index 7dfc5e3c7c..881d562de9 100644 --- a/files/build_templates/docker_image_ctl.j2 +++ b/files/build_templates/docker_image_ctl.j2 @@ -175,19 +175,16 @@ start() { {%- endif %} {%- if sonic_asic_platform == "mellanox" %} {%- if docker_container_name == "syncd" %} - -e SX_SNIFFER_ENABLE \ - -e SX_SNIFFER_TARGET \ - -e PRM_SNIFFER \ - -e PRM_SNIFFER_FILE_PATH \ -v /var/log/mellanox/sniffer:/var/log/mellanox/sniffer:rw \ -v mlnx_sdk_socket:/tmp \ -v /dev/shm:/dev/shm:rw \ +{%- elif docker_container_name == "pmon" %} + -v /var/run/hw-management:/var/run/hw-management:rw \ + -v mlnx_sdk_socket:/tmp \ + -v /dev/shm:/dev/shm:rw \ {%- else %} --tmpfs /tmp \ {%- endif %} -{%- if docker_container_name == "pmon" %} - -v /var/run/hw-management:/var/run/hw-management:rw \ -{%- endif %} {%- endif %} -v /var/run/redis:/var/run/redis:rw \ -v /usr/share/sonic/device/$PLATFORM:/usr/share/sonic/platform:ro \ diff --git a/platform/mellanox/rules.mk b/platform/mellanox/rules.mk index 4d391f44eb..2c302212d2 100644 --- a/platform/mellanox/rules.mk +++ b/platform/mellanox/rules.mk @@ -22,3 +22,6 @@ $(LIBSAIREDIS)_DEPENDS += $(MLNX_SAI) $(LIBSAITHRIFT_DEV) # Runtime dependency on mlnx sai is set only for syncd $(SYNCD)_RDEPENDS += $(MLNX_SAI) + +# Inject mlnx sdk libs to platform monitor +$(DOCKER_PLATFORM_MONITOR)_DEPENDS += $(APPLIBS) $(SX_COMPLIB) $(SXD_LIBS) $(SX_GEN_UTILS) $(PYTHON_SDK_API) $(APPLIBS_DEV) $(SX_COMPLIB_DEV) $(SXD_LIBS_DEV) $(SX_GEN_UTILS_DEV)