[services] Ensure swss and syncd services start before dependent services#2634
Merged
lguohan merged 3 commits intosonic-net:masterfrom Mar 2, 2019
jleveque:fix_service_start_order
Merged
[services] Ensure swss and syncd services start before dependent services#2634lguohan merged 3 commits intosonic-net:masterfrom jleveque:fix_service_start_order
lguohan merged 3 commits intosonic-net:masterfrom
jleveque:fix_service_start_order
Conversation
added 2 commits
March 2, 2019 00:58
…in so that services only reference the one script each
lguohan
reviewed
Mar 2, 2019
| Environment=sonic_asic_platform={{ sonic_asic_platform }} | ||
| ExecStart=/usr/local/bin/swss.sh start | ||
| ExecStartPre=/usr/local/bin/swss.sh start | ||
| ExecStart=/usr/local/bin/swss.sh attach |
Contributor
Author
There was a problem hiding this comment.
Discussed offline that we should open a separate PR to change over to docker wait
lguohan
reviewed
Mar 2, 2019
| Environment=sonic_asic_platform={{ sonic_asic_platform }} | ||
| ExecStart=/usr/local/bin/syncd.sh start | ||
| ExecStartPre=/usr/local/bin/syncd.sh start | ||
| ExecStart=/usr/local/bin/syncd.sh attach |
Contributor
Author
There was a problem hiding this comment.
Discussed offline that we should open a separate PR to change over to docker wait
Contributor
|
Made to 201811 branch on 3/6/2019 |
yxieca
pushed a commit
that referenced
this pull request
Mar 7, 2019
…ices (#2634) * [services] Ensure swss and syncd services start before dependent services * Add 'attach' functions to scripts which get installed to /usr/local/bin so that services only reference the one script each * Add 'After=swss.service' to syncd.service
tiantianlv
pushed a commit
to SONIC-DEV/sonic-buildimage
that referenced
this pull request
Apr 10, 2019
…ices (sonic-net#2634) * [services] Ensure swss and syncd services start before dependent services * Add 'attach' functions to scripts which get installed to /usr/local/bin so that services only reference the one script each * Add 'After=swss.service' to syncd.service
tiantianlv
pushed a commit
to SONIC-DEV/sonic-buildimage
that referenced
this pull request
Apr 10, 2019
…ices (sonic-net#2634) * [services] Ensure swss and syncd services start before dependent services * Add 'attach' functions to scripts which get installed to /usr/local/bin so that services only reference the one script each * Add 'After=swss.service' to syncd.service
tiantianlv
pushed a commit
to SONIC-DEV/sonic-buildimage
that referenced
this pull request
Apr 10, 2019
…ices (sonic-net#2634) * [services] Ensure swss and syncd services start before dependent services * Add 'attach' functions to scripts which get installed to /usr/local/bin so that services only reference the one script each * Add 'After=swss.service' to syncd.service
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
- What I did
- How I did it
With the previous solution, systemd would start dependent services simultaneously with swss and syncd. Due to the extra overhead in the swss.sh file, this would cause dependent containers (dhcp_relay, radv, etc.) to get started before swss.
Moving the
/usr/local/bin/syncd.sh startcall toExecStartPreand moving the/usr/bin/syncd.sh attachfrom out of that script and assigning as theExecStartcommand fixes this issue.- How to verify it
Call
systemctl restart swssand ensure containers stop and start in proper order as defined in systemd service files.