Skip to content

Commit

Permalink
Revert "[201803] Restart SwSS, syncd and dependent services if a crit…
Browse files Browse the repository at this point in the history
…ical process in syncd container exits (#2615)"

This reverts commit 9e8518c.
  • Loading branch information
lguohan committed Apr 6, 2019
1 parent 3a24c61 commit 968a0df
Show file tree
Hide file tree
Showing 33 changed files with 11 additions and 143 deletions.
3 changes: 0 additions & 3 deletions files/build_templates/sonic_debian_extension.j2
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,6 @@ sudo cp $IMAGE_CONFIGS/hostname/hostname-config.service $FILESYSTEM_ROOT/etc/sy
sudo LANG=C chroot $FILESYSTEM_ROOT systemctl enable hostname-config.service
sudo cp $IMAGE_CONFIGS/hostname/hostname-config.sh $FILESYSTEM_ROOT/usr/bin/

# Copy miscellaneous scripts
sudo cp $IMAGE_CONFIGS/misc/docker-wait-any $FILESYSTEM_ROOT/usr/bin/

# Copy updategraph script and service file
j2 files/build_templates/updategraph.service.j2 | sudo tee $FILESYSTEM_ROOT/etc/systemd/system/updategraph.service
sudo LANG=C chroot $FILESYSTEM_ROOT systemctl enable updategraph.service
Expand Down
2 changes: 1 addition & 1 deletion files/build_templates/swss.service.j2
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ ExecStartPre=/etc/init.d/xpnet.sh start

ExecStartPre=/usr/bin/{{docker_container_name}}.sh start
ExecStartPre=/usr/bin/syncd.sh start
ExecStart=/bin/bash -c "sleep 5; /usr/bin/docker-wait-any {{docker_container_name}} syncd"
ExecStart=/usr/bin/{{docker_container_name}}.sh attach

ExecStop=/usr/bin/{{docker_container_name}}.sh stop
ExecStopPost=/usr/bin/syncd.sh stop
Expand Down
65 changes: 0 additions & 65 deletions files/image_config/misc/docker-wait-any

This file was deleted.

2 changes: 1 addition & 1 deletion platform/broadcom/docker-syncd-brcm-rpc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
DOCKER_SYNCD_BRCM_RPC = docker-syncd-brcm-rpc.gz
$(DOCKER_SYNCD_BRCM_RPC)_PATH = $(PLATFORM_PATH)/docker-syncd-brcm-rpc
$(DOCKER_SYNCD_BRCM_RPC)_DEPENDS += $(SYNCD_RPC) $(LIBTHRIFT)
$(DOCKER_SYNCD_BRCM_RPC)_FILES += $(DSSERVE) $(BCMCMD) $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT)
$(DOCKER_SYNCD_BRCM_RPC)_FILES += $(DSSERVE) $(BCMCMD)
$(DOCKER_SYNCD_BRCM_RPC)_LOAD_DOCKERS += $(DOCKER_SYNCD_BRCM)
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_BRCM_RPC)
ifeq ($(ENABLE_SYNCD_RPC),y)
Expand Down
2 changes: 1 addition & 1 deletion platform/broadcom/docker-syncd-brcm.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
DOCKER_SYNCD_BRCM = docker-syncd-brcm.gz
$(DOCKER_SYNCD_BRCM)_PATH = $(PLATFORM_PATH)/docker-syncd-brcm
$(DOCKER_SYNCD_BRCM)_DEPENDS += $(SYNCD)
$(DOCKER_SYNCD_BRCM)_FILES += $(DSSERVE) $(BCMCMD) $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT)
$(DOCKER_SYNCD_BRCM)_FILES += $(DSSERVE) $(BCMCMD)
$(DOCKER_SYNCD_BRCM)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE)
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_BRCM)
ifneq ($(ENABLE_SYNCD_RPC),y)
Expand Down
2 changes: 0 additions & 2 deletions platform/broadcom/docker-syncd-brcm/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ COPY ["files/dsserve", "files/bcmcmd", "start.sh", "/usr/bin/"]
RUN chmod +x /usr/bin/dsserve /usr/bin/bcmcmd

COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
COPY ["files/supervisor-proc-exit-listener", "/usr/bin"]
COPY ["critical_processes", "/etc/supervisor/"]

## Clean up
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
Expand Down
2 changes: 0 additions & 2 deletions platform/broadcom/docker-syncd-brcm/critical_processes

This file was deleted.

8 changes: 1 addition & 7 deletions platform/broadcom/docker-syncd-brcm/supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@ logfile_maxbytes=1MB
logfile_backups=2
nodaemon=true

[eventlistener:supervisor-proc-exit-listener]
command=/usr/bin/supervisor-proc-exit-listener
events=PROCESS_STATE_EXITED
autostart=true
autorestart=unexpected

