Skip to content

Commit

Permalink
disable swss and syncd servce, and run one lldp and bgp instance
Browse files Browse the repository at this point in the history
  • Loading branch information
sonic-otn committed Nov 22, 2023
1 parent c6de161 commit edabf27
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions files/build_templates/init_cfg.json.j2
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,18 @@
("lldp", "enabled", true, "enabled"),
("pmon", "enabled", true, "enabled"),
("snmp", "disabled", true, "enabled"),
("eventd", "enabled", false, "enabled"),
("swss", "disabled", false, "enabled"),
("syncd", "disabled", false, "enabled"),
("otss", "enabled", false, "enabled"),
("syncd-ot", "enabled", false, "enabled")] %}
("eventd", "enabled", false, "enabled")] %}
{%- if sonic_asic_platform.startswith('ot-') %}
{% do features.append(("swss", "disabled", false, "enabled")) %}
{% do features.append(("syncd", "disabled", false, "enabled")) %}
{% do features.append(("otss", "enabled", false, "enabled")) %}
{% do features.append(("syncd-ot", "enabled", false, "enabled")) %}
{%- else %}
{% do features.append(("swss", "enabled", false, "enabled")) %}
{% do features.append(("syncd", "enabled", false, "enabled")) %}
{% do features.append(("otss", "disabled", false, "enabled")) %}
{% do features.append(("syncd-ot", "disabled", false, "enabled")) %}
{% endif %}
{%- if include_router_advertiser == "y" %}{% do features.append(("radv", "enabled", false, "enabled")) %}{% endif %}
{%- if include_teamd == "y" %}{% do features.append(("teamd", "{% if not DEVICE_RUNTIME_METADATA['ETHERNET_PORTS_PRESENT'] %}disabled{% else %}enabled{% endif %}", false, "enabled")) %}{% endif %}
{% do features.append(("dhcp_relay", "{% if not (DEVICE_METADATA is defined and DEVICE_METADATA['localhost'] is defined and DEVICE_METADATA['localhost']['type'] is defined and DEVICE_METADATA['localhost']['type'] is not in ['ToRRouter', 'EPMS', 'MgmtTsToR', 'MgmtToRRouter', 'BmcMgmtToRRouter']) %}enabled{% else %}disabled{% endif %}", false, "enabled")) %}
Expand All @@ -65,9 +72,17 @@
"delayed" : {{delayed | lower()}},
"has_global_scope": {% if feature + '.service' in installer_services.split(' ') %}true{% else %}false{% endif %},
{%- if feature in ["lldp"] %}
{%- if sonic_asic_platform.startswith('ot-') %}
"has_per_asic_scope": "False",
{%- else %}
"has_per_asic_scope": {% raw %}"{% if not DEVICE_RUNTIME_METADATA['ETHERNET_PORTS_PRESENT'] or ('CHASSIS_METADATA' in DEVICE_RUNTIME_METADATA and DEVICE_RUNTIME_METADATA['CHASSIS_METADATA']['module_type'] in ['supervisor']) %}False{% else %}True{% endif %}"{% endraw %},
{%- endif %}
{%- else %}
{%- if feature in ["bgp"] and sonic_asic_platform.startswith('ot-') %}
"has_per_asic_scope": "False",
{%- else %}
"has_per_asic_scope": {% if feature + '@.service' in installer_services.split(' ') %}"True"{% else %}"False"{% endif %},
{%- endif %}
{%- endif %}
"auto_restart": "{{autorestart}}",
"support_syslog_rate_limit" : "true",
Expand Down

0 comments on commit edabf27

Please sign in to comment.