Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ansible/roles/sonicv2/templates/etc/systemd/system/swss.j2
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ After=database.service

[Service]
User={{ sonicadmin_user }}
# Wait for redis server start before database clean
ExecStartPre=/bin/bash -c "while true; do if [ \"$(/usr/bin/docker exec database redis-cli ping)\" == \"PONG\" ]; then break; fi; sleep 1; done"
ExecStartPre=/usr/bin/docker exec database redis-cli -n 0 FLUSHDB
ExecStartPre=/usr/bin/docker exec database redis-cli -n 1 FLUSHDB
ExecStartPre=/usr/bin/docker exec database redis-cli -n 2 FLUSHDB
Expand Down
4 changes: 2 additions & 2 deletions ansible/roles/sonicv2/templates/etc/systemd/system/syncd.j2
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[Unit]
Description=syncd container
Requires=database.service
After=database.service
Requires=database.service swss.service
After=database.service swss.service
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

syncd is not depending on swss
and syncd should start before swss
@vitaliy-senchyshyn @lguohan

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

swss depends on syncd and swss starts after syncd

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

swss.service is clearing the database

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok I will give a test on this


[Service]
User=root
Expand Down