Skip to content

Commit

Permalink
[supervisord]: use abspath as supervisord entrypoint (#5995)
Browse files Browse the repository at this point in the history
use abspath makes the entrypoint not affected by PATH env.

Signed-off-by: Guohan Lu <[email protected]>
  • Loading branch information
lguohan authored Nov 23, 2020
1 parent e0781f4 commit 4d3eb18
Show file tree
Hide file tree
Showing 47 changed files with 49 additions and 49 deletions.
2 changes: 1 addition & 1 deletion dockers/docker-basic_router/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ RUN mv /deps/basic_router /usr/sbin/basic_router
COPY ["start.sh", "/usr/bin/"]
COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]

ENTRYPOINT ["supervisord"]
ENTRYPOINT ["/usr/local/bin/supervisord"]
4 changes: 2 additions & 2 deletions dockers/docker-database/docker-database-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ if [[ $DATABASE_TYPE == "chassisdb" ]]; then
# generate all redis server supervisord configuration file
sonic-cfggen -j $db_cfg_file_tmp -t /usr/share/sonic/templates/supervisord.conf.j2 > /etc/supervisor/conf.d/supervisord.conf
rm $db_cfg_file_tmp
exec supervisord
exec /usr/local/bin/supervisord
exit 0
fi

Expand All @@ -79,4 +79,4 @@ else
fi
rm $db_cfg_file_tmp

exec supervisord
exec /usr/local/bin/supervisord
4 changes: 2 additions & 2 deletions dockers/docker-dhcp-relay/docker_init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ sonic-cfggen $CFGGEN_PARAMS
chmod +x /usr/bin/wait_for_intf.sh

# The docker container should start this script as PID 1, so now that supervisord is
# properly configured, we exec supervisord so that it runs as PID 1 for the
# properly configured, we exec /usr/local/bin/supervisord so that it runs as PID 1 for the
# duration of the container's lifetime
exec supervisord
exec /usr/local/bin/supervisord
2 changes: 1 addition & 1 deletion dockers/docker-fpm-frr/docker_init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@ chmod 0755 /usr/sbin/bgp-unisolate
mkdir -p /var/sonic
echo "# Config files managed by sonic-config-engine" > /var/sonic/config_status

exec supervisord
exec /usr/local/bin/supervisord
2 changes: 1 addition & 1 deletion dockers/docker-fpm-gobgp/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ COPY ["daemons", "/etc/quagga/"]
COPY ["files/supervisor-proc-exit-listener", "/usr/bin"]
COPY ["critical_processes", "/etc/supervisor"]

ENTRYPOINT ["supervisord"]
ENTRYPOINT ["/usr/local/bin/supervisord"]
2 changes: 1 addition & 1 deletion dockers/docker-fpm-quagga/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ COPY ["*.j2", "/usr/share/sonic/templates/"]
COPY ["files/supervisor-proc-exit-listener", "/usr/bin"]
COPY ["critical_processes", "/etc/supervisor"]

ENTRYPOINT ["supervisord"]
ENTRYPOINT ["/usr/local/bin/supervisord"]
2 changes: 1 addition & 1 deletion dockers/docker-iccpd/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ RUN apt-get clean -y && \
apt-get autoremove -y && \
rm -rf /debs

ENTRYPOINT ["supervisord"]
ENTRYPOINT ["/usr/local/bin/supervisord"]
2 changes: 1 addition & 1 deletion dockers/docker-lldp/docker-lldp-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
#Generate supervisord.conf based on device metadata
mkdir -p /etc/supervisor/conf.d/
sonic-cfggen -d -t /usr/share/sonic/templates/supervisord.conf.j2 > /etc/supervisor/conf.d/supervisord.conf
exec supervisord
exec /usr/local/bin/supervisord
2 changes: 1 addition & 1 deletion dockers/docker-nat/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ COPY ["critical_processes", "/etc/supervisor"]
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
RUN rm -rf /debs

