7bf05f7f4f
**- Why I did it** We were building a custom version of Supervisor because I had added patches to prevent hangs and crashes if the system clock ever rolled backward. Those changes were merged into the upstream Supervisor repo as of version 3.4.0 (http://supervisord.org/changes.html#id9), therefore, we should be able to simply install the vanilla package via pip. This will also allow us to easily move to Python 3, as Python 3 support was added in version 4.0.0. **- How I did it** - Remove Makefiles and patches for building supervisor package from source - Install Python 3 supervisor package version 4.2.1 in Buster base container - Also install Python 3 version of supervisord-dependent-startup in Buster base container - Debian package installed binary in `/usr/bin/`, but pip package installs in `/usr/local/bin/`, so rather than update all absolute paths, I changed all references to simply call `supervisord` and let the system PATH find the executable to prevent future need for changes just in case we ever need to switch back to build a Debian package, then we won't need to modify these again. - Install Python 2 supervisor package >= 3.4.0 in Stretch and Jessie base containers
29 lines
986 B
Bash
Executable File
29 lines
986 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
mkdir -p /etc/swss/config.d/
|
|
|
|
CFGGEN_PARAMS=" \
|
|
-d \
|
|
-y /etc/sonic/constants.yml \
|
|
-t /usr/share/sonic/templates/switch.json.j2,/etc/swss/config.d/switch.json \
|
|
-t /usr/share/sonic/templates/ipinip.json.j2,/etc/swss/config.d/ipinip.json \
|
|
-t /usr/share/sonic/templates/ports.json.j2,/etc/swss/config.d/ports.json \
|
|
-t /usr/share/sonic/templates/copp.json.j2,/etc/swss/config.d/00-copp.config.json \
|
|
-t /usr/share/sonic/templates/vlan_vars.j2 \
|
|
-t /usr/share/sonic/templates/ndppd.conf.j2,/etc/ndppd.conf \
|
|
"
|
|
VLAN=$(sonic-cfggen $CFGGEN_PARAMS)
|
|
|
|
# Executed HWSKU specific initialization tasks.
|
|
if [ -x /usr/share/sonic/hwsku/hwsku-init ]; then
|
|
/usr/share/sonic/hwsku/hwsku-init
|
|
fi
|
|
|
|
# Start arp_update and NDP proxy daemon when VLAN exists
|
|
if [ "$VLAN" != "" ]; then
|
|
cp /usr/share/sonic/templates/arp_update.conf /etc/supervisor/conf.d/
|
|
cp /usr/share/sonic/templates/ndppd.conf /etc/supervisor/conf.d/
|
|
fi
|
|
|
|
exec supervisord
|