-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[yang] interface: add missing mac_addr leaf #20968
base: master
Are you sure you want to change the base?
Conversation
fc17991
to
546e620
Compare
test failures are unrelated to this PR |
/AzurePipelines run Azure.sonic-buildimage |
Commenter does not have sufficient privileges for PR 20968 in repo sonic-net/sonic-buildimage |
546e620
to
1189d4b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add this config to sample_config_db.json as well us update the schema in Configuration.md?
In addition can you please add a test case covering MAC address with capital hex letters to see if it pass?
b4110ed
to
1189d4b
Compare
@dgsudharsan I guess I'll need to break out an INTERFACE section since such a thing doesn't exist in the current docs and try to migrate the other info into there. |
@dgsudharsan ready for review |
@bradh352 I think there is some problem with the diff in configuration.md. Due to formatting, it is showing a huge diff which will be very hard to manage especially when we plan to cherry-pick changes to different branches. Can you please ensure the diff shows only the changed content? |
@dgsudharsan I thought you might say that. I'm really frustrated with the markdown format used (inconsistently and incorrectly) in that doc, so I fixed a lot of it. It was worth a shot to clean it up and actually make, say, the Table of Contents links actually work. Oh well. I'll revert that stuff and just keep the changes relevant to this PR. |
2071a09
to
58be623
Compare
@dgsudharsan hopefully that's acceptable now, please review |
found a couple minor bugs, one unexpected as I didn't realize the double-conversion flow for the sample db. those should be corrected now. |
cd86d4d
to
5d30305
Compare
@dgsudharsan I moved the most important parts of my markdown cleanup into PR #21072 it would be great if that could be merged. I provided the links to render mine vs original, you'll see the table of contents works on mine. |
5d30305
to
40bdd5e
Compare
rebased to force rebuild to see if build general sonic CI build/test issues have been resolved |
@dgsudharsan @qiluo-msft please merge |
40bdd5e
to
7530299
Compare
/azp run Azure.sonic-buildimage |
This isn't adding a feature for mac addresses, just letting YANG know about something that already exists. Also, the use case for setting mac addresses is for pure layer3 environments (e.g. VXLAN EVPN - BGP). If you have 2 switches wired together with dual ports (for redundancy), you need each port to have a different mac address otherwise you have mac conflicts. At least on my Trident3 switches, every port defaults to the same system-wide mac address. So it is necessary. |
Is it good to support from now for mac_address? Do we need to backport? It will break YANG validation if we add mac_address in INTERFACE for the past releases. |
not sure how it would break yang validation, if someone is using mac_addr currently they aren't doing any yang validation at all since yang would reject. But I don't honestly care if its backported or not. |
@@ -123,6 +123,10 @@ module sonic-vlan { | |||
default disable; | |||
} | |||
|
|||
leaf mac_addr { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be an optional field.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't have the mandatory true;
attribute and also doesn't have a default value .... so it is therefore optional as far as I am aware.
What am I missing here?
mac_addr support was added in the INTERFACES table by sonic-net/sonic-swss#814 in 2020 but the YANG models were never updated to reflect that change. Signed-off-by: Brad House (@bradh352)
mac_addr support was added in the INTERFACES table by sonic-net/sonic-swss#814 in 2020 but the YANG models were never updated to reflect that change. Signed-off-by: Brad House (@bradh352)
mac_addr support was added in the INTERFACES table by sonic-net/sonic-swss#814 in 2020 but the YANG models were never updated to reflect that change. Signed-off-by: Brad House (@bradh352)
mac_addr support was added in the INTERFACES table by sonic-net/sonic-swss#814 in 2020 but the YANG models were never updated to reflect that change. Signed-off-by: Brad House (@bradh352)
mac_addr support was added in the INTERFACES table by sonic-net/sonic-swss#814 in 2020 but the YANG models were never updated to reflect that change. Signed-off-by: Brad House (@bradh352)
mac_addr support was added in the INTERFACES table by sonic-net/sonic-swss#814 in 2020 but the YANG models were never updated to reflect that change. Signed-off-by: Brad House (@bradh352)
mac_addr support was added in the INTERFACES table by sonic-net/sonic-swss#814 in 2020 but the YANG models were never updated to reflect that change. Signed-off-by: Brad House (@bradh352)
mac_addr support was added in the INTERFACES table by sonic-net/sonic-swss#814 in 2020 but the YANG models were never updated to reflect that change. Signed-off-by: Brad House (@bradh352)
mac_addr support was added in the INTERFACES table by sonic-net/sonic-swss#814 in 2020 but the YANG models were never updated to reflect that change. Signed-off-by: Brad House (@bradh352)
mac_addr support was added in the INTERFACES table by sonic-net/sonic-swss#814 in 2020 but the YANG models were never updated to reflect that change. Signed-off-by: Brad House (@bradh352)
mac_addr support was added in the INTERFACES table by sonic-net/sonic-swss#814 in 2020 but the YANG models were never updated to reflect that change. Signed-off-by: Brad House (@bradh352)
mac_addr support was added in the INTERFACES table by sonic-net/sonic-swss#814 in 2020 but the YANG models were never updated to reflect that change. Signed-off-by: Brad House (@bradh352)
mac_addr support was added in the INTERFACES table by sonic-net/sonic-swss#814 in 2020 but the YANG models were never updated to reflect that change. Signed-off-by: Brad House (@bradh352)
mac_addr support was added in the INTERFACES table by sonic-net/sonic-swss#814 in 2020 but the YANG models were never updated to reflect that change. Signed-off-by: Brad House (@bradh352)
mac_addr support was added in the INTERFACES table by sonic-net/sonic-swss#814 in 2020 but the YANG models were never updated to reflect that change. Signed-off-by: Brad House (@bradh352)
mac_addr support was added in the INTERFACES table by sonic-net/sonic-swss#814 in 2020 but the YANG models were never updated to reflect that change. Signed-off-by: Brad House (@bradh352)
mac_addr support was added in the INTERFACES table by sonic-net/sonic-swss#814 in 2020 but the YANG models were never updated to reflect that change. Signed-off-by: Brad House (@bradh352)
48b4dee
to
7a2a4e0
Compare
/azp run Azure.sonic-buildimage |
Azure Pipelines successfully started running 1 pipeline(s). |
mac_addr support was added in the INTERFACES table by sonic-net/sonic-swss#814 in 2020 but the YANG models were never updated to reflect that change. Signed-off-by: Brad House (@bradh352)
mac_addr support was added in the INTERFACES table by sonic-net/sonic-swss#814 in 2020 but the YANG models were never updated to reflect that change. Signed-off-by: Brad House (@bradh352)
Why I did it
YANG configuration verification fails during
config replace
.How I did it
mac_addr support was added in the INTERFACE, PORTCHANNEL_INTERFACE, and VLAN_INTERFACE tables by sonic-net/sonic-swss#814 in 2020 but the YANG models were never updated to reflect that change. Updated yang model to reflect change.
How to verify it
Add mac_addr to the various INTERFACE tables then run
config replace
and it succeeds.Work item tracking
Which release branch to backport (provide reason below if selected)
Marked all releases that contained the change.
Tested branch (Please provide the tested image version)
master as of 20241109
Description for the changelog
YANG INTERFACE: add missing mac_addr leaf
Link to config_db schema for YANG module changes
There is no actual INTERFACE section in the docs (there probably should be).
A picture of a cute animal (not mandatory but encouraged)
Fixes #14253
Signed-off-by: Brad House (@bradh352)