Update load_minigraph to disable unnecessary services (bgp, lldp...) for fabric asic #1493
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.
Fabric asics do not need some services like bgp, lldp, teamd.
They just need database, swss, and syncd running.
Signed-off-by: ngocdo ngocdo@arista.com
What I did
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.hostcfg will act on that change and disable the services. This is done in another PR at
sonic-buildimage
,which is sonic-net/sonic-buildimage#7026.
How to verify it
Tested on our systems with NPU and fabrics.
Previous command output (if the output of a command-line utility has changed)
New command output (if the output of a command-line utility has changed)