ENTRYPOINT ["supervisord"]
ENTRYPOINT ["/usr/local/bin/supervisord"]
2 changes: 1 addition & 1 deletion dockers/docker-orchagent/docker-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ if [ "$VLAN" != "" ]; then
cp /usr/share/sonic/templates/ndppd.conf /etc/supervisor/conf.d/
fi

exec supervisord
exec /usr/local/bin/supervisord
2 changes: 1 addition & 1 deletion dockers/docker-platform-monitor/docker_init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ if [ $HAVE_FANCONTROL_CONF -eq 1 ]; then
/bin/cp -f $FANCONTROL_CONF_FILE /etc/
fi

exec supervisord
exec /usr/local/bin/supervisord
2 changes: 1 addition & 1 deletion dockers/docker-router-advertiser/docker-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ sonic-cfggen $CFGGEN_PARAMS

chmod +x /usr/bin/wait_for_link.sh

exec supervisord
exec /usr/local/bin/supervisord
2 changes: 1 addition & 1 deletion dockers/docker-sflow/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ COPY ["files/supervisor-proc-exit-listener", "/usr/bin"]
COPY ["critical_processes", "/etc/supervisor"]
COPY ["port_index_mapper.py", "/usr/bin"]

ENTRYPOINT ["supervisord"]
ENTRYPOINT ["/usr/local/bin/supervisord"]
2 changes: 1 addition & 1 deletion dockers/docker-snmp/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,4 @@ COPY ["critical_processes", "/etc/supervisor"]
# Although exposing ports is not needed for host net mode, keep it for possible bridge mode
EXPOSE 161/udp 162/udp

ENTRYPOINT ["supervisord"]
ENTRYPOINT ["/usr/local/bin/supervisord"]
2 changes: 1 addition & 1 deletion dockers/docker-sonic-mgmt-framework/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ RUN apt-get remove -y g++ python-dev
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
RUN rm -rf /debs

ENTRYPOINT ["supervisord"]
ENTRYPOINT ["/usr/local/bin/supervisord"]
2 changes: 1 addition & 1 deletion dockers/docker-sonic-restapi/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
COPY ["files/supervisor-proc-exit-listener", "/usr/bin"]
COPY ["critical_processes", "/etc/supervisor"]

ENTRYPOINT ["supervisord"]
ENTRYPOINT ["/usr/local/bin/supervisord"]
2 changes: 1 addition & 1 deletion dockers/docker-sonic-telemetry/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
COPY ["files/supervisor-proc-exit-listener", "/usr/bin"]
COPY ["critical_processes", "/etc/supervisor"]

ENTRYPOINT ["supervisord"]
ENTRYPOINT ["/usr/local/bin/supervisord"]
2 changes: 1 addition & 1 deletion dockers/docker-teamd/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
COPY ["files/supervisor-proc-exit-listener", "/usr/bin"]
COPY ["critical_processes", "/etc/supervisor"]

ENTRYPOINT ["supervisord"]
ENTRYPOINT ["/usr/local/bin/supervisord"]
2 changes: 1 addition & 1 deletion platform/barefoot/docker-saiserver-bfn/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ COPY ["profile.ini", "portmap.ini", "/etc/sai/"]
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
RUN rm -rf /deps

ENTRYPOINT ["supervisord"]
ENTRYPOINT ["/usr/local/bin/supervisord"]
2 changes: 1 addition & 1 deletion platform/barefoot/docker-syncd-bfn-rpc/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ RUN apt-get update \

COPY ["ptf_nn_agent.conf", "/etc/supervisor/conf.d/"]

ENTRYPOINT ["supervisord"]
ENTRYPOINT ["/usr/local/bin/supervisord"]
2 changes: 1 addition & 1 deletion platform/barefoot/docker-syncd-bfn/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ COPY ["critical_processes", "/etc/supervisor/"]
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
RUN rm -rf /debs

ENTRYPOINT ["supervisord"]
ENTRYPOINT ["/usr/local/bin/supervisord"]
2 changes: 1 addition & 1 deletion platform/broadcom/docker-saiserver-brcm/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
RUN rm -rf /debs

