[swss]: Run tunnel_pkt_handler on dualtor only (#11626)
At SWSS docker init time, check the device subtype and enable tunnel packet handler only if it is dualtor Signed-off-by: Lawrence Lee <lawlee@microsoft.com>
This commit is contained in:
parent
8bb38639e5
commit
663bf00c22
@ -74,7 +74,7 @@ RUN apt-get purge -y \
|
||||
|
||||
COPY ["files/arp_update", "/usr/bin"]
|
||||
COPY ["arp_update.conf", "files/arp_update_vars.j2", "/usr/share/sonic/templates/"]
|
||||
COPY ["ndppd.conf", "/usr/share/sonic/templates/"]
|
||||
COPY ["ndppd.conf", "tunnel_packet_handler.conf", "/usr/share/sonic/templates/"]
|
||||
COPY ["enable_counters.py", "tunnel_packet_handler.py", "/usr/bin/"]
|
||||
COPY ["docker-init.sh", "orchagent.sh", "swssconfig.sh", "buffermgrd.sh", "/usr/bin/"]
|
||||
COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
|
||||
|
@ -13,6 +13,7 @@ CFGGEN_PARAMS=" \
|
||||
-t /usr/share/sonic/templates/wait_for_link.sh.j2,/usr/bin/wait_for_link.sh \
|
||||
"
|
||||
VLAN=$(sonic-cfggen $CFGGEN_PARAMS)
|
||||
SUBTYPE=$(sonic-cfggen -d -v "DEVICE_METADATA['localhost']['subtype']")
|
||||
|
||||
chmod +x /usr/bin/wait_for_link.sh
|
||||
|
||||
@ -27,4 +28,8 @@ if [ "$VLAN" != "" ]; then
|
||||
cp /usr/share/sonic/templates/ndppd.conf /etc/supervisor/conf.d/
|
||||
fi
|
||||
|
||||
if [ "$SUBTYPE" == "DualToR" ]; then
|
||||
cp /usr/share/sonic/templates/tunnel_packet_handler.conf /etc/supervisor/conf.d/
|
||||
fi
|
||||
|
||||
exec /usr/local/bin/supervisord
|
||||
|
@ -205,13 +205,3 @@ stdout_logfile=syslog
|
||||
stderr_logfile=syslog
|
||||
dependent_startup=true
|
||||
dependent_startup_wait_for=swssconfig:exited
|
||||
|
||||
[program:tunnel_packet_handler]
|
||||
command=/usr/bin/tunnel_packet_handler.py
|
||||
priority=12
|
||||
autostart=false
|
||||
autorestart=unexpected
|
||||
stdout_logfile=syslog
|
||||
stderr_logfile=syslog
|
||||
dependent_startup=true
|
||||
dependent_startup_wait_for=swssconfig:exited
|
||||
|
9
dockers/docker-orchagent/tunnel_packet_handler.conf
Normal file
9
dockers/docker-orchagent/tunnel_packet_handler.conf
Normal file
@ -0,0 +1,9 @@
|
||||
[program:tunnel_packet_handler]
|
||||
command=/usr/bin/tunnel_packet_handler.py
|
||||
priority=12
|
||||
autostart=false
|
||||
autorestart=unexpected
|
||||
stdout_logfile=syslog
|
||||
stderr_logfile=syslog
|
||||
dependent_startup=true
|
||||
dependent_startup_wait_for=swssconfig:exited
|
Reference in New Issue
Block a user