Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[swss] Only run tunnel packet handler on dualtor devices #11627

Merged
merged 1 commit into from
Aug 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dockers/docker-orchagent/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,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 ["orchagent.sh", "swssconfig.sh", "buffermgrd.sh", "/usr/bin/"]
COPY ["files/supervisor-proc-exit-listener", "/usr/bin"]
Expand Down
5 changes: 5 additions & 0 deletions dockers/docker-orchagent/docker-init.j2
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,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']")
SWITCH_TYPE=${SWITCH_TYPE:-`sonic-cfggen -d -v "DEVICE_METADATA['localhost']['switch_type']"`}
chmod +x /usr/bin/wait_for_link.sh

Expand All @@ -43,6 +44,10 @@ 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

USE_PCI_ID_IN_CHASSIS_STATE_DB=/usr/share/sonic/platform/use_pci_id_chassis
ASIC_ID="asic$NAMESPACE_ID"
if [ -f "$USE_PCI_ID_IN_CHASSIS_STATE_DB" ]; then
Expand Down
12 changes: 0 additions & 12 deletions dockers/docker-orchagent/supervisord.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -288,15 +288,3 @@ dependent_startup_wait_for=swssconfig:exited
environment=ASAN_OPTIONS="log_path=/var/log/asan/fdbsyncd-asan.log{{ asan_extra_options }}"
{% endif %}
{%- endif %}

{% if is_fabric_asic == 0 %}
[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
{%- endif %}
9 changes: 9 additions & 0 deletions dockers/docker-orchagent/tunnel_packet_handler.conf
Original file line number Diff line number Diff line change
@@ -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