Skip to content
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

Update hostcfgd to disable unused services for fabric asics #7026

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ngoc-do
Copy link
Contributor

@ngoc-do ngoc-do commented Mar 11, 2021

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 in CONFIG_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 to FEATURE's services that we want to disable for fabric asics. For example, bgp@4.service and bgp@5.service will be disabled.

    "FEATURE": {
        "bgp": {
            "state": "enabled",
            "has_timer": "False",
            "has_global_scope": "False",
            "has_per_asic_scope": "True",
            "always_disabled_on_asics": "4,5",
            "auto_restart": "enabled",
            "high_mem_alert": "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)

  • 201811
  • 201911
  • 202006
  • 202012

Description for the changelog

A picture of a cute animal (not mandatory but encouraged)

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.

Signed-off-by: ngocdo <ngocdo@arista.com>
@kenneth-arista
Copy link
Contributor

@arlakshm we can discard this PR as this was needed for a hardware platform that we are no longer supporting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants