2020-02-07 14:35:35 -06:00
{
"DEVICE_METADATA": {
"localhost": {
2020-12-13 13:35:39 -06:00
"buffer_model": {% if default_buffer_model == "dynamic" %}"dynamic"{% else %}"traditional"{% endif %},
2021-12-07 13:11:25 -06:00
{%- if include_p4rt == "y" %}"synchronous_mode":"enable",{% endif %}
2020-02-07 14:35:35 -06:00
"default_bgp_status": {% if shutdown_bgp_on_start == "y" %}"down"{% else %}"up"{% endif %},
2023-06-07 12:39:24 -05:00
"default_pfcwd_status": {% if enable_pfcwd_on_start == "y" %}"enable"{% else %}"disable"{% endif %},
"timezone": "UTC"
2020-02-07 14:35:35 -06:00
}
},
"CRM": {
"Config": {
"polling_interval": "300",
{%- for crm_res in ["ipv4_route", "ipv6_route", "ipv4_nexthop", "ipv6_nexthop", "ipv4_neighbor",
"ipv6_neighbor", "nexthop_group_member", "nexthop_group", "acl_table",
2021-06-16 17:08:23 -05:00
"acl_group", "acl_entry", "acl_counter", "fdb_entry", "snat_entry", "dnat_entry",
2021-12-12 14:16:39 -06:00
"ipmc_entry", "mpls_inseg", "mpls_nexthop"] %}
2020-02-07 14:35:35 -06:00
"{{crm_res}}_threshold_type": "percentage",
"{{crm_res}}_low_threshold": "70",
"{{crm_res}}_high_threshold": "85"{% if not loop.last %},{% endif -%}
{% endfor %}
}
2020-02-11 13:05:21 -06:00
},
2021-11-10 19:07:54 -06:00
"FLEX_COUNTER_TABLE": {
"ACL": {
"FLEX_COUNTER_STATUS": "enable",
"FLEX_COUNTER_DELAY_STATUS": "true",
"POLL_INTERVAL": "10000"
}
},
2022-07-12 02:22:48 -05:00
"BGP_DEVICE_GLOBAL": {
"STATE": {
"tsa_enabled": "false"
}
},
2022-11-15 18:20:14 -06:00
{%- set features = [("bgp", "{% 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']) %}disabled{% else %}enabled{% endif %}", false, "enabled"),
2020-11-25 10:41:11 -06:00
("database", "always_enabled", false, "always_enabled"),
2022-04-28 02:35:14 -05:00
("lldp", "enabled", true, "enabled"),
2022-05-02 02:44:17 -05:00
("pmon", "enabled", true, "enabled"),
2020-08-19 21:27:59 -05:00
("pmon", "enabled", false, "enabled"),
("snmp", "enabled", true, "enabled"),
2022-09-21 11:20:53 -05:00
("eventd", "enabled", false, "enabled"),
2020-12-28 12:33:46 -06:00
("swss", "enabled", false, "enabled"),
2022-12-27 05:55:37 -06:00
("syncd", "enabled", false, "enabled")] %}
{%- 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 %}
2022-11-09 23:37:02 -06:00
{% 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")) %}
2020-11-07 02:46:18 -06:00
{%- if sonic_asic_platform == "vs" %}{% do features.append(("gbsyncd", "enabled", false, "enabled")) %}{% endif %}
2020-08-19 21:27:59 -05:00
{%- if include_iccpd == "y" %}{% do features.append(("iccpd", "disabled", false, "enabled")) %}{% endif %}
2020-08-27 13:53:58 -05:00
{%- if include_mgmt_framework == "y" %}{% do features.append(("mgmt-framework", "enabled", true, "enabled")) %}{% endif %}
2021-03-15 19:16:07 -05:00
{%- if include_mux == "y" %}{% do features.append(("mux", "{% if 'subtype' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['subtype'] == 'DualToR' %}enabled{% else %}always_disabled{% endif %}", false, "enabled")) %}{% endif %}
2020-08-19 21:27:59 -05:00
{%- if include_nat == "y" %}{% do features.append(("nat", "disabled", false, "enabled")) %}{% endif %}
2022-10-31 18:18:42 -05:00
{%- if include_p4rt == "y" %}{% do features.append(("p4rt", "disabled", false, "enabled")) %}{% endif %}
2020-08-19 21:27:59 -05:00
{%- if include_restapi == "y" %}{% do features.append(("restapi", "enabled", false, "enabled")) %}{% endif %}
2023-06-09 18:28:15 -05:00
{%- if include_sflow == "y" %}{% do features.append(("sflow", "disabled", true, "enabled")) %}{% endif %}
2022-11-08 13:03:38 -06:00
{%- if include_macsec == "y" %}{% do features.append(("macsec", "{% if 'type' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['type'] == 'SpineRouter' and DEVICE_RUNTIME_METADATA['MACSEC_SUPPORTED'] %}enabled{% else %}disabled{% endif %}", false, "enabled")) %}{% endif %}
2020-08-19 21:27:59 -05:00
{%- if include_system_telemetry == "y" %}{% do features.append(("telemetry", "enabled", true, "enabled")) %}{% endif %}
2020-02-11 13:05:21 -06:00
"FEATURE": {
2023-04-12 13:20:03 -05:00
{# delayed field if set, will start the feature systemd .timer unit instead of .service unit #}
{%- for feature, state, delayed, autorestart in features %}
2020-02-11 13:05:21 -06:00
"{{feature}}": {
2020-08-05 15:23:12 -05:00
"state": "{{state}}",
2023-04-12 13:20:03 -05:00
"delayed" : {{delayed | lower()}},
2020-09-22 10:34:02 -05:00
"has_global_scope": {% if feature + '.service' in installer_services.split(' ') %}true{% else %}false{% endif %},
2022-11-15 18:20:14 -06:00
{%- if feature in ["lldp"] %}
"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 %},
{%- else %}
"has_per_asic_scope": {% if feature + '@.service' in installer_services.split(' ') %}"True"{% else %}"False"{% endif %},
{%- endif %}
2020-08-05 15:23:12 -05:00
"auto_restart": "{{autorestart}}",
2022-12-20 02:53:58 -06:00
"support_syslog_rate_limit" : "true",
2022-05-20 15:25:11 -05:00
{# Set check_up_status to true here when app readiness will be marked in state db #}
{# For now, to support the infrastrucure, setting the check_up_status to false for bgp,swss,pmon #}
{# Once apps like bgp,synd supports app readiness, then bgp,syncd can set check_up_status to true #}
{%- if feature in ["bgp", "swss", "pmon"] %}
"check_up_status" : "false",
{%- endif %}
First cut image update for kubernetes support. (#5421)
* First cut image update for kubernetes support.
With this,
1) dockers dhcp_relay, lldp, pmon, radv, snmp, telemetry are enabled
for kube management
init_cfg.json configure set_owner as kube for these
2) Each docker's start.sh updated to call container_startup.py to register going up
As part of this call, it registers the current owner as local/kube and its version
The images are built with its version ingrained into image during build
3) Update all docker's bash script to call 'container start/stop/wait' instead of 'docker start/stop/wait'.
For all locally managed containers, it calls docker commands, hence no change for locally managed.
4) Introduced a new ctrmgrd service, that helps with transition between owners as kube & local and carry over any labels update from STATE-DB to API server
5) hostcfgd updated to handle owner change
6) Reboot scripts are updatd to tag kube running images as local, so upon reboot they run the same image.
7) Added kube_commands.py to handle all updates with Kubernetes API serrver -- dedicated for k8s interaction only.
2020-12-22 10:01:33 -06:00
{%- if include_kubernetes == "y" %}
2022-09-03 09:33:25 -05:00
{%- if feature in ["lldp", "pmon", "radv", "eventd", "snmp", "telemetry"] %}
First cut image update for kubernetes support. (#5421)
* First cut image update for kubernetes support.
With this,
1) dockers dhcp_relay, lldp, pmon, radv, snmp, telemetry are enabled
for kube management
init_cfg.json configure set_owner as kube for these
2) Each docker's start.sh updated to call container_startup.py to register going up
As part of this call, it registers the current owner as local/kube and its version
The images are built with its version ingrained into image during build
3) Update all docker's bash script to call 'container start/stop/wait' instead of 'docker start/stop/wait'.
For all locally managed containers, it calls docker commands, hence no change for locally managed.
4) Introduced a new ctrmgrd service, that helps with transition between owners as kube & local and carry over any labels update from STATE-DB to API server
5) hostcfgd updated to handle owner change
6) Reboot scripts are updatd to tag kube running images as local, so upon reboot they run the same image.
7) Added kube_commands.py to handle all updates with Kubernetes API serrver -- dedicated for k8s interaction only.
2020-12-22 10:01:33 -06:00
"set_owner": "kube", {% else %}
"set_owner": "local", {% endif %} {% endif %}
2021-11-10 17:36:20 -06:00
"high_mem_alert": "disabled"
2020-02-11 13:05:21 -06:00
}{% if not loop.last %},{% endif -%}
{% endfor %}
2021-11-15 23:56:37 -06:00
},
"AUTO_TECHSUPPORT": {
"GLOBAL": {
{%- if enable_auto_tech_support == "y" %}
"state" : "enabled", {% else %}
"state" : "disabled", {% endif %}
"rate_limit_interval" : "180",
"max_techsupport_limit" : "10.0",
"max_core_limit" : "5.0",
2022-06-20 11:39:05 -05:00
"available_mem_threshold": "10.0",
"min_available_mem": "200",
2021-11-15 23:56:37 -06:00
"since" : "2 days ago"
}
},
"AUTO_TECHSUPPORT_FEATURE": {
{%- for feature, _, _, _ in features %}
"{{feature}}": {
{%- if enable_auto_tech_support == "y" %}
"state" : "enabled", {% else %}
"state" : "disabled", {% endif %}
2022-06-20 11:39:05 -05:00
"rate_limit_interval" : "600",
"available_mem_threshold": "10.0"
2021-11-15 23:56:37 -06:00
}{%if not loop.last %},{% endif -%}
2022-12-20 02:53:58 -06:00
{% endfor %}
},
"SYSLOG_CONFIG": {
"GLOBAL": {
"rate_limit_interval" : "0",
"rate_limit_burst" : "0"
}
},
"SYSLOG_CONFIG_FEATURE": {
{%- for feature, _, _, _ in features %}
"{{feature}}": {
"rate_limit_interval" : "300",
"rate_limit_burst": "20000"
}{%if not loop.last %},{% endif -%}
2022-04-28 02:35:14 -05:00
{% endfor %}
2022-05-29 05:54:51 -05:00
},
"PASSW_HARDENING": {
"POLICIES":{
"state": "disabled",
"expiration": "180",
"expiration_warning": "15",
"history_cnt": "10",
"len_min": "8",
"reject_user_passw_match": "true",
"lower_class": "true",
"upper_class": "true",
"digits_class": "true",
"special_class": "true"
}
2023-02-22 12:25:54 -06:00
},
"SYSTEM_DEFAULTS" : {
{%- if include_mux == "y" %}
"mux_tunnel_egress_acl": {
{%- if sonic_asic_platform == "mellanox" %}
"status": "enabled"
{% else %}
"status": "disabled"
{% endif %}
}
{% endif %}
2020-02-07 14:35:35 -06:00
}
}