diff --git a/platform/broadcom/docker-syncd-brcm/Dockerfile.j2 b/platform/broadcom/docker-syncd-brcm/Dockerfile.j2 index af6c96c585..2b5fc8c87d 100755 --- a/platform/broadcom/docker-syncd-brcm/Dockerfile.j2 +++ b/platform/broadcom/docker-syncd-brcm/Dockerfile.j2 @@ -1,4 +1,4 @@ -FROM docker-base +FROM docker-config-engine ## Make apt-get non-interactive ENV DEBIAN_FRONTEND=noninteractive @@ -19,7 +19,7 @@ debs/{{ deb }}{{' '}} ## TODO: add kmod into Depends RUN apt-get install -f kmod -COPY ["debs/dsserve", "debs/bcmcmd", "start.sh", "syncd.sh", "/usr/bin/"] +COPY ["debs/dsserve", "debs/bcmcmd", "start.sh", "/usr/bin/"] RUN chmod +x /usr/bin/dsserve /usr/bin/bcmcmd COPY ["supervisord.conf", "/etc/supervisor/conf.d/"] diff --git a/platform/broadcom/docker-syncd-brcm/supervisord.conf b/platform/broadcom/docker-syncd-brcm/supervisord.conf index 80d04a225f..1e015fef93 100644 --- a/platform/broadcom/docker-syncd-brcm/supervisord.conf +++ b/platform/broadcom/docker-syncd-brcm/supervisord.conf @@ -20,7 +20,7 @@ stdout_logfile=syslog stderr_logfile=syslog [program:syncd] -command=/usr/bin/syncd.sh +command=/usr/bin/syncd_start.sh priority=3 autostart=false autorestart=false diff --git a/platform/broadcom/docker-syncd-brcm/syncd.sh b/platform/broadcom/docker-syncd-brcm/syncd.sh deleted file mode 100755 index 993cf100f2..0000000000 --- a/platform/broadcom/docker-syncd-brcm/syncd.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash - -function clean_up { - service syncd stop - exit -} - -trap clean_up SIGTERM SIGKILL - -service syncd start - -read diff --git a/platform/cavium/docker-syncd-cavm/Dockerfile.j2 b/platform/cavium/docker-syncd-cavm/Dockerfile.j2 index dd37db2e04..a35abf576f 100755 --- a/platform/cavium/docker-syncd-cavm/Dockerfile.j2 +++ b/platform/cavium/docker-syncd-cavm/Dockerfile.j2 @@ -1,4 +1,4 @@ -FROM docker-base +FROM docker-config-engine ## Make apt-get non-interactive ENV DEBIAN_FRONTEND=noninteractive @@ -18,7 +18,7 @@ RUN dpkg -i \ debs/{{ deb }}{{' '}} {%- endfor %} -COPY ["start.sh", "syncd.sh", "/usr/bin/"] +COPY ["start.sh", "/usr/bin/"] COPY ["supervisord.conf", "/etc/supervisor/conf.d/"] COPY ["profile.ini", "/etc/ssw/AS7512/"] diff --git a/platform/cavium/docker-syncd-cavm/supervisord.conf b/platform/cavium/docker-syncd-cavm/supervisord.conf index 80d04a225f..1e015fef93 100644 --- a/platform/cavium/docker-syncd-cavm/supervisord.conf +++ b/platform/cavium/docker-syncd-cavm/supervisord.conf @@ -20,7 +20,7 @@ stdout_logfile=syslog stderr_logfile=syslog [program:syncd] -command=/usr/bin/syncd.sh +command=/usr/bin/syncd_start.sh priority=3 autostart=false autorestart=false diff --git a/platform/cavium/docker-syncd-cavm/syncd.sh b/platform/cavium/docker-syncd-cavm/syncd.sh deleted file mode 100755 index 24767dfc6e..0000000000 --- a/platform/cavium/docker-syncd-cavm/syncd.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash - -export XP_ROOT=/usr/bin/ - -while true; do - - # Check if redis-server starts - - result=$(redis-cli ping) - - if [ "$result" == "PONG" ]; then - - redis-cli FLUSHALL - syncd -p /etc/ssw/AS7512/profile.ini -N - break - - fi - - sleep 1 - -done - diff --git a/platform/centec/docker-syncd-centec/Dockerfile.j2 b/platform/centec/docker-syncd-centec/Dockerfile.j2 index 9e0fe52b17..302afbc0cd 100755 --- a/platform/centec/docker-syncd-centec/Dockerfile.j2 +++ b/platform/centec/docker-syncd-centec/Dockerfile.j2 @@ -1,4 +1,4 @@ -FROM docker-base +FROM docker-config-engine ## Make apt-get non-interactive ENV DEBIAN_FRONTEND=noninteractive @@ -19,7 +19,7 @@ debs/{{ deb }}{{' '}} ## TODO: add kmod into Depends RUN apt-get install -f kmod -COPY ["start.sh", "syncd.sh", "/usr/bin/"] +COPY ["start.sh", "/usr/bin/"] COPY ["supervisord.conf", "/etc/supervisor/conf.d/"] ## Clean up diff --git a/platform/centec/docker-syncd-centec/supervisord.conf b/platform/centec/docker-syncd-centec/supervisord.conf index 80d04a225f..1e015fef93 100644 --- a/platform/centec/docker-syncd-centec/supervisord.conf +++ b/platform/centec/docker-syncd-centec/supervisord.conf @@ -20,7 +20,7 @@ stdout_logfile=syslog stderr_logfile=syslog [program:syncd] -command=/usr/bin/syncd.sh +command=/usr/bin/syncd_start.sh priority=3 autostart=false autorestart=false diff --git a/platform/centec/docker-syncd-centec/syncd.sh b/platform/centec/docker-syncd-centec/syncd.sh deleted file mode 100755 index 993cf100f2..0000000000 --- a/platform/centec/docker-syncd-centec/syncd.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash - -function clean_up { - service syncd stop - exit -} - -trap clean_up SIGTERM SIGKILL - -service syncd start - -read diff --git a/platform/mellanox/docker-syncd-mlnx/Dockerfile.j2 b/platform/mellanox/docker-syncd-mlnx/Dockerfile.j2 index 03257ad33e..0736df0441 100755 --- a/platform/mellanox/docker-syncd-mlnx/Dockerfile.j2 +++ b/platform/mellanox/docker-syncd-mlnx/Dockerfile.j2 @@ -1,4 +1,4 @@ -FROM docker-base +FROM docker-config-engine ## Make apt-get non-interactive ENV DEBIAN_FRONTEND=noninteractive @@ -18,7 +18,7 @@ RUN dpkg -i \ debs/{{ deb }}{{' '}} {%- endfor %} -COPY ["start.sh", "syncd.sh", "mlnx-fw-upgrade.sh", "/usr/bin/"] +COPY ["start.sh", "mlnx-fw-upgrade.sh", "/usr/bin/"] COPY ["supervisord.conf", "/etc/supervisor/conf.d/"] COPY ["/debs/fw-SPC.mfa", "/etc/mlnx/"] diff --git a/platform/mellanox/docker-syncd-mlnx/start.sh b/platform/mellanox/docker-syncd-mlnx/start.sh index 96e2a91280..0ad00c6fc2 100755 --- a/platform/mellanox/docker-syncd-mlnx/start.sh +++ b/platform/mellanox/docker-syncd-mlnx/start.sh @@ -4,5 +4,8 @@ rm -f /var/run/rsyslogd.pid supervisorctl start rsyslogd -supervisorctl start syncd +# mlnx-fw-upgrade.sh will exit if firmware was actually upgraded +# or if some error occurs +. mlnx-fw-upgrade.sh +supervisorctl start syncd diff --git a/platform/mellanox/docker-syncd-mlnx/supervisord.conf b/platform/mellanox/docker-syncd-mlnx/supervisord.conf index 80d04a225f..1e015fef93 100644 --- a/platform/mellanox/docker-syncd-mlnx/supervisord.conf +++ b/platform/mellanox/docker-syncd-mlnx/supervisord.conf @@ -20,7 +20,7 @@ stdout_logfile=syslog stderr_logfile=syslog [program:syncd] -command=/usr/bin/syncd.sh +command=/usr/bin/syncd_start.sh priority=3 autostart=false autorestart=false diff --git a/platform/mellanox/docker-syncd-mlnx/syncd.sh b/platform/mellanox/docker-syncd-mlnx/syncd.sh deleted file mode 100755 index ad0e0e47be..0000000000 --- a/platform/mellanox/docker-syncd-mlnx/syncd.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env bash - -function clean_up { - service syncd stop - exit -} - -trap clean_up SIGTERM SIGKILL - -# fw-upgrade will exit if firmware was actually upgraded or if some error -# occures -. mlnx-fw-upgrade.sh - -# FIXME: the script cannot trap SIGTERM signal and it exits without clean_up -# Remove rsyslogd.pid file manually so that to start the rsyslog instantly -service syncd start - -read - diff --git a/src/sonic-sairedis b/src/sonic-sairedis index 9fe1e696c6..31131d7d76 160000 --- a/src/sonic-sairedis +++ b/src/sonic-sairedis @@ -1 +1 @@ -Subproject commit 9fe1e696c6a9b5e99406ff2548c6f52db4e0b604 +Subproject commit 31131d7d76fa68619b90d88528270a0740daa438