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

[dhcp_server] Fix the issue with "kea-dhcp4.conf" file generation for Smart Switch. #28

Closed
wants to merge 1 commit into from

Conversation

oleksandrivantsiv
Copy link
Owner

@oleksandrivantsiv oleksandrivantsiv commented Jun 1, 2024

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.

"subnet4": [
        {
            "id": bridge-midplane,
            "subnet": "169.254.200.0/24",
            "pools": [
                {
                    "pool": "169.254.200.1 - 169.254.200.1",
                    "client-class": "sonic:dpu0"
                },
...
Work item tracking
  • Microsoft ADO (number only):

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)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211
  • 202305

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)

subnet_obj = {
"id": dhcp_interface_name.replace("Vlan", ""),
"id": 0 if smart_switch else dhcp_interface_name.replace("Vlan", ""),
Copy link

Choose a reason for hiding this comment

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

Can you provide a description on why this change is needed?

Copy link
Owner Author

Choose a reason for hiding this comment

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

updated PR description

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants