From b9b60454583d0cecb7b36f949fc0bb5cd1dfc906 Mon Sep 17 00:00:00 2001 From: Shuotian Cheng Date: Wed, 16 Nov 2016 13:29:44 -0800 Subject: [PATCH] systemd: Move flushall command temporarily to syncd.service file This change works as for now syncd doesn't fully support restart from the point when the database is not flushed due to SAI implementation is not fully implemented. Later when the syncd supports, we could remove this line. --- ansible/roles/sonicv2/templates/etc/systemd/system/orchagent.j2 | 1 - ansible/roles/sonicv2/templates/etc/systemd/system/syncd.j2 | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/roles/sonicv2/templates/etc/systemd/system/orchagent.j2 b/ansible/roles/sonicv2/templates/etc/systemd/system/orchagent.j2 index 5bd8c68eee0..e60cefaf641 100644 --- a/ansible/roles/sonicv2/templates/etc/systemd/system/orchagent.j2 +++ b/ansible/roles/sonicv2/templates/etc/systemd/system/orchagent.j2 @@ -8,7 +8,6 @@ User={{ sonicadmin_user }} ExecStart=/usr/bin/docker start -a orchagent ExecStop=/usr/bin/docker stop orchagent ExecStopPost=/usr/bin/docker stop syncd -ExecStopPost=/usr/bin/docker exec database redis-cli FLUSHALL [Install] WantedBy=multi-user.target diff --git a/ansible/roles/sonicv2/templates/etc/systemd/system/syncd.j2 b/ansible/roles/sonicv2/templates/etc/systemd/system/syncd.j2 index a59e23c2b4a..136c4fb1a9c 100644 --- a/ansible/roles/sonicv2/templates/etc/systemd/system/syncd.j2 +++ b/ansible/roles/sonicv2/templates/etc/systemd/system/syncd.j2 @@ -9,6 +9,7 @@ User=root ExecStartPre=/etc/init.d/sxdkernel start ExecStartPre=/usr/bin/mst start {% endif %} +ExecStartPre=/usr/bin/docker exec database redis-cli FLUSHALL ExecStart=/usr/bin/docker start -a syncd ExecStop=/usr/bin/docker stop syncd {% if sonic_hwsku == 'ACS-MSN2700' %}