[supervisord]: use abspath as supervisord entrypoint (#5995)

use abspath makes the entrypoint not affected by PATH env.

Signed-off-by: Guohan Lu <lguohan@gmail.com>
This commit is contained in:
lguohan 2020-11-22 21:18:44 -08:00 committed by GitHub
parent e0781f463f
commit 4d3eb18ca7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
47 changed files with 49 additions and 49 deletions

View File

@ -19,4 +19,4 @@ RUN mv /deps/basic_router /usr/sbin/basic_router
COPY ["start.sh", "/usr/bin/"] COPY ["start.sh", "/usr/bin/"]
COPY ["supervisord.conf", "/etc/supervisor/conf.d/"] COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
ENTRYPOINT ["supervisord"] ENTRYPOINT ["/usr/local/bin/supervisord"]

View File

@ -55,7 +55,7 @@ if [[ $DATABASE_TYPE == "chassisdb" ]]; then
# generate all redis server supervisord configuration file # 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 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 rm $db_cfg_file_tmp
exec supervisord exec /usr/local/bin/supervisord
exit 0 exit 0
fi fi
@ -79,4 +79,4 @@ else
fi fi
rm $db_cfg_file_tmp rm $db_cfg_file_tmp
exec supervisord exec /usr/local/bin/supervisord

View File

@ -19,6 +19,6 @@ sonic-cfggen $CFGGEN_PARAMS
chmod +x /usr/bin/wait_for_intf.sh chmod +x /usr/bin/wait_for_intf.sh
# The docker container should start this script as PID 1, so now that supervisord is # 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 # duration of the container's lifetime
exec supervisord exec /usr/local/bin/supervisord

View File

@ -66,4 +66,4 @@ chmod 0755 /usr/sbin/bgp-unisolate
mkdir -p /var/sonic mkdir -p /var/sonic
echo "# Config files managed by sonic-config-engine" > /var/sonic/config_status echo "# Config files managed by sonic-config-engine" > /var/sonic/config_status
exec supervisord exec /usr/local/bin/supervisord

View File

@ -27,4 +27,4 @@ COPY ["daemons", "/etc/quagga/"]
COPY ["files/supervisor-proc-exit-listener", "/usr/bin"] COPY ["files/supervisor-proc-exit-listener", "/usr/bin"]
COPY ["critical_processes", "/etc/supervisor"] COPY ["critical_processes", "/etc/supervisor"]
ENTRYPOINT ["supervisord"] ENTRYPOINT ["/usr/local/bin/supervisord"]

View File

@ -36,4 +36,4 @@ COPY ["*.j2", "/usr/share/sonic/templates/"]
COPY ["files/supervisor-proc-exit-listener", "/usr/bin"] COPY ["files/supervisor-proc-exit-listener", "/usr/bin"]
COPY ["critical_processes", "/etc/supervisor"] COPY ["critical_processes", "/etc/supervisor"]
ENTRYPOINT ["supervisord"] ENTRYPOINT ["/usr/local/bin/supervisord"]

View File

@ -31,4 +31,4 @@ RUN apt-get clean -y && \
apt-get autoremove -y && \ apt-get autoremove -y && \
rm -rf /debs rm -rf /debs
ENTRYPOINT ["supervisord"] ENTRYPOINT ["/usr/local/bin/supervisord"]

View File

@ -2,4 +2,4 @@
#Generate supervisord.conf based on device metadata #Generate supervisord.conf based on device metadata
mkdir -p /etc/supervisor/conf.d/ mkdir -p /etc/supervisor/conf.d/
sonic-cfggen -d -t /usr/share/sonic/templates/supervisord.conf.j2 > /etc/supervisor/conf.d/supervisord.conf sonic-cfggen -d -t /usr/share/sonic/templates/supervisord.conf.j2 > /etc/supervisor/conf.d/supervisord.conf
exec supervisord exec /usr/local/bin/supervisord

View File

@ -35,4 +35,4 @@ COPY ["critical_processes", "/etc/supervisor"]
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
RUN rm -rf /debs RUN rm -rf /debs
ENTRYPOINT ["supervisord"] ENTRYPOINT ["/usr/local/bin/supervisord"]

View File

@ -25,4 +25,4 @@ if [ "$VLAN" != "" ]; then
cp /usr/share/sonic/templates/ndppd.conf /etc/supervisor/conf.d/ cp /usr/share/sonic/templates/ndppd.conf /etc/supervisor/conf.d/
fi fi
exec supervisord exec /usr/local/bin/supervisord

View File

@ -40,4 +40,4 @@ if [ $HAVE_FANCONTROL_CONF -eq 1 ]; then
/bin/cp -f $FANCONTROL_CONF_FILE /etc/ /bin/cp -f $FANCONTROL_CONF_FILE /etc/
fi fi
exec supervisord exec /usr/local/bin/supervisord

View File

@ -14,4 +14,4 @@ sonic-cfggen $CFGGEN_PARAMS
chmod +x /usr/bin/wait_for_link.sh chmod +x /usr/bin/wait_for_link.sh
exec supervisord exec /usr/local/bin/supervisord

View File

@ -32,4 +32,4 @@ COPY ["files/supervisor-proc-exit-listener", "/usr/bin"]
COPY ["critical_processes", "/etc/supervisor"] COPY ["critical_processes", "/etc/supervisor"]
COPY ["port_index_mapper.py", "/usr/bin"] COPY ["port_index_mapper.py", "/usr/bin"]
ENTRYPOINT ["supervisord"] ENTRYPOINT ["/usr/local/bin/supervisord"]

View File

@ -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 # Although exposing ports is not needed for host net mode, keep it for possible bridge mode
EXPOSE 161/udp 162/udp EXPOSE 161/udp 162/udp
ENTRYPOINT ["supervisord"] ENTRYPOINT ["/usr/local/bin/supervisord"]

View File

@ -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 apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
RUN rm -rf /debs RUN rm -rf /debs
ENTRYPOINT ["supervisord"] ENTRYPOINT ["/usr/local/bin/supervisord"]

View File

@ -25,4 +25,4 @@ COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
COPY ["files/supervisor-proc-exit-listener", "/usr/bin"] COPY ["files/supervisor-proc-exit-listener", "/usr/bin"]
COPY ["critical_processes", "/etc/supervisor"] COPY ["critical_processes", "/etc/supervisor"]
ENTRYPOINT ["supervisord"] ENTRYPOINT ["/usr/local/bin/supervisord"]

View File

@ -28,4 +28,4 @@ COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
COPY ["files/supervisor-proc-exit-listener", "/usr/bin"] COPY ["files/supervisor-proc-exit-listener", "/usr/bin"]
COPY ["critical_processes", "/etc/supervisor"] COPY ["critical_processes", "/etc/supervisor"]
ENTRYPOINT ["supervisord"] ENTRYPOINT ["/usr/local/bin/supervisord"]

View File

@ -27,4 +27,4 @@ COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
COPY ["files/supervisor-proc-exit-listener", "/usr/bin"] COPY ["files/supervisor-proc-exit-listener", "/usr/bin"]
COPY ["critical_processes", "/etc/supervisor"] COPY ["critical_processes", "/etc/supervisor"]
ENTRYPOINT ["supervisord"] ENTRYPOINT ["/usr/local/bin/supervisord"]

View File

@ -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 apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
RUN rm -rf /deps RUN rm -rf /deps
ENTRYPOINT ["supervisord"] ENTRYPOINT ["/usr/local/bin/supervisord"]

View File

@ -49,4 +49,4 @@ RUN apt-get update \
COPY ["ptf_nn_agent.conf", "/etc/supervisor/conf.d/"] COPY ["ptf_nn_agent.conf", "/etc/supervisor/conf.d/"]
ENTRYPOINT ["supervisord"] ENTRYPOINT ["/usr/local/bin/supervisord"]

View File

@ -36,4 +36,4 @@ COPY ["critical_processes", "/etc/supervisor/"]
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
RUN rm -rf /debs RUN rm -rf /debs
ENTRYPOINT ["supervisord"] ENTRYPOINT ["/usr/local/bin/supervisord"]

View File

@ -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 apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
RUN rm -rf /debs RUN rm -rf /debs
ENTRYPOINT ["supervisord"] ENTRYPOINT ["/usr/local/bin/supervisord"]

View File

@ -48,4 +48,4 @@ RUN apt-get update \
COPY ["ptf_nn_agent.conf", "/etc/supervisor/conf.d/"] COPY ["ptf_nn_agent.conf", "/etc/supervisor/conf.d/"]
ENTRYPOINT ["supervisord"] ENTRYPOINT ["/usr/local/bin/supervisord"]

View File

@ -32,4 +32,4 @@ COPY ["critical_processes", "/etc/supervisor/"]
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
RUN rm -rf /debs RUN rm -rf /debs
ENTRYPOINT ["supervisord"] ENTRYPOINT ["/usr/local/bin/supervisord"]

View File

@ -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 apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
RUN rm -rf deps RUN rm -rf deps
ENTRYPOINT ["supervisord"] ENTRYPOINT ["/usr/local/bin/supervisord"]

View File

@ -48,4 +48,4 @@ RUN apt-get update \
COPY ["ptf_nn_agent.conf", "/etc/supervisor/conf.d/"] COPY ["ptf_nn_agent.conf", "/etc/supervisor/conf.d/"]
ENTRYPOINT ["supervisord"] ENTRYPOINT ["/usr/local/bin/supervisord"]

View File

@ -32,4 +32,4 @@ COPY ["profile.ini", "/etc/ssw/AS7512/"]
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
RUN rm -rf /debs RUN rm -rf /debs
ENTRYPOINT ["supervisord"] ENTRYPOINT ["/usr/local/bin/supervisord"]

View File

@ -48,4 +48,4 @@ RUN apt-get update \
COPY ["ptf_nn_agent.conf", "/etc/supervisor/conf.d/"] COPY ["ptf_nn_agent.conf", "/etc/supervisor/conf.d/"]
ENTRYPOINT ["supervisord"] ENTRYPOINT ["/usr/local/bin/supervisord"]

View File

@ -34,4 +34,4 @@ COPY ["critical_processes", "/etc/supervisor/"]
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
RUN rm -rf /debs RUN rm -rf /debs
ENTRYPOINT ["supervisord"] ENTRYPOINT ["/usr/local/bin/supervisord"]

View File

@ -48,4 +48,4 @@ RUN apt-get update \
COPY ["ptf_nn_agent.conf", "/etc/supervisor/conf.d/"] COPY ["ptf_nn_agent.conf", "/etc/supervisor/conf.d/"]
ENTRYPOINT ["supervisord"] ENTRYPOINT ["/usr/local/bin/supervisord"]

View File

@ -30,4 +30,4 @@ COPY ["critical_processes", "/etc/supervisor/"]
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
RUN rm -rf /debs RUN rm -rf /debs
ENTRYPOINT ["supervisord"] ENTRYPOINT ["/usr/local/bin/supervisord"]

View File

@ -50,4 +50,4 @@ RUN apt-get update \
COPY ["ptf_nn_agent.conf", "/etc/supervisor/conf.d/"] COPY ["ptf_nn_agent.conf", "/etc/supervisor/conf.d/"]
ENTRYPOINT ["supervisord"] ENTRYPOINT ["/usr/local/bin/supervisord"]

View File

@ -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 apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
RUN rm -rf /debs RUN rm -rf /debs
ENTRYPOINT ["supervisord"] ENTRYPOINT ["/usr/local/bin/supervisord"]

View File

@ -48,4 +48,4 @@ RUN apt-get update \
COPY ["ptf_nn_agent.conf", "/etc/supervisor/conf.d/"] COPY ["ptf_nn_agent.conf", "/etc/supervisor/conf.d/"]
ENTRYPOINT ["supervisord"] ENTRYPOINT ["/usr/local/bin/supervisord"]

View File

@ -34,4 +34,4 @@ COPY ["critical_processes", "/etc/supervisor/"]
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
RUN rm -rf /debs RUN rm -rf /debs
ENTRYPOINT ["supervisord"] ENTRYPOINT ["/usr/local/bin/supervisord"]

View File

@ -48,4 +48,4 @@ RUN apt-get update \
COPY ["ptf_nn_agent.conf", "/etc/supervisor/conf.d/"] COPY ["ptf_nn_agent.conf", "/etc/supervisor/conf.d/"]
ENTRYPOINT ["supervisord"] ENTRYPOINT ["/usr/local/bin/supervisord"]

View File

@ -34,4 +34,4 @@ COPY ["critical_processes", "/etc/supervisor/"]
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
RUN rm -rf /debs RUN rm -rf /debs
ENTRYPOINT ["supervisord"] ENTRYPOINT ["/usr/local/bin/supervisord"]

View File

@ -48,4 +48,4 @@ RUN apt-get update \
COPY ["ptf_nn_agent.conf", "/etc/supervisor/conf.d/"] COPY ["ptf_nn_agent.conf", "/etc/supervisor/conf.d/"]
ENTRYPOINT ["supervisord"] ENTRYPOINT ["/usr/local/bin/supervisord"]

View File

@ -30,4 +30,4 @@ COPY ["critical_processes", "/etc/supervisor/"]
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
RUN rm -rf /debs RUN rm -rf /debs
ENTRYPOINT ["supervisord"] ENTRYPOINT ["/usr/local/bin/supervisord"]

View File

@ -44,4 +44,4 @@ COPY ["sai_2700.xml", "/usr/share/"]
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
RUN rm -rf /debs RUN rm -rf /debs
ENTRYPOINT ["supervisord"] ENTRYPOINT ["/usr/local/bin/supervisord"]

View File

@ -62,4 +62,4 @@ RUN apt-get clean -y && \
apt-get autoremove -y && \ apt-get autoremove -y && \
rm -rf /debs rm -rf /debs
ENTRYPOINT ["supervisord"] ENTRYPOINT ["/usr/local/bin/supervisord"]

View File

@ -39,4 +39,4 @@ COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
COPY ["files/supervisor-proc-exit-listener", "/usr/bin"] COPY ["files/supervisor-proc-exit-listener", "/usr/bin"]
COPY ["critical_processes", "/etc/supervisor/"] COPY ["critical_processes", "/etc/supervisor/"]
ENTRYPOINT ["supervisord"] ENTRYPOINT ["/usr/local/bin/supervisord"]

View File

@ -48,4 +48,4 @@ RUN apt-get update \
COPY ["ptf_nn_agent.conf", "/etc/supervisor/conf.d/"] COPY ["ptf_nn_agent.conf", "/etc/supervisor/conf.d/"]
ENTRYPOINT ["supervisord"] ENTRYPOINT ["/usr/local/bin/supervisord"]

View File

@ -43,4 +43,4 @@ COPY ["critical_processes", "/etc/supervisor/"]
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
RUN rm -rf /debs RUN rm -rf /debs
ENTRYPOINT ["supervisord"] ENTRYPOINT ["/usr/local/bin/supervisord"]

View File

@ -31,4 +31,4 @@ COPY ["critical_processes", "/etc/supervisor/"]
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
RUN rm -rf /debs RUN rm -rf /debs
ENTRYPOINT ["supervisord"] ENTRYPOINT ["/usr/local/bin/supervisord"]

View File

@ -170,4 +170,4 @@ RUN mkdir -p /var/warmboot/teamd
ENV PLATFORM=x86_64-kvm_x86_64-r0 ENV PLATFORM=x86_64-kvm_x86_64-r0
ENV HWSKU=Force10-S6000 ENV HWSKU=Force10-S6000
ENTRYPOINT ["supervisord"] ENTRYPOINT ["/usr/local/bin/supervisord"]

View File

@ -31,4 +31,4 @@ COPY ["critical_processes", "/etc/supervisor/"]
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
RUN rm -rf /debs RUN rm -rf /debs
ENTRYPOINT ["supervisord"] ENTRYPOINT ["/usr/local/bin/supervisord"]