Update hostcfgd to disable unused services for fabric asics #7026
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.
Some services are unnecessary for fabric asics like bgp, lldp, teamd.
We so disable them. But it could be that there are some mixed asics
NPU and fabric in the same system, so we should just disable only
for fabric asics.
This commit is to disable those services only fabric asics. It works together
with sonic-net/sonic-utilities#1493.
Signed-off-by: ngocdo ngocdo@arista.com
Why I did it
Fabric asics do not need some services like bgp, lldp, teamd.
They just need database, swss, and syncd running.
How I did it
I disable them with
FEATURE
flag configured inCONFIG_DB
, which is listened and reacted by hostcfgd.This PR will update
CONFIG_DB's FEATURE
for fabric asics. The update is executed in load_minigraph, and saved to config_db.json. So the update will run only once.If a system has both NPU and fabric, only services running on fabric are disabled. NPU's services are not affected.
One field,
always_disabled_on_asics
is added toFEATURE
's services that we want to disable for fabric asics. For example,bgp@4.service
andbgp@5.service
will be disabled.The above setup is at sonic-net/sonic-utilities#1493.
hostcfg will act on the setup, and disable the services.
How to verify it
Tested on systems with VOQ and fabric asics.
Which release branch to backport (provide reason below if selected)
Description for the changelog
A picture of a cute animal (not mandatory but encouraged)