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

"DEVICE_METADATA" - "bgp_asn" support #9739

Closed
qiluo-msft opened this issue Jan 12, 2022 · 2 comments · Fixed by #12588
Closed

"DEVICE_METADATA" - "bgp_asn" support #9739

qiluo-msft opened this issue Jan 12, 2022 · 2 comments · Fixed by #12588
Assignees
Labels
Triaged this issue has been triaged

Comments

@qiluo-msft
Copy link
Collaborator

My understanding of currently SONiC behaviors:

  1. supporting missing "DEVICE_METADATA" - "bgp_asn"
  2. supporting "DEVICE_METADATA" - "bgp_asn" with a value "None"
    • The case appears if /etc/sonic/minigraph.xml miss
    • /etc/frr/bgpd.conf will have a router bgp None line, which is not valid
  3. supporting "DEVICE_METADATA" - "bgp_asn" with a int value
    • The normal L3 switch config

So right now, we need to fix sonic-device_metadata.yang to support above behaviors. In future, ideally we need to improve the first 2 cases, let /etc/frr/bgpd.conf handles them gracefully.

Originally posted by @qiluo-msft in #9640 (comment)

@qiluo-msft qiluo-msft changed the title My understanding of currently SONiC behaviors: "DEVICE_METADATA" - "bgp_asn" support Jan 12, 2022
@qiluo-msft
Copy link
Collaborator Author

@arlakshm @shi-su Could you help check?

@qiluo-msft qiluo-msft added the YANG YANG model related changes label Jan 12, 2022
@zhangyanzhao zhangyanzhao added Triaged this issue has been triaged and removed YANG YANG model related changes labels Jan 20, 2022
@zhangyanzhao zhangyanzhao assigned qiluo-msft and unassigned shi-su Sep 8, 2022
@zhangyanzhao
Copy link
Collaborator

Qi is working with Arvind on this

lguohan pushed a commit that referenced this issue Nov 9, 2022
…sing. (#12588)

bgpd.main.conf.j2: bugfix-9739
* Update bgpd.main.conf.j2 to gracefully handle the bgp configuration cases for when 'bgp_asn' is set to 'None', 'Null', or missing.

How I did it
Include a conditional statement to avoid configuring bgp in FRR when 'bgp_asn' is missing or set to 'None' or 'Null'

How to verify it
Configure 'bgp_asn' as 'None', 'Null' or have it missing from configurations and verify that /etc/frr/bgpd.conf does not have invalid bgp configurations like 'router bgp None'

Description for the changelog
Update bgpd.main.conf.j2 to gracefully handle the bgp configuration cases for when 'bgp_asn' is set to 'None', 'Null', or missing for bugfix 9739.

Signed-off-by: [email protected]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Triaged this issue has been triaged
Projects
None yet
3 participants