From bd519322cbdf12a1c7c72800f556042556d267c5 Mon Sep 17 00:00:00 2001 From: Kebo Liu Date: Thu, 6 Jun 2019 02:19:56 +0800 Subject: [PATCH] [Mellanox] Expose SDK share buffer and unix socket from syncd (#2951) * expose SDK share buffer and unix socket from syncd * fix PR comments * fix community comments and add TODO --- files/build_templates/docker_image_ctl.j2 | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/files/build_templates/docker_image_ctl.j2 b/files/build_templates/docker_image_ctl.j2 index a828dfb4c2..aab3789332 100644 --- a/files/build_templates/docker_image_ctl.j2 +++ b/files/build_templates/docker_image_ctl.j2 @@ -134,6 +134,9 @@ start() { echo "Creating new {{docker_container_name}} container" {%- else %} echo "Creating new {{docker_container_name}} container with HWSKU $HWSKU" +{%- endif %} +{%- if sonic_asic_platform == "mellanox" %} + # TODO: Mellanox will remove the --tmpfs exception after SDK socket path changed in new SDK version {%- endif %} docker create {{docker_image_run_opt}} \ {%- if '--log-driver=json-file' in docker_image_run_opt or '--log-driver' not in docker_image_run_opt %} @@ -146,6 +149,10 @@ start() { -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 \ +{%- else %} + --tmpfs /tmp \ {%- endif %} {%- if docker_container_name == "pmon" %} -v /var/run/hw-management:/var/run/hw-management:rw \ @@ -156,7 +163,9 @@ start() { {%- if docker_container_name != "database" %} -v /usr/share/sonic/device/$PLATFORM/$HWSKU:/usr/share/sonic/hwsku:ro \ {%- endif %} +{%- if sonic_asic_platform != "mellanox" %} --tmpfs /tmp \ +{%- endif %} --tmpfs /var/tmp \ --name={{docker_container_name}} {{docker_image_name}}:latest || { echo "Failed to docker run" >&1