ENTRYPOINT ["supervisord"]
ENTRYPOINT ["/usr/local/bin/supervisord"]
2 changes: 1 addition & 1 deletion platform/broadcom/docker-syncd-brcm-rpc/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ RUN apt-get update \

COPY ["ptf_nn_agent.conf", "/etc/supervisor/conf.d/"]

ENTRYPOINT ["supervisord"]
ENTRYPOINT ["/usr/local/bin/supervisord"]
2 changes: 1 addition & 1 deletion platform/broadcom/docker-syncd-brcm/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ COPY ["critical_processes", "/etc/supervisor/"]
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
RUN rm -rf /debs

ENTRYPOINT ["supervisord"]
ENTRYPOINT ["/usr/local/bin/supervisord"]
2 changes: 1 addition & 1 deletion platform/cavium/docker-saiserver-cavm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ COPY ["portmap.ini", "profile.ini", "/etc/sai/"]
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
RUN rm -rf deps

ENTRYPOINT ["supervisord"]
ENTRYPOINT ["/usr/local/bin/supervisord"]
2 changes: 1 addition & 1 deletion platform/cavium/docker-syncd-cavm-rpc/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ RUN apt-get update \

COPY ["ptf_nn_agent.conf", "/etc/supervisor/conf.d/"]

ENTRYPOINT ["supervisord"]
ENTRYPOINT ["/usr/local/bin/supervisord"]
2 changes: 1 addition & 1 deletion platform/cavium/docker-syncd-cavm/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ COPY ["profile.ini", "/etc/ssw/AS7512/"]
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
RUN rm -rf /debs

ENTRYPOINT ["supervisord"]
ENTRYPOINT ["/usr/local/bin/supervisord"]
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ RUN apt-get update \

COPY ["ptf_nn_agent.conf", "/etc/supervisor/conf.d/"]

ENTRYPOINT ["supervisord"]
ENTRYPOINT ["/usr/local/bin/supervisord"]
2 changes: 1 addition & 1 deletion platform/centec-arm64/docker-syncd-centec/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ COPY ["critical_processes", "/etc/supervisor/"]
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
RUN rm -rf /debs

ENTRYPOINT ["supervisord"]
ENTRYPOINT ["/usr/local/bin/supervisord"]
2 changes: 1 addition & 1 deletion platform/centec/docker-syncd-centec-rpc/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ RUN apt-get update \

COPY ["ptf_nn_agent.conf", "/etc/supervisor/conf.d/"]

ENTRYPOINT ["supervisord"]
ENTRYPOINT ["/usr/local/bin/supervisord"]
2 changes: 1 addition & 1 deletion platform/centec/docker-syncd-centec/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ COPY ["critical_processes", "/etc/supervisor/"]
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
RUN rm -rf /debs

ENTRYPOINT ["supervisord"]
ENTRYPOINT ["/usr/local/bin/supervisord"]
2 changes: 1 addition & 1 deletion platform/innovium/docker-syncd-invm-rpc/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ RUN apt-get update \

COPY ["ptf_nn_agent.conf", "/etc/supervisor/conf.d/"]

ENTRYPOINT ["supervisord"]
ENTRYPOINT ["/usr/local/bin/supervisord"]
2 changes: 1 addition & 1 deletion platform/innovium/docker-syncd-invm/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
RUN rm -rf /debs

ENTRYPOINT ["supervisord"]
ENTRYPOINT ["/usr/local/bin/supervisord"]
2 changes: 1 addition & 1 deletion platform/marvell-arm64/docker-syncd-mrvl-rpc/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ RUN apt-get update \

COPY ["ptf_nn_agent.conf", "/etc/supervisor/conf.d/"]

ENTRYPOINT ["supervisord"]
ENTRYPOINT ["/usr/local/bin/supervisord"]
2 changes: 1 addition & 1 deletion platform/marvell-arm64/docker-syncd-mrvl/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ COPY ["critical_processes", "/etc/supervisor/"]
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
RUN rm -rf /debs

