From 83738fca2f174289d793459fac457391f982748f Mon Sep 17 00:00:00 2001 From: yozhao101 <56170650+yozhao101@users.noreply.github.com> Date: Wed, 15 Jul 2020 11:49:14 -0700 Subject: [PATCH] [dockers] Default container autorestart feature to "enabled" for all except database (#4853) Set the default auto_restart state to "enabled" in init_cfg.json for all containers except database 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 7a0a8d1588..90980fe069 100644 --- a/files/build_templates/init_cfg.json.j2 +++ b/files/build_templates/init_cfg.json.j2 @@ -28,7 +28,7 @@ {%- for container in ["bgp", "database", "dhcp_relay", "lldp", "nat", "pmon", "radv", "restapi", "sflow", "snmp", "swss", "syncd", "teamd", "telemetry"] %} "{{container}}": { - "auto_restart": "disabled", + "auto_restart": "{% if container == "database" %}disabled{% else %}enabled{% endif %}", "high_mem_alert": "disabled" }{% if not loop.last %},{% endif -%} {% endfor %}