-
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
[dhcp_server] Fix the issue with "kea-dhcp4.conf" file generation for Smart Switch. #19200
Conversation
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.
Thanks for fix!
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.
Hold on...
This change for setting subnet id is for support lease update (From kea-lease file to state_db)
dhcp_lease.py#L123
If this part doesn't corresponding support, lease information will be incorrect for smart swith..
Example:
In state_db, key would be stored like "DHCP_SERVER_IPV4_LEASE|Vlan0|aa:bb:cc:dd:ee:ff"
Could you add correspond support in it?
We can check add flag indicate whether it's smart switch via is_smart_switch in KeaDhcp4LeaseHandler-init and construct redis key by the flag in here dhcp_lease.py#L123
(Just my suggestion, if you have any other insights, please feel free to point out)
Implement dhcp lease test for Smart Switch.
@yaqiangz I updated the implementation. Please check. |
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.
LGTM
@yxieca Could you please help to merge this PR? |
@yxieca kindly reminder. Can you please merge the PR? |
Hi @yxieca could you please help to merge this PR? |
1 similar comment
Hi @yxieca could you please help to merge this PR? |
Hi @bingwang-ms, could you please help to approve the backport request? |
… Smart Switch. (sonic-net#19200) The configuration generated from the template for the Smart Switch contained incorrect data in the "subnet4:id" field. For regular cases, the subnet ID is deduced from the VLAN name. For the Smart Switch, there is always one subnet, and the ID is set to 0.
Cherry-pick PR to 202405: #19519 |
… Smart Switch. (#19200) The configuration generated from the template for the Smart Switch contained incorrect data in the "subnet4:id" field. For regular cases, the subnet ID is deduced from the VLAN name. For the Smart Switch, there is always one subnet, and the ID is set to 0.
… Smart Switch. (sonic-net#19200) The configuration generated from the template for the Smart Switch contained incorrect data in the "subnet4:id" field. For regular cases, the subnet ID is deduced from the VLAN name. For the Smart Switch, there is always one subnet, and the ID is set to 0.
… Smart Switch. (sonic-net#19200) The configuration generated from the template for the Smart Switch contained incorrect data in the "subnet4:id" field. For regular cases, the subnet ID is deduced from the VLAN name. For the Smart Switch, there is always one subnet, and the ID is set to 0.
Why I did it
The configuration generated from the template for the Smart Switch contained incorrect data in the "subnet4:id" field. For regular cases, the subnet ID is deduced from the VLAN name. For the Smart Switch, there is always one subnet, and the ID is set to 0.
Work item tracking
How I did it
Fix configuration generation for Smart Switch device.
How to verify it
Which release branch to backport (provide reason below if selected)
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)