[program:start.sh]
command=/usr/bin/start.sh
priority=1
Expand All @@ -21,7 +15,7 @@ stderr_logfile=syslog
command=/usr/sbin/rsyslogd -n
priority=2
autostart=false
autorestart=unexpected
autorestart=false
stdout_logfile=syslog
stderr_logfile=syslog

Expand Down
1 change: 0 additions & 1 deletion platform/cavium/docker-syncd-cavm-rpc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
DOCKER_SYNCD_CAVM_RPC = docker-syncd-cavm-rpc.gz
$(DOCKER_SYNCD_CAVM_RPC)_PATH = $(PLATFORM_PATH)/docker-syncd-cavm-rpc
$(DOCKER_SYNCD_CAVM_RPC)_DEPENDS += $(SYNCD_RPC) $(LIBTHRIFT) $(CAVM_LIBSAI) $(XP_TOOLS) $(REDIS_TOOLS)
$(DOCKER_SYNCD_CAVM_RPC)_FILES += $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT)
$(DOCKER_SYNCD_CAVM_RPC)_LOAD_DOCKERS += $(DOCKER_SYNCD_CAVM)
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_CAVM_RPC)
ifeq ($(ENABLE_SYNCD_RPC),y)
Expand Down
1 change: 0 additions & 1 deletion platform/cavium/docker-syncd-cavm.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
DOCKER_SYNCD_CAVM = docker-syncd-cavm.gz
$(DOCKER_SYNCD_CAVM)_PATH = $(PLATFORM_PATH)/docker-syncd-cavm
$(DOCKER_SYNCD_CAVM)_DEPENDS += $(SYNCD) $(CAVM_LIBSAI) $(XP_TOOLS) $(REDIS_TOOLS)
$(DOCKER_SYNCD_CAVM)_FILES += $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT)
$(DOCKER_SYNCD_CAVM)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE)
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_CAVM)
ifneq ($(ENABLE_SYNCD_RPC),y)
Expand Down
2 changes: 0 additions & 2 deletions platform/cavium/docker-syncd-cavm/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ debs/{{ deb }}{{' '}}

COPY ["start.sh", "/usr/bin/"]
COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
COPY ["files/supervisor-proc-exit-listener", "/usr/bin"]
COPY ["critical_processes", "/etc/supervisor/"]

COPY ["profile.ini", "/etc/ssw/AS7512/"]

Expand Down
1 change: 0 additions & 1 deletion platform/cavium/docker-syncd-cavm/critical_processes

This file was deleted.

8 changes: 1 addition & 7 deletions platform/cavium/docker-syncd-cavm/supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@ logfile_maxbytes=1MB
logfile_backups=2
nodaemon=true

[eventlistener:supervisor-proc-exit-listener]
command=/usr/bin/supervisor-proc-exit-listener
events=PROCESS_STATE_EXITED
autostart=true
autorestart=unexpected

[program:start.sh]
command=/usr/bin/start.sh
priority=1
Expand All @@ -21,7 +15,7 @@ stderr_logfile=syslog
command=/usr/sbin/rsyslogd -n
priority=2
autostart=false
autorestart=unexpected
autorestart=false
stdout_logfile=syslog
stderr_logfile=syslog

Expand Down
1 change: 0 additions & 1 deletion platform/centec/docker-syncd-centec-rpc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
DOCKER_SYNCD_CENTEC_RPC = docker-syncd-centec-rpc.gz
$(DOCKER_SYNCD_CENTEC_RPC)_PATH = $(PLATFORM_PATH)/docker-syncd-centec-rpc
$(DOCKER_SYNCD_CENTEC_RPC)_DEPENDS += $(SYNCD_RPC) $(LIBTHRIFT)
$(DOCKER_SYNCD_CENTEC_RPC)_FILES += $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT)
$(DOCKER_SYNCD_CENTEC_RPC)_LOAD_DOCKERS += $(DOCKER_SYNCD_CENTEC)
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_CENTEC_RPC)
ifeq ($(ENABLE_SYNCD_RPC),y)
Expand Down
1 change: 0 additions & 1 deletion platform/centec/docker-syncd-centec.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
DOCKER_SYNCD_CENTEC = docker-syncd-centec.gz
$(DOCKER_SYNCD_CENTEC)_PATH = $(PLATFORM_PATH)/docker-syncd-centec
$(DOCKER_SYNCD_CENTEC)_DEPENDS += $(SYNCD)
$(DOCKER_SYNCD_CENTEC)_FILES += $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT)
$(DOCKER_SYNCD_CENTEC)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE)
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_CENTEC)
ifneq ($(ENABLE_SYNCD_RPC),y)
Expand Down
2 changes: 0 additions & 2 deletions platform/centec/docker-syncd-centec/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ RUN apt-get install -f kmod

