-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[services] Ensure swss and syncd services start before dependent services #2634
Conversation
…in so that services only reference the one script each
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@@ -13,7 +13,8 @@ Before=ntp-config.service | |||
[Service] | |||
User=root | |||
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use wait
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussed offline that we should open a separate PR to change over to docker wait
Before=ntp-config.service | ||
|
||
[Service] | ||
User=root | ||
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use wait
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussed offline that we should open a separate PR to change over to docker wait
Made to 201811 branch on 3/6/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
…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
…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
…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
- 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 start
call toExecStartPre
and moving the/usr/bin/syncd.sh attach
from out of that script and assigning as theExecStart
command fixes this issue.- How to verify it
Call
systemctl restart swss
and ensure containers stop and start in proper order as defined in systemd service files.