From b0c88d32505ed452ff43370a5e447e99e3c45a21 Mon Sep 17 00:00:00 2001 From: Yong Zhao Date: Mon, 10 Feb 2020 15:02:48 -0800 Subject: [PATCH 1/6] [init_cfg.json] Add a new table CONTAINER_FEATURE. Signed-off-by: Yong Zhao --- files/build_templates/init_cfg.json.j2 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/files/build_templates/init_cfg.json.j2 b/files/build_templates/init_cfg.json.j2 index 33cfe990f900..fe1988b6394f 100644 --- a/files/build_templates/init_cfg.json.j2 +++ b/files/build_templates/init_cfg.json.j2 @@ -16,5 +16,10 @@ "{{crm_res}}_high_threshold": "85"{% if not loop.last %},{% endif -%} {% endfor %} } + }, + "CONTAINER_FEATURE": { + "teamd": { + "auto_restart": "enabled" + } } } From 478e12e18cdd1e753008683f1eca898cedc2376d Mon Sep 17 00:00:00 2001 From: Yong Zhao Date: Mon, 10 Feb 2020 15:08:52 -0800 Subject: [PATCH 2/6] [init_cfg.json] Update the content of table CONTAINER_FEATURE. Signed-off-by: Yong Zhao --- files/build_templates/init_cfg.json.j2 | 33 ++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/files/build_templates/init_cfg.json.j2 b/files/build_templates/init_cfg.json.j2 index fe1988b6394f..fa052ff23fa1 100644 --- a/files/build_templates/init_cfg.json.j2 +++ b/files/build_templates/init_cfg.json.j2 @@ -20,6 +20,39 @@ "CONTAINER_FEATURE": { "teamd": { "auto_restart": "enabled" + }, + "swss": { + "auto_restart": "enabled" + }, + "syncd": { + "auto_restart": "enabled" + }, + "pmon": { + "auto_restart": "enabled" + }, + "lldp": { + "auto_restart": "enabled" + }, + "bgp": { + "auto_restart": "enabled" + }, + "dhcp-relay": { + "auto_restart": "enabled" + }, + "database": { + "auto_restart": "enabled" + }, + "radv": { + "auto_restart": "enabled" + }, + "sflow": { + "auto_restart": "enabled" + }, + "snmp": { + "auto_restart": "enabled" + }, + "telemetry": { + "auto_restart": "enabled" } } } From bdee6d6b774ad100c83461208a173f137cfc852e Mon Sep 17 00:00:00 2001 From: Yong Zhao Date: Mon, 10 Feb 2020 16:01:04 -0800 Subject: [PATCH 3/6] [init_cfg.json] Use the template to generate the table CONTAINER_FEATURE. Signed-off-by: Yong Zhao --- files/build_templates/init_cfg.json.j2 | 43 +++++--------------------- 1 file changed, 7 insertions(+), 36 deletions(-) diff --git a/files/build_templates/init_cfg.json.j2 b/files/build_templates/init_cfg.json.j2 index fa052ff23fa1..96b65b24e430 100644 --- a/files/build_templates/init_cfg.json.j2 +++ b/files/build_templates/init_cfg.json.j2 @@ -18,41 +18,12 @@ } }, "CONTAINER_FEATURE": { - "teamd": { - "auto_restart": "enabled" - }, - "swss": { - "auto_restart": "enabled" - }, - "syncd": { - "auto_restart": "enabled" - }, - "pmon": { - "auto_restart": "enabled" - }, - "lldp": { - "auto_restart": "enabled" - }, - "bgp": { - "auto_restart": "enabled" - }, - "dhcp-relay": { - "auto_restart": "enabled" - }, - "database": { - "auto_restart": "enabled" - }, - "radv": { - "auto_restart": "enabled" - }, - "sflow": { - "auto_restart": "enabled" - }, - "snmp": { - "auto_restart": "enabled" - }, - "telemetry": { - "auto_restart": "enabled" - } +{%- for container in ["teamd", "swss", "syncd", "pmon", "lldp", "bgp", "dhcp-relay", + "radv", "sflow", "snmp", "telemetry", "database"] %} + "{{container}}": { + "auto_restart": "disabled", + "high_mem_alert": "disabled" + }{% if not loop.last %},{% endif -%} +{% endfor %} } } From 815fa516b24a611d83c9404e78d2d45d8b5faea8 Mon Sep 17 00:00:00 2001 From: Yong Zhao Date: Mon, 10 Feb 2020 16:30:47 -0800 Subject: [PATCH 4/6] [init_cfg.json] Add a new table FEATURE. Signed-off-by: Yong Zhao --- files/build_templates/init_cfg.json.j2 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/files/build_templates/init_cfg.json.j2 b/files/build_templates/init_cfg.json.j2 index 96b65b24e430..bdfc2fdcd23c 100644 --- a/files/build_templates/init_cfg.json.j2 +++ b/files/build_templates/init_cfg.json.j2 @@ -17,6 +17,13 @@ {% endfor %} } }, + "Feature": { +{%- for feature in ["sflow", "telemetry"] %} + "{{feature}}": { + "status": "disabled" + }{% if not loop.last %},{% endif -%} +{% endfor %} + }, "CONTAINER_FEATURE": { {%- for container in ["teamd", "swss", "syncd", "pmon", "lldp", "bgp", "dhcp-relay", "radv", "sflow", "snmp", "telemetry", "database"] %} From cac0cf5ac54eaebc12e08a30d8611388fde31cfe Mon Sep 17 00:00:00 2001 From: Yong Zhao Date: Mon, 10 Feb 2020 18:17:35 -0800 Subject: [PATCH 5/6] [init_cfg.json] Change the order of container names according to alphabetical order. Signed-off-by: Yong Zhao --- files/build_templates/init_cfg.json.j2 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/files/build_templates/init_cfg.json.j2 b/files/build_templates/init_cfg.json.j2 index bdfc2fdcd23c..c9cc8537c82a 100644 --- a/files/build_templates/init_cfg.json.j2 +++ b/files/build_templates/init_cfg.json.j2 @@ -17,7 +17,7 @@ {% endfor %} } }, - "Feature": { + "FEATURE": { {%- for feature in ["sflow", "telemetry"] %} "{{feature}}": { "status": "disabled" @@ -25,8 +25,8 @@ {% endfor %} }, "CONTAINER_FEATURE": { -{%- for container in ["teamd", "swss", "syncd", "pmon", "lldp", "bgp", "dhcp-relay", - "radv", "sflow", "snmp", "telemetry", "database"] %} +{%- for container in ["bgp", "database", "dhcp-relay", "lldp", "pmon", "radv", "sflow", + "snmp", "swss", "syncd", "teamd", "telemetry"] %} "{{container}}": { "auto_restart": "disabled", "high_mem_alert": "disabled" From 5691dbb6ee9d6bafd92770d361df4c629d498810 Mon Sep 17 00:00:00 2001 From: Yong Zhao Date: Mon, 10 Feb 2020 23:10:04 -0800 Subject: [PATCH 6/6] [init_cfg.json] Change the dhcp_relay container name and add rest-api. Signed-off-by: Yong Zhao --- files/build_templates/init_cfg.json.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/build_templates/init_cfg.json.j2 b/files/build_templates/init_cfg.json.j2 index c9cc8537c82a..bc2eff3ede56 100644 --- a/files/build_templates/init_cfg.json.j2 +++ b/files/build_templates/init_cfg.json.j2 @@ -25,7 +25,7 @@ {% endfor %} }, "CONTAINER_FEATURE": { -{%- for container in ["bgp", "database", "dhcp-relay", "lldp", "pmon", "radv", "sflow", +{%- for container in ["bgp", "database", "dhcp_relay", "lldp", "pmon", "radv", "rest-api", "sflow", "snmp", "swss", "syncd", "teamd", "telemetry"] %} "{{container}}": { "auto_restart": "disabled",