Skip to content

frr bgp conf template handling switch_type == voq#24158

Merged
rlhui merged 1 commit intosonic-net:masterfrom
saravanan-nexthop:saravanan.voqbgpconf
Nov 21, 2025
Merged

frr bgp conf template handling switch_type == voq#24158
rlhui merged 1 commit intosonic-net:masterfrom
saravanan-nexthop:saravanan.voqbgpconf

Conversation

@saravanan-nexthop
Copy link
Copy Markdown
Contributor

@saravanan-nexthop saravanan-nexthop commented Sep 30, 2025

  1. when switch_type is voq, it could either be a single asic or multi-asic or even a voq_chassis
    bgpd.main.conf.j2 needs to handle the single asic case differently than the multi-asic or voq_chassis.
    Looks like DEVICE_METADATA doesn't have any chassisdb specific field.
    Hence we are using file_exists check for /usr/share/sonic/platform/chassisdb.conf to confirm voq_chassis.

The unit tests in bgpcfg/tests for chassis cannot pass the file_exists
check. Hence use the chassisdb_conf_present flag in DEVICE_METADATA for that
2. When assigning the loopback0 address, handle the single asic voq case.

Why I did it

  1. when switch_type is voq, it could either be a single asic or multi-asic or even a voq_chassis
    bgpd.main.conf.j2 needs to handle the single asic voq case differently than the multi-asic or voq_chassis.
  2. When assigning the loopback0 address, handle the single asic voq case.
Work item tracking
  • Microsoft ADO (number only):

How I did it

Modifying bgpd.main.conf.j2 and peer-group.conf.j2. Also modified the related test files

How to verify it

Verified sonic-mgmt bgp tests are passing on single asic voq sku
Also verified the sonic-bgpcfgd/tests' unit tests pass

Which release branch to backport (provide reason below if selected)

  • 202205
  • 202211
  • 202305
  • 202311
  • 202405
  • 202411
  • 202505

Tested branch (Please provide the tested image version)

Description for the changelog

Link to config_db schema for YANG module changes

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

@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla bot commented Sep 30, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: saravanan-nexthop / name: saravanan sellappa (d025650)

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@rlhui rlhui added the P0 Priority of the issue label Oct 22, 2025
@rlhui rlhui requested a review from saksarav-nokia October 22, 2025 17:59
when switch_type is voq, it could either be a single asic or multi-asic
or even a voq_chassis
bgpd.main.conf.j2 needs to handle the single asic case differently than
the multi-asic or voq_chassis.
A new filter file_exists is now used within j2 files to look for
chasssisdb.conf and determine if its a voq_chassis
Incase of unit test, the test just runs with a json file only. Hence
using a chassisdb_conf_present in it to represent the chassis case

When assigning the loopback0 address, handle the single asic voq case.
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@tjchadaga
Copy link
Copy Markdown
Contributor

/azpw run

@mssonicbld
Copy link
Copy Markdown
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@tjchadaga
Copy link
Copy Markdown
Contributor

/azpw ms_conflict

@arlakshm
Copy link
Copy Markdown
Contributor

/azpw ms_conflict

@tjchadaga
Copy link
Copy Markdown
Contributor

/azpw ms_conflict

1 similar comment
@tjchadaga
Copy link
Copy Markdown
Contributor

/azpw ms_conflict

@rlhui rlhui merged commit ff937d3 into sonic-net:master Nov 21, 2025
22 checks passed
ashutosh-agrawal pushed a commit to AnantKishorSharma/sonic-buildimage that referenced this pull request Nov 30, 2025
when switch_type is voq, it could either be a single asic or multi-asic
or even a voq_chassis
bgpd.main.conf.j2 needs to handle the single asic case differently than
the multi-asic or voq_chassis.
A new filter file_exists is now used within j2 files to look for
chasssisdb.conf and determine if its a voq_chassis
Incase of unit test, the test just runs with a json file only. Hence
using a chassisdb_conf_present in it to represent the chassis case

When assigning the loopback0 address, handle the single asic voq case.
hdwhdw pushed a commit to hdwhdw/sonic-buildimage that referenced this pull request Dec 2, 2025
when switch_type is voq, it could either be a single asic or multi-asic
or even a voq_chassis
bgpd.main.conf.j2 needs to handle the single asic case differently than
the multi-asic or voq_chassis.
A new filter file_exists is now used within j2 files to look for
chasssisdb.conf and determine if its a voq_chassis
Incase of unit test, the test just runs with a json file only. Hence
using a chassisdb_conf_present in it to represent the chassis case

When assigning the loopback0 address, handle the single asic voq case.
NavdhaJindal pushed a commit to NavdhaJindal/sonic-buildimage that referenced this pull request Dec 2, 2025
when switch_type is voq, it could either be a single asic or multi-asic
or even a voq_chassis
bgpd.main.conf.j2 needs to handle the single asic case differently than
the multi-asic or voq_chassis.
A new filter file_exists is now used within j2 files to look for
chasssisdb.conf and determine if its a voq_chassis
Incase of unit test, the test just runs with a json file only. Hence
using a chassisdb_conf_present in it to represent the chassis case

When assigning the loopback0 address, handle the single asic voq case.

Signed-off-by: Navdha Jindal <navdhajindal@microsoft.com>
@mssonicbld
Copy link
Copy Markdown
Collaborator

Cherry-pick PR to 202511: #24703

FengPan-Frank pushed a commit to FengPan-Frank/sonic-buildimage that referenced this pull request Dec 4, 2025
when switch_type is voq, it could either be a single asic or multi-asic
or even a voq_chassis
bgpd.main.conf.j2 needs to handle the single asic case differently than
the multi-asic or voq_chassis.
A new filter file_exists is now used within j2 files to look for
chasssisdb.conf and determine if its a voq_chassis
Incase of unit test, the test just runs with a json file only. Hence
using a chassisdb_conf_present in it to represent the chassis case

When assigning the loopback0 address, handle the single asic voq case.

Signed-off-by: Feng Pan <fenpan@microsoft.com>
@mssonicbld
Copy link
Copy Markdown
Collaborator

@saravanan-nexthop cherry pick PR didn't pass PR checker. Please check!!!
#24703

4 similar comments
@mssonicbld
Copy link
Copy Markdown
Collaborator

@saravanan-nexthop cherry pick PR didn't pass PR checker. Please check!!!
#24703

@mssonicbld
Copy link
Copy Markdown
Collaborator

@saravanan-nexthop cherry pick PR didn't pass PR checker. Please check!!!
#24703

@mssonicbld
Copy link
Copy Markdown
Collaborator

@saravanan-nexthop cherry pick PR didn't pass PR checker. Please check!!!
#24703

@mssonicbld
Copy link
Copy Markdown
Collaborator

@saravanan-nexthop cherry pick PR didn't pass PR checker. Please check!!!
#24703

xwjiang-ms pushed a commit to xwjiang-ms/sonic-buildimage that referenced this pull request Dec 22, 2025
when switch_type is voq, it could either be a single asic or multi-asic
or even a voq_chassis
bgpd.main.conf.j2 needs to handle the single asic case differently than
the multi-asic or voq_chassis.
A new filter file_exists is now used within j2 files to look for
chasssisdb.conf and determine if its a voq_chassis
Incase of unit test, the test just runs with a json file only. Hence
using a chassisdb_conf_present in it to represent the chassis case

When assigning the loopback0 address, handle the single asic voq case.

Signed-off-by: xiaweijiang <xiaweijiang@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

8 participants