ENTRYPOINT ["supervisord"]
ENTRYPOINT ["/usr/local/bin/supervisord"]
2 changes: 1 addition & 1 deletion platform/marvell-armhf/docker-syncd-mrvl-rpc/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ RUN apt-get update \

COPY ["ptf_nn_agent.conf", "/etc/supervisor/conf.d/"]

ENTRYPOINT ["supervisord"]
ENTRYPOINT ["/usr/local/bin/supervisord"]
2 changes: 1 addition & 1 deletion platform/marvell-armhf/docker-syncd-mrvl/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ COPY ["critical_processes", "/etc/supervisor/"]
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
RUN rm -rf /debs

ENTRYPOINT ["supervisord"]
ENTRYPOINT ["/usr/local/bin/supervisord"]
2 changes: 1 addition & 1 deletion platform/marvell/docker-syncd-mrvl-rpc/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ RUN apt-get update \

COPY ["ptf_nn_agent.conf", "/etc/supervisor/conf.d/"]

ENTRYPOINT ["supervisord"]
ENTRYPOINT ["/usr/local/bin/supervisord"]
2 changes: 1 addition & 1 deletion platform/marvell/docker-syncd-mrvl/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ COPY ["critical_processes", "/etc/supervisor/"]
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
RUN rm -rf /debs

ENTRYPOINT ["supervisord"]
ENTRYPOINT ["/usr/local/bin/supervisord"]
2 changes: 1 addition & 1 deletion platform/mellanox/docker-saiserver-mlnx/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ COPY ["sai_2700.xml", "/usr/share/"]
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
RUN rm -rf /debs

ENTRYPOINT ["supervisord"]
ENTRYPOINT ["/usr/local/bin/supervisord"]
2 changes: 1 addition & 1 deletion platform/mellanox/docker-syncd-mlnx-rpc/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ RUN apt-get clean -y && \
apt-get autoremove -y && \
rm -rf /debs

ENTRYPOINT ["supervisord"]
ENTRYPOINT ["/usr/local/bin/supervisord"]
2 changes: 1 addition & 1 deletion platform/mellanox/docker-syncd-mlnx/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
COPY ["files/supervisor-proc-exit-listener", "/usr/bin"]
COPY ["critical_processes", "/etc/supervisor/"]

ENTRYPOINT ["supervisord"]
ENTRYPOINT ["/usr/local/bin/supervisord"]
2 changes: 1 addition & 1 deletion platform/nephos/docker-syncd-nephos-rpc/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ RUN apt-get update \

COPY ["ptf_nn_agent.conf", "/etc/supervisor/conf.d/"]

ENTRYPOINT ["supervisord"]
ENTRYPOINT ["/usr/local/bin/supervisord"]
2 changes: 1 addition & 1 deletion platform/nephos/docker-syncd-nephos/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ COPY ["critical_processes", "/etc/supervisor/"]
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
RUN rm -rf /debs

ENTRYPOINT ["supervisord"]
ENTRYPOINT ["/usr/local/bin/supervisord"]
2 changes: 1 addition & 1 deletion platform/vs/docker-gbsyncd-vs/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ COPY ["critical_processes", "/etc/supervisor/"]
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
RUN rm -rf /debs

ENTRYPOINT ["supervisord"]
ENTRYPOINT ["/usr/local/bin/supervisord"]
2 changes: 1 addition & 1 deletion platform/vs/docker-sonic-vs/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -170,4 +170,4 @@ RUN mkdir -p /var/warmboot/teamd
ENV PLATFORM=x86_64-kvm_x86_64-r0
ENV HWSKU=Force10-S6000

ENTRYPOINT ["supervisord"]
ENTRYPOINT ["/usr/local/bin/supervisord"]
2 changes: 1 addition & 1 deletion platform/vs/docker-syncd-vs/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ COPY ["critical_processes", "/etc/supervisor/"]
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
RUN rm -rf /debs

ENTRYPOINT ["supervisord"]
ENTRYPOINT ["/usr/local/bin/supervisord"]

0 comments on commit 4d3eb18

Please sign in to comment.