Skip to content

Added Support to runtime render bgp and teamd feature state and lldp has_asic_scope flag#11796

Merged
abdosi merged 35 commits intosonic-net:masterfrom
abdosi:feature_init
Nov 16, 2022
Merged

Added Support to runtime render bgp and teamd feature state and lldp has_asic_scope flag#11796
abdosi merged 35 commits intosonic-net:masterfrom
abdosi:feature_init

Conversation

@abdosi
Copy link
Copy Markdown
Contributor

@abdosi abdosi commented Aug 19, 2022

What I did:
Added Support to runtime render bgp and teamd feature state and lldp has_asic_scope flag

How I did:

Define new runtime metadata dict as define in #11795 which is used for rendering by hostcfgd.

  • bgp: Enable Feature if Ethernet ports are present on device and Device is not Chassis supervisor
  • teamd: Enable Feature if Ethernet ports are present on device
  • lldp: Enable Multi-asic scope if Ethernet ports are present on device and Device is not Chassis supervisor

Also in swss.sh only add teamd as Dependent service if Ethernet ports are present on the device.
Same approach can be used for other docker/services as needed.

Hostcfgd modication: sonic-net/sonic-host-services#14

Order of PR merge will be:
#11795
sonic-net/sonic-host-services#14 and Submodule Update of same.
Finally this PR will be merged.

Why I did:
Not to create dockers which are not needed.

How I Verify:
Manual Verification.

abdosi added 23 commits April 3, 2021 01:41
df46ed418e661a9bccdb2639d8873def356f8ba0 (HEAD -> master, origin/master, origin/HEAD) Fix the LLDP_LOC_CHASSIS not getting populated if no remote neighbors are present (sonic-net#39)
e487532e11cc0e97cfce573b6b997fdd0beeb660 [CI] Set up CI&PR with Azure Pipelines (sonic-net#38)
3c9f488490a1dbded20dbf2d8a88a5ab4dbda8df Replace swsssdk's SonicV2Connector with swsscommon's implementation (sonic-net#35)

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
has_asic_scope flag.

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
@abdosi
Copy link
Copy Markdown
Contributor Author

abdosi commented Nov 6, 2022

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@abdosi
Copy link
Copy Markdown
Contributor Author

abdosi commented Nov 11, 2022

@mlok-nokia : Can you please approve this.

@abdosi
Copy link
Copy Markdown
Contributor Author

abdosi commented Nov 11, 2022

@arlakshm can you please review this.

{%- if feature in ["lldp"] %}
"has_per_asic_scope": {% raw %}"{% if not DEVICE_RUNTIME_METADATA['ETHERNET_PORTS_PRESENT'] or ('CHASSIS_METADATA' in DEVICE_RUNTIME_METADATA and DEVICE_RUNTIME_METADATA['CHASSIS_METADATA']['module_type'] in ['supervisor']) %}False{% else %}True{% endif %}"{% endraw %},
{%- else %}
"has_per_asic_scope": {% if feature + '@.service' in installer_services.split(' ') %}true{% else %}false{% endif %},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

has_per_asic_scope is changed from boolean_type to string, should we change here too ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@judyjoseph : thanks for the comment and catching this. Updated.

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
@abdosi abdosi merged commit 668485a into sonic-net:master Nov 16, 2022
@abdosi abdosi deleted the feature_init branch November 16, 2022 00:20
@yxieca
Copy link
Copy Markdown
Contributor

yxieca commented Nov 28, 2022

@abdosi this PR cannot be cherry-picked cleanly. Can you raise separate PR for 202205?

abdosi added a commit to abdosi/sonic-buildimage that referenced this pull request Nov 28, 2022
…has_asic_scope flag (sonic-net#11796)

Added Support to runtime render bgp and teamd feature `state` and lldp `has_asic_scope`  flag
Needed for SONiC on chassis.

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
Co-authored-by: mlok <marty.lok@nokia.com>
@abdosi
Copy link
Copy Markdown
Contributor Author

abdosi commented Nov 28, 2022

@yxieca created: #12856

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

[chassis][supervisor] containers bgp, teamd, macsec, asic lldp and radv should not be run on Supervisor cards

4 participants