COPY ["start.sh", "/usr/bin/"]
COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
COPY ["files/supervisor-proc-exit-listener", "/usr/bin"]
COPY ["critical_processes", "/etc/supervisor/"]

## Clean up
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
Expand Down
1 change: 0 additions & 1 deletion platform/centec/docker-syncd-centec/critical_processes

This file was deleted.

8 changes: 1 addition & 7 deletions platform/centec/docker-syncd-centec/supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@ logfile_maxbytes=1MB
logfile_backups=2
nodaemon=true

[eventlistener:supervisor-proc-exit-listener]
command=/usr/bin/supervisor-proc-exit-listener
events=PROCESS_STATE_EXITED
autostart=true
autorestart=unexpected

[program:start.sh]
command=/usr/bin/start.sh
priority=1
Expand All @@ -21,7 +15,7 @@ stderr_logfile=syslog
command=/usr/sbin/rsyslogd -n
priority=2
autostart=false
autorestart=unexpected
autorestart=false
stdout_logfile=syslog
stderr_logfile=syslog

Expand Down
1 change: 0 additions & 1 deletion platform/marvell/docker-syncd-mrvl-rpc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
DOCKER_SYNCD_MRVL_RPC = docker-syncd-mrvl-rpc.gz
$(DOCKER_SYNCD_MRVL_RPC)_PATH = $(PLATFORM_PATH)/docker-syncd-mrvl-rpc
$(DOCKER_SYNCD_MRVL_RPC)_DEPENDS += $(SYNCD_RPC) $(LIBTHRIFT)
$(DOCKER_SYNCD_MRVL_RPC)_FILES += $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT)
$(DOCKER_SYNCD_MRVL_RPC)_LOAD_DOCKERS += $(DOCKER_SYNCD_MRVL)
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_MRVL_RPC)
ifeq ($(ENABLE_SYNCD_RPC),y)
Expand Down
1 change: 0 additions & 1 deletion platform/marvell/docker-syncd-mrvl.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
DOCKER_SYNCD_MRVL = docker-syncd-mrvl.gz
$(DOCKER_SYNCD_MRVL)_PATH = $(PLATFORM_PATH)/docker-syncd-mrvl
$(DOCKER_SYNCD_MRVL)_DEPENDS += $(SYNCD) $(MRVL_FPA) $(REDIS_TOOLS)
$(DOCKER_SYNCD_MRVL)_FILES += $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT)
$(DOCKER_SYNCD_MRVL)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE)
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_MRVL)
ifneq ($(ENABLE_SYNCD_RPC),y)
Expand Down
2 changes: 0 additions & 2 deletions platform/marvell/docker-syncd-mrvl/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ debs/{{ deb }}{{' '}}

COPY ["start.sh", "syncd.sh", "/usr/bin/"]
COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
COPY ["files/supervisor-proc-exit-listener", "/usr/bin"]
COPY ["critical_processes", "/etc/supervisor/"]

## Clean up
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
Expand Down
1 change: 0 additions & 1 deletion platform/marvell/docker-syncd-mrvl/critical_processes

This file was deleted.

8 changes: 1 addition & 7 deletions platform/marvell/docker-syncd-mrvl/supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@ logfile_maxbytes=1MB
logfile_backups=2
nodaemon=true

[eventlistener:supervisor-proc-exit-listener]
command=/usr/bin/supervisor-proc-exit-listener
events=PROCESS_STATE_EXITED
autostart=true
autorestart=unexpected

[program:start.sh]
command=/usr/bin/start.sh
priority=1
Expand All @@ -21,7 +15,7 @@ stderr_logfile=syslog
command=/usr/sbin/rsyslogd -n
priority=2
autostart=false
autorestart=unexpected
autorestart=false
stdout_logfile=syslog
stderr_logfile=syslog

Expand Down
1 change: 0 additions & 1 deletion platform/mellanox/docker-syncd-mlnx-rpc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
DOCKER_SYNCD_MLNX_RPC = docker-syncd-mlnx-rpc.gz
$(DOCKER_SYNCD_MLNX_RPC)_PATH = $(PLATFORM_PATH)/docker-syncd-mlnx-rpc
$(DOCKER_SYNCD_MLNX_RPC)_DEPENDS += $(SYNCD_RPC) $(LIBTHRIFT)
$(DOCKER_SYNCD_MLNX_RPC)_FILES += $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT)
$(DOCKER_SYNCD_MLNX_RPC)_LOAD_DOCKERS += $(DOCKER_SYNCD_MLNX)
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_MLNX_RPC)
ifeq ($(ENABLE_SYNCD_RPC),y)
Expand Down
1 change: 0 additions & 1 deletion platform/mellanox/docker-syncd-mlnx.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
DOCKER_SYNCD_MLNX = docker-syncd-mlnx.gz
$(DOCKER_SYNCD_MLNX)_PATH = $(PLATFORM_PATH)/docker-syncd-mlnx
$(DOCKER_SYNCD_MLNX)_DEPENDS += $(SYNCD) $(PYTHON_SDK_API)
$(DOCKER_SYNCD_MLNX)_FILES += $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT)
$(DOCKER_SYNCD_MLNX)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE)
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_MLNX)
ifneq ($(ENABLE_SYNCD_RPC),y)
Expand Down
2 changes: 0 additions & 2 deletions platform/mellanox/docker-syncd-mlnx/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ debs/{{ deb }}{{' '}}

COPY ["start.sh", "/usr/bin/"]
COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
COPY ["files/supervisor-proc-exit-listener", "/usr/bin"]
COPY ["critical_processes", "/etc/supervisor/"]

## Clean up
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
Expand Down
1 change: 0 additions & 1 deletion platform/mellanox/docker-syncd-mlnx/critical_processes

This file was deleted.

8 changes: 1 addition & 7 deletions platform/mellanox/docker-syncd-mlnx/supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@ logfile_maxbytes=1MB
logfile_backups=2
nodaemon=true

[eventlistener:supervisor-proc-exit-listener]
command=/usr/bin/supervisor-proc-exit-listener
events=PROCESS_STATE_EXITED
autostart=true
autorestart=unexpected

[program:start.sh]
command=/usr/bin/start.sh
priority=1
Expand All @@ -21,7 +15,7 @@ stderr_logfile=syslog
command=/usr/sbin/rsyslogd -n
priority=2
autostart=false
autorestart=unexpected
autorestart=false
stdout_logfile=syslog
stderr_logfile=syslog

Expand Down
2 changes: 1 addition & 1 deletion platform/nephos/docker-syncd-nephos-rpc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
DOCKER_SYNCD_NEPHOS_RPC = docker-syncd-nephos-rpc.gz
$(DOCKER_SYNCD_NEPHOS_RPC)_PATH = $(PLATFORM_PATH)/docker-syncd-nephos-rpc
$(DOCKER_SYNCD_NEPHOS_RPC)_DEPENDS += $(SYNCD_RPC) $(LIBTHRIFT)
$(DOCKER_SYNCD_NEPHOS_RPC)_FILES += $(DSSERVE) $(NPX_DIAG) $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT)
$(DOCKER_SYNCD_NEPHOS_RPC)_FILES += $(DSSERVE) $(NPX_DIAG)
$(DOCKER_SYNCD_NEPHOS_RPC)_LOAD_DOCKERS += $(DOCKER_SYNCD_NEPHOS)
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_NEPHOS_RPC)
ifeq ($(ENABLE_SYNCD_RPC),y)
Expand Down
2 changes: 1 addition & 1 deletion platform/nephos/docker-syncd-nephos.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
DOCKER_SYNCD_NEPHOS = docker-syncd-nephos.gz
$(DOCKER_SYNCD_NEPHOS)_PATH = $(PLATFORM_PATH)/docker-syncd-nephos
$(DOCKER_SYNCD_NEPHOS)_DEPENDS += $(SYNCD)
$(DOCKER_SYNCD_NEPHOS)_FILES += $(DSSERVE) $(NPX_DIAG) $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT)
$(DOCKER_SYNCD_NEPHOS)_FILES += $(DSSERVE) $(NPX_DIAG)
$(DOCKER_SYNCD_NEPHOS)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE)
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_NEPHOS)
ifneq ($(ENABLE_SYNCD_RPC),y)
Expand Down
2 changes: 0 additions & 2 deletions platform/nephos/docker-syncd-nephos/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ COPY ["files/dsserve", "files/npx_diag", "start.sh", "/usr/bin/"]
RUN chmod +x /usr/bin/dsserve /usr/bin/npx_diag

COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
COPY ["files/supervisor-proc-exit-listener", "/usr/bin"]
COPY ["critical_processes", "/etc/supervisor/"]

## Clean up
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
Expand Down
2 changes: 0 additions & 2 deletions platform/nephos/docker-syncd-nephos/critical_processes

This file was deleted.

8 changes: 1 addition & 7 deletions platform/nephos/docker-syncd-nephos/supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@ logfile_maxbytes=1MB
logfile_backups=2
nodaemon=true

[eventlistener:supervisor-proc-exit-listener]
command=/usr/bin/supervisor-proc-exit-listener
events=PROCESS_STATE_EXITED
autostart=true
autorestart=unexpected

[program:start.sh]
command=/usr/bin/start.sh
priority=1
Expand All @@ -21,7 +15,7 @@ stderr_logfile=syslog
command=/usr/sbin/rsyslogd -n
priority=2
autostart=false
autorestart=unexpected
autorestart=false
stdout_logfile=syslog
stderr_logfile=syslog

Expand Down

0 comments on commit 968a0df

Please sign in to comment.