-
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] Move hostcfgd back to ConfigDBConnector for subscribing to…
… updates (#10168) #### Why I did it As of sonic-net/sonic-swss-common#587 the blackout issue in ConfigDBConnector has been resolved. In the past hostcfgd was refactored to use SubscriberStateTable instead of ConfigDBConnector for subscribing to CONFIG_DB updates due to a "blackout" period between hostcfgd pulling the table data down and running the initialization and actually calling `listen()` on ConfigDBConnector which starts the update handler. However SusbscriberStateTable creates many file descriptors against the redis DB which is inefficient compared to ConfigDBConnector which only opens a single file descriptor. With the new fix to ConfigDBConnector I refactored hostcfgd to take advantage of these updates. #### How I did it Replaced SubscriberStateTable with ConfigDBConnector #### How to verify it The functionality of hostcfgd can be verified by booting the switch and verifying that NTP is properly configured. To check the blackout period you can add a delay in the hostcfgd `load()` function and also add a print statement before and after the load so you know when it occurs. Then restart hostcfgd and wait for the load to start, then during the load push a partial change to the FEATURE table and verify that the change is picked up and the feature is enabled after the load period finishes. #### Description for the changelog [hostcfgd] Move hostcfgd back to ConfigDBConnector for subscribing to updates
- Loading branch information
1 parent
f311947
commit 47db2b2
Showing
5 changed files
with
100 additions
and
176 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
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
Oops, something went wrong.