-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[hostcfgd] Delay hostcfgd and aaastatsd for faster boot time (#7965)
#### Why I did it hostcfgd is starting at the same time as 'create_switch' method is called on orchagent process. This introduce a degradation on the function execution time which eventually cause the fast-boot flow and a boot scenarion in general to run slower (~6 seconds). This change will delay the start time of this daemon. The aaastatsd will delay as well since it has a dependency on hostcfgd, so it is required to delay both. 90 seconds determined as the maximum allowed downtime for control plane to come back up on fast-boot flow. #### How I did it Add two timers for hostcfgd and aaastatsd services in order to delay the startup of these services. #### How to verify it Install an image with this change and observe the daemons start 90 seconds after the system boot.
- Loading branch information
1 parent
fff1756
commit 76d5223
Showing
4 changed files
with
22 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,3 @@ Restart=on-failure | |
RestartSec=10 | ||
TimeoutStopSec=3 | ||
|
||
[Install] | ||
WantedBy=sonic.target | ||
|
11 changes: 11 additions & 0 deletions
11
src/sonic-host-services-data/debian/sonic-host-services-data.aaastatsd.timer
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[Unit] | ||
Description=Delays aaastatsd daemon until SONiC has started | ||
PartOf=aaastatsd.service | ||
|
||
[Timer] | ||
OnActiveSec=1min 30 sec | ||
Unit=aaastatsd.service | ||
|
||
[Install] | ||
WantedBy=timers.target sonic.target | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,3 @@ After=sonic.target | |
Type=simple | ||
ExecStart=/usr/local/bin/hostcfgd | ||
|
||
[Install] | ||
WantedBy=sonic.target | ||
|
11 changes: 11 additions & 0 deletions
11
src/sonic-host-services-data/debian/sonic-host-services-data.hostcfgd.timer
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[Unit] | ||
Description=Delays hostcfgd daemon until SONiC has started | ||
PartOf=hostcfgd.service | ||
|
||
[Timer] | ||
OnActiveSec=1min 30 sec | ||
Unit=hostcfgd.service | ||
|
||
[Install] | ||
WantedBy=timers.target sonic.target | ||
|