From e6bb4b20a196f22a7e266f3e2de61df442ff09f4 Mon Sep 17 00:00:00 2001 From: Shuotian Cheng Date: Fri, 26 May 2017 17:56:29 -0700 Subject: [PATCH] [swss]: Update submodules and mount /var/log to swss docker (#636) - [swss]: Update sairedis/swss/common submodules - [orchagent]: Mount /var/log folder and use the folder to save recording files - [orchagent]: Use -d to specify the folder path --- dockers/docker-orchagent/orchagent.sh | 4 +++- platform/broadcom/docker-orchagent-brcm.mk | 3 ++- platform/cavium/docker-orchagent-cavm.mk | 3 ++- platform/centec/docker-orchagent-centec.mk | 3 ++- platform/mellanox/docker-orchagent-mlnx.mk | 3 ++- src/sonic-sairedis | 2 +- src/sonic-swss | 2 +- src/sonic-swss-common | 2 +- 8 files changed, 14 insertions(+), 8 deletions(-) diff --git a/dockers/docker-orchagent/orchagent.sh b/dockers/docker-orchagent/orchagent.sh index ff7a4ccf7c..01959dd66a 100755 --- a/dockers/docker-orchagent/orchagent.sh +++ b/dockers/docker-orchagent/orchagent.sh @@ -4,7 +4,9 @@ HWSKU=`sonic-cfggen -m /etc/sonic/minigraph.xml -v minigraph_hwsku` MAC_ADDRESS=`ip link show eth0 | grep ether | awk '{print $2}'` -ORCHAGENT_ARGS="" +# Create a folder for SsWW record files +mkdir -p /var/log/swss +ORCHAGENT_ARGS="-d /var/log/swss " if [ "$HWSKU" == "Force10-S6000" ]; then ORCHAGENT_ARGS+="-m $MAC_ADDRESS" diff --git a/platform/broadcom/docker-orchagent-brcm.mk b/platform/broadcom/docker-orchagent-brcm.mk index 777f052042..70e087e73f 100644 --- a/platform/broadcom/docker-orchagent-brcm.mk +++ b/platform/broadcom/docker-orchagent-brcm.mk @@ -11,7 +11,8 @@ $(DOCKER_ORCHAGENT_BRCM)_CONTAINER_NAME = swss $(DOCKER_ORCHAGENT_BRCM)_RUN_OPT += --net=host --privileged -t $(DOCKER_ORCHAGENT_BRCM)_RUN_OPT += -v /etc/network/interfaces:/etc/network/interfaces:ro $(DOCKER_ORCHAGENT_BRCM)_RUN_OPT += -v /etc/network/interfaces.d/:/etc/network/interfaces.d/:ro -$(DOCKER_ORCHAGENT_BRCM)_RUN_OPT += -v /host/machine.conf:/host/machine.conf +$(DOCKER_ORCHAGENT_BRCM)_RUN_OPT += -v /host/machine.conf:/host/machine.conf:ro $(DOCKER_ORCHAGENT_BRCM)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro +$(DOCKER_ORCHAGENT_BRCM)_RUN_OPT += -v /var/log:/var/log:rw $(DOCKER_ORCHAGENT_BRCM)_BASE_IMAGE_FILES += swssloglevel:/usr/bin/swssloglevel diff --git a/platform/cavium/docker-orchagent-cavm.mk b/platform/cavium/docker-orchagent-cavm.mk index 1d58e41edf..702c661a76 100644 --- a/platform/cavium/docker-orchagent-cavm.mk +++ b/platform/cavium/docker-orchagent-cavm.mk @@ -11,7 +11,8 @@ $(DOCKER_ORCHAGENT_CAVM)_CONTAINER_NAME = swss $(DOCKER_ORCHAGENT_CAVM)_RUN_OPT += --net=host --privileged -t $(DOCKER_ORCHAGENT_CAVM)_RUN_OPT += -v /etc/network/interfaces:/etc/network/interfaces:ro $(DOCKER_ORCHAGENT_CAVM)_RUN_OPT += -v /etc/network/interfaces.d/:/etc/network/interfaces.d/:ro -$(DOCKER_ORCHAGENT_CAVM)_RUN_OPT += -v /host/machine.conf:/host/machine.conf +$(DOCKER_ORCHAGENT_CAVM)_RUN_OPT += -v /host/machine.conf:/host/machine.conf:ro $(DOCKER_ORCHAGENT_CAVM)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro +$(DOCKER_ORCHAGENT_CAVM)_RUN_OPT += -v /var/log:/var/log:rw $(DOCKER_ORCHAGENT_CAVM)_BASE_IMAGE_FILES += swssloglevel:/usr/bin/swssloglevel diff --git a/platform/centec/docker-orchagent-centec.mk b/platform/centec/docker-orchagent-centec.mk index 529778466b..3aff56c0b3 100644 --- a/platform/centec/docker-orchagent-centec.mk +++ b/platform/centec/docker-orchagent-centec.mk @@ -11,7 +11,8 @@ $(DOCKER_ORCHAGENT_CENTEC)_CONTAINER_NAME = swss $(DOCKER_ORCHAGENT_CENTEC)_RUN_OPT += --net=host --privileged -t $(DOCKER_ORCHAGENT_CENTEC)_RUN_OPT += -v /etc/network/interfaces:/etc/network/interfaces:ro $(DOCKER_ORCHAGENT_CENTEC)_RUN_OPT += -v /etc/network/interfaces.d/:/etc/network/interfaces.d/:ro -$(DOCKER_ORCHAGENT_CENTEC)_RUN_OPT += -v /host/machine.conf:/host/machine.conf +$(DOCKER_ORCHAGENT_CENTEC)_RUN_OPT += -v /host/machine.conf:/host/machine.conf:ro $(DOCKER_ORCHAGENT_CENTEC)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro +$(DOCKER_ORCHAGENT_CENTEC)_RUN_OPT += -v /var/log:/var/log:rw $(DOCKER_ORCHAGENT_CENTEC)_BASE_IMAGE_FILES += swssloglevel:/usr/bin/swssloglevel diff --git a/platform/mellanox/docker-orchagent-mlnx.mk b/platform/mellanox/docker-orchagent-mlnx.mk index d56a1edf0d..0e4005e436 100644 --- a/platform/mellanox/docker-orchagent-mlnx.mk +++ b/platform/mellanox/docker-orchagent-mlnx.mk @@ -11,7 +11,8 @@ $(DOCKER_ORCHAGENT_MLNX)_CONTAINER_NAME = swss $(DOCKER_ORCHAGENT_MLNX)_RUN_OPT += --net=host --privileged -t $(DOCKER_ORCHAGENT_MLNX)_RUN_OPT += -v /etc/network/interfaces:/etc/network/interfaces:ro $(DOCKER_ORCHAGENT_MLNX)_RUN_OPT += -v /etc/network/interfaces.d/:/etc/network/interfaces.d/:ro -$(DOCKER_ORCHAGENT_MLNX)_RUN_OPT += -v /host/machine.conf:/host/machine.conf +$(DOCKER_ORCHAGENT_MLNX)_RUN_OPT += -v /host/machine.conf:/host/machine.conf:ro $(DOCKER_ORCHAGENT_MLNX)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro +$(DOCKER_ORCHAGENT_MLNX)_RUN_OPT += -v /var/log:/var/log:rw $(DOCKER_ORCHAGENT_MLNX)_BASE_IMAGE_FILES += swssloglevel:/usr/bin/swssloglevel diff --git a/src/sonic-sairedis b/src/sonic-sairedis index 31131d7d76..7acacf385e 160000 --- a/src/sonic-sairedis +++ b/src/sonic-sairedis @@ -1 +1 @@ -Subproject commit 31131d7d76fa68619b90d88528270a0740daa438 +Subproject commit 7acacf385e30e8525b0816f76963a6a36cb0b27d diff --git a/src/sonic-swss b/src/sonic-swss index 1210c45724..0342846760 160000 --- a/src/sonic-swss +++ b/src/sonic-swss @@ -1 +1 @@ -Subproject commit 1210c45724f184152525f3ff5bc983ad4c3c9939 +Subproject commit 03428467606eab9d577bde29316ba98357e7a032 diff --git a/src/sonic-swss-common b/src/sonic-swss-common index 447c9a254b..8bb0c9b8b7 160000 --- a/src/sonic-swss-common +++ b/src/sonic-swss-common @@ -1 +1 @@ -Subproject commit 447c9a254be7254b7f62987a1d2d5341f27b2ba0 +Subproject commit 8bb0c9b8b71bffc2f323e6f25504d38ef3a9d9d8