Skip to content
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: 0 additions & 2 deletions dockers/docker-orchagent/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,7 @@ COPY ["arp_update.conf", "files/arp_update_vars.j2", "/usr/share/sonic/templates
COPY ["ndppd.conf", "/usr/share/sonic/templates/"]
COPY ["enable_counters.py", "/usr/bin"]
COPY ["docker-init.sh", "orchagent.sh", "swssconfig.sh", "buffermgrd.sh", "/usr/bin/"]
COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
COPY ["files/supervisor-proc-exit-listener", "/usr/bin"]
COPY ["critical_processes", "/etc/supervisor/"]

# Copy all Jinja2 template files into the templates folder
COPY ["*.j2", "/usr/share/sonic/templates/"]
Expand Down
13 changes: 0 additions & 13 deletions dockers/docker-orchagent/critical_processes

This file was deleted.

21 changes: 21 additions & 0 deletions dockers/docker-orchagent/critical_processes.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{% set is_fabric_asic = 0 %}
{% if DEVICE_METADATA.localhost.switch_type %}
{% if DEVICE_METADATA.localhost.switch_type == "fabric" %}
{% set is_fabric_asic = 1 %}
{% endif %}
{% endif %}
program:orchagent
{% if is_fabric_asic == 0 %}
program:portsyncd
program:neighsyncd
program:fdbsyncd
program:vlanmgrd
program:intfmgrd
program:portmgrd
program:buffermgrd
program:vrfmgrd
program:nbrmgrd
program:vxlanmgrd
program:coppmgrd
program:tunnelmgrd
{%- endif %}
4 changes: 4 additions & 0 deletions dockers/docker-orchagent/docker-init.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/usr/bin/env bash

mkdir -p /etc/swss/config.d/
mkdir -p /etc/supervisor/
mkdir -p /etc/supervisor/conf.d/

CFGGEN_PARAMS=" \
-d \
Expand All @@ -10,6 +12,8 @@ CFGGEN_PARAMS=" \
-t /usr/share/sonic/templates/ports.json.j2,/etc/swss/config.d/ports.json \
-t /usr/share/sonic/templates/vlan_vars.j2 \
-t /usr/share/sonic/templates/ndppd.conf.j2,/etc/ndppd.conf \
-t /usr/share/sonic/templates/critical_processes.j2,/etc/supervisor/critical_processes \
-t /usr/share/sonic/templates/supervisord.conf.j2,/etc/supervisor/conf.d/supervisord.conf
"
VLAN=$(sonic-cfggen $CFGGEN_PARAMS)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,16 @@ stdout_logfile=syslog
stderr_logfile=syslog
dependent_startup=true

{% set is_fabric_asic = 0 %}
{% set orchagent_dependent_startup_wait_for = "portsyncd:running" %}
{% if DEVICE_METADATA.localhost.switch_type %}
{% if DEVICE_METADATA.localhost.switch_type == "fabric" %}
{% set is_fabric_asic = 1 %}
{% set orchagent_dependent_startup_wait_for = "rsyslogd:running" %}
{%- endif %}
{%- endif %}

{% if is_fabric_asic == 0 %}
[program:gearsyncd]
command=/usr/bin/gearsyncd -p /usr/share/sonic/hwsku/gearbox_config.json
priority=3
Expand All @@ -39,7 +49,9 @@ stdout_logfile=syslog
stderr_logfile=syslog
dependent_startup=true
dependent_startup_wait_for=rsyslogd:running
{%- endif %}

{% if is_fabric_asic == 0 %}
[program:portsyncd]
command=/usr/bin/portsyncd
priority=3
Expand All @@ -49,6 +61,7 @@ stdout_logfile=syslog
stderr_logfile=syslog
dependent_startup=true
dependent_startup_wait_for=rsyslogd:running
{%- endif %}

[program:orchagent]
command=/usr/bin/orchagent.sh
Expand All @@ -58,7 +71,7 @@ autorestart=false
stdout_logfile=syslog
stderr_logfile=syslog
dependent_startup=true
dependent_startup_wait_for=portsyncd:running
dependent_startup_wait_for={{ orchagent_dependent_startup_wait_for }}

[program:swssconfig]
command=/usr/bin/swssconfig.sh
Expand All @@ -72,6 +85,7 @@ stderr_logfile=syslog
dependent_startup=true
dependent_startup_wait_for=orchagent:running

{% if is_fabric_asic == 0 %}
[program:restore_neighbors]
command=/usr/bin/restore_neighbors.py
priority=6
Expand All @@ -83,7 +97,9 @@ stdout_logfile=syslog
stderr_logfile=syslog
dependent_startup=true
dependent_startup_wait_for=swssconfig:exited
{%- endif %}

{% if is_fabric_asic == 0 %}
[program:coppmgrd]
command=/usr/bin/coppmgrd
priority=6
Expand All @@ -95,7 +111,9 @@ stdout_logfile=syslog
stderr_logfile=syslog
dependent_startup=true
dependent_startup_wait_for=orchagent:running
{%- endif %}

{% if is_fabric_asic == 0 %}
[program:neighsyncd]
command=/usr/bin/neighsyncd
priority=7
Expand All @@ -105,7 +123,9 @@ stdout_logfile=syslog
stderr_logfile=syslog
dependent_startup=true
dependent_startup_wait_for=swssconfig:exited
{%- endif %}

{% if is_fabric_asic == 0 %}
[program:vlanmgrd]
command=/usr/bin/vlanmgrd
priority=8
Expand All @@ -115,7 +135,9 @@ stdout_logfile=syslog
stderr_logfile=syslog
dependent_startup=true
dependent_startup_wait_for=swssconfig:exited
{%- endif %}

{% if is_fabric_asic == 0 %}
[program:intfmgrd]
command=/usr/bin/intfmgrd
priority=9
Expand All @@ -125,7 +147,9 @@ stdout_logfile=syslog
stderr_logfile=syslog
dependent_startup=true
dependent_startup_wait_for=swssconfig:exited
{%- endif %}

{% if is_fabric_asic == 0 %}
[program:portmgrd]
command=/usr/bin/portmgrd
priority=10
Expand All @@ -135,7 +159,9 @@ stdout_logfile=syslog
stderr_logfile=syslog
dependent_startup=true
dependent_startup_wait_for=swssconfig:exited
{%- endif %}

{% if is_fabric_asic == 0 %}
[program:buffermgrd]
command=/usr/bin/buffermgrd.sh
priority=11
Expand All @@ -145,7 +171,9 @@ stdout_logfile=syslog
stderr_logfile=syslog
dependent_startup=true
dependent_startup_wait_for=swssconfig:exited
{%- endif %}

{% if is_fabric_asic == 0 %}
[program:vrfmgrd]
command=/usr/bin/vrfmgrd
priority=13
Expand All @@ -155,7 +183,9 @@ stdout_logfile=syslog
stderr_logfile=syslog
dependent_startup=true
dependent_startup_wait_for=swssconfig:exited
{%- endif %}

{% if is_fabric_asic == 0 %}
[program:nbrmgrd]
command=/usr/bin/nbrmgrd
priority=15
Expand All @@ -165,7 +195,9 @@ stdout_logfile=syslog
stderr_logfile=syslog
dependent_startup=true
dependent_startup_wait_for=swssconfig:exited
{%- endif %}

{% if is_fabric_asic == 0 %}
[program:vxlanmgrd]
command=/usr/bin/vxlanmgrd
priority=16
Expand All @@ -175,7 +207,9 @@ stdout_logfile=syslog
stderr_logfile=syslog
dependent_startup=true
dependent_startup_wait_for=swssconfig:exited
{%- endif %}

{% if is_fabric_asic == 0 %}
[program:tunnelmgrd]
command=/usr/bin/tunnelmgrd
priority=17
Expand All @@ -185,6 +219,7 @@ stdout_logfile=syslog
stderr_logfile=syslog
dependent_startup=true
dependent_startup_wait_for=swssconfig:exited
{%- endif %}

[program:enable_counters]
command=/usr/bin/enable_counters.py
Expand All @@ -196,6 +231,7 @@ stderr_logfile=syslog
dependent_startup=true
dependent_startup_wait_for=swssconfig:exited

{% if is_fabric_asic == 0 %}
[program:fdbsyncd]
command=/usr/bin/fdbsyncd
priority=17
Expand All @@ -205,4 +241,4 @@ stdout_logfile=syslog
stderr_logfile=syslog
dependent_startup=true
dependent_startup_wait_for=swssconfig:exited

{%- endif %}