Use FEATURE|dhcp_server state for DHCPv4 profile selection#69
Open
Xichen96 wants to merge 1 commit into
Open
Conversation
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Pull request overview
Updates dhcp_devman_init() to select the appropriate DHCPv4 health-check profile based on the device type read from SONiC CONFIG_DB, so that BmcMgmtToRRouter devices use server-oriented checks rather than relay-oriented checks.
Changes:
- Read
DEVICE_METADATA|localhost:typefromCONFIG_DBduring initialization and validate it containsToRRouter. - Select DHCPv4 server check profiles for
BmcMgmtToRRouter; otherwise default to first-relay profiles. - Minor syslog message tweak for DHCPv6 check profile selection.
Collaborator
|
/azp run |
|
Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command. |
36a060c to
b4267aa
Compare
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
1126cfe to
23d406c
Compare
Collaborator
|
/azp run |
23d406c to
1607f49
Compare
|
Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command. |
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
…in CONFIG_DB Read FEATURE|dhcp_server state from CONFIG_DB. If enabled, use server check profiles; otherwise use first relay profiles. DHCPv6 always uses relay profiles since dhcpmon only runs inside the dhcp_relay container. Signed-off-by: Xichen Lin <lukelin0907@gmail.com>
1607f49 to
0a6bf3e
Compare
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why I did it
Previously dhcpmon selected the DHCPv4 check profile based on device type
string from DEVICE_METADATA, which was fragile and required maintaining a
mapping of device types to profiles.
How I did it
FEATURE|dhcp_serverstate from CONFIG_DBstate == "enabled", use server check profilesdhcp_relay container
ToRRouterdevice type validation gate (no longer needed)How to verify it
to first relay profiles"
"Set dhcp_check_profile to server profiles"