Skip to content

[dhcp-server] Match mode address assignment test plan - #28933

Merged
StormLiangMS merged 2 commits into
sonic-net:masterfrom
nishant111:nishant/dhcp-match-testplan
Nov 26, 2026
Merged

StormLiangMS merged 2 commits into
sonic-net:masterfrom
nishant111:nishant/dhcp-match-testplan

Conversation

@nishant111

Copy link
Copy Markdown
Contributor

Description of PR

Summary:
Add a test plan for IPv4 DHCP server MATCH mode, covering Circuit ID (Option 82) and Vendor Class Identifier (Option 60) matching.

The plan defines 43 scenarios covering address assignment, AND/OR matching, specificity and exhaustion, runtime configuration changes, CLI validation, lease clearing, persistence, PORT/MATCH coexistence, and scale.

This PR contains documentation only; automated tests will follow separately.

Related design and implementation:

Executing the planned tests requires an image containing the applicable model, CLI and core implementation changes.

Fixes # (issue): N/A — feature test-plan documentation.

Type of change

Documentation only

  • Bug fix
  • Testbed and Framework(new/improvement)
  • New Test case
    • Skipped for non-supported platforms
  • Test case improvement

Back port request

  • 202311
  • 202405
  • 202411
  • 202505
  • 202511
  • 202512
  • 202605

Tracking issue/work item for backport/cherry-pick request (GitHub issue or Microsoft ADO):
Failure type:

Tested branch

  • master
  • 202311
  • 202405
  • 202411
  • 202505
  • 202511
  • 202512
  • 202605
  • N/A

Test result

Approach

What is the motivation for this PR?

Define end-to-end acceptance and regression coverage for DHCP server MATCH mode before implementing sonic-mgmt tests. The plan complements product unit tests by covering real relay behaviour, packaged Kea, SWSS/State DB synchronization, and lease deletion persistenc

How did you do it?

Reviewed the MATCH HLD, product model/CLI/core changes, and existing DHCP server tests. Organized the coverage into compact scenario tables with expected results, shared setup guidance, and topology requirements.

How did you verify/test it?

na

Any platform specific information?

na

Supported testbed topology if it's a new test case?

na

Documentation

na

Signed-off-by: Nishant Sharma <nshntsharma86@gmail.com>
Copilot AI balanced review requested due to automatic review settings October 30, 2026 01:45
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
1 pipeline(s) were filtered out due to trigger conditions.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

C10 incorrectly expects deletion of a referenced range to skip the entire binding, contradicting the linked implementation and test that retain remaining usable pools.

1 open issue
What changed in this PR

Adds a documentation-only test plan for DHCPv4 MATCH mode, defining acceptance coverage for Circuit ID (Option 82) and Vendor Class Identifier (Option 60) matching in sonic-mgmt. Automated tests will follow separately.

Changes:

  • Defines 43 scenarios covering address assignment, runtime changes, CLI validation, lease clearing, persistence, coexistence and scale.
  • Specifies topology requirements, shared setup, verification and cleanup guidance.
  • Links the design and implementation dependencies and proposes test module locations.
File Description
docs/​testplan/​IPv4-Match-Condition-Based-DHCP-Server-test-plan.md Adds MATCH-mode test scenarios, expected results and testbed guidance.

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 30, 2026 04:02
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
1 pipeline(s) were filtered out due to trigger conditions.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Unresolved test-plan gaps in setup, expected behavior, success criteria, and teardown can produce misleading results or leave the original configuration unrestored.

6 open issues
1 resolved since last review

Review effort: Balanced

Signed-off-by: Nishant Sharma <nshntsharma86@gmail.com>
@nishant111
nishant111 force-pushed the nishant/dhcp-match-testplan branch from 2222432 to 2e6061b Compare November 4, 2026 01:15
Copilot AI balanced review requested due to automatic review settings November 4, 2026 01:15
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
1 pipeline(s) were filtered out due to trigger conditions.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@StormLiangMS

Copy link
Copy Markdown
Collaborator

@nishant111 Reviewed head 2e6061b3ded8ee41456e79aaed1143e3c24cbe22. LGTM as a documentation-only test plan; no blocking document findings. This is not a sign-off on an automated test implementation or DUT results.

The updated plan addresses the earlier feedback on missing-range behavior, independent restoration of running/saved configuration and feature/relay state, runtime prerequisites, persistence lease duration, mode-specific lease-clear setup, and stress expectations requiring correct offers within five seconds.

Optional coverage improvement: add scenarios for the two integration concerns identified in sonic-net/sonic-buildimage#30361:

  • Overlapping IPv4 prefixes on a VLAN: verify CLI acceptance/rejection agrees with compiler subnet selection, and rejected input leaves Config DB unchanged.
  • Updating a more-specific binding while clients are requesting addresses: verify the update never temporarily makes the general fallback pool eligible for those clients.

The Azure.sonic-mgmt pipeline is skipped because no pipeline path filters matched the documentation-only change; it should not be treated as DHCP runtime evidence.

@github-actions github-actions Bot added triage-Cisco PR assigned to Cisco for triage (assign_triage_labels workflow) triage-Microsoft PR assigned to Microsoft for triage (assign_triage_labels workflow) labels Nov 9, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 23, 2026
@mssonicbld
mssonicbld added this pull request to the merge queue Nov 23, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 23, 2026
@mssonicbld
mssonicbld added this pull request to the merge queue Nov 23, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 23, 2026
@mssonicbld
mssonicbld added this pull request to the merge queue Nov 23, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 23, 2026
@mssonicbld
mssonicbld added this pull request to the merge queue Nov 23, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 23, 2026
@mssonicbld
mssonicbld added this pull request to the merge queue Nov 23, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 23, 2026
@mssonicbld
mssonicbld added this pull request to the merge queue Nov 23, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 23, 2026
@mssonicbld
mssonicbld added this pull request to the merge queue Nov 24, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 24, 2026
@mssonicbld
mssonicbld added this pull request to the merge queue Nov 24, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 24, 2026
@mssonicbld
mssonicbld added this pull request to the merge queue Nov 24, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 24, 2026
@mssonicbld
mssonicbld added this pull request to the merge queue Nov 24, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 24, 2026
@StormLiangMS
StormLiangMS added this pull request to the merge queue Nov 24, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 24, 2026
@mssonicbld
mssonicbld added this pull request to the merge queue Nov 24, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 24, 2026
@mssonicbld
mssonicbld added this pull request to the merge queue Nov 24, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 24, 2026
@mssonicbld
mssonicbld added this pull request to the merge queue Nov 24, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 24, 2026
@mssonicbld
mssonicbld added this pull request to the merge queue Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge low merge risk Qualified-approval triage-Cisco PR assigned to Cisco for triage (assign_triage_labels workflow) triage-Microsoft PR assigned to Microsoft for triage (assign_triage_labels workflow)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants