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

[action] [PR:9842] Fix dual-tor dhcpv6 relay test cases failure in latest image #9941

Merged
merged 1 commit into from
Sep 12, 2023

Conversation

mssonicbld
Copy link
Collaborator

Description of PR

Fix test_dhcpv6_relay.py case test_dhcp_relay_default and test_dhcpv6_relay_counter failure on dualtor.
The issue is test gap after code commit of sonic-net/sonic-dhcp-relay#42 in master
and sonic-net/sonic-dhcp-relay#40 in 202012.

Summary:
Fixes # (issue)

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Back port request

  • 201911
  • 202012
  • 202205

Approach

What is the motivation for this PR?

Fix test_dhcpv6_relay.py case test_dhcp_relay_default and test_dhcpv6_relay_counter failure on dualtor.

  1. Based on latest dhcprelay code, dhcpv6 relay will use loopback0 ipv6 address as source ip when relay packets to server.
    So test case need modify to send Relay-Reply to loopback0 ipv6 address.
  2. Improve test case behavior, enable source ipv6 check during test
  3. remove unused option order sequence related test code
  4. check loopback0 Relay-Reply counter in dualtor instead of vlan interface counter
  5. change DUID LLT to LL, since LLT is different based on different timestamp during test which may cause packet comparation failure

Note for future code change:

  1. Relay interface should always means Vlan interfaces
  2. Loopback interface used in dual tor only, interface id option is enabled by default in dual tor case (for the consideration of second level relay agent case which has zero link address and we need use interface id for downlink interface selection)
  3. Uplink interface mac should be server response dest mac
  4. Relay-Forward source ipv6 address (Single Tor: vlan ipv6 address, Dual Tor: loopback ipv6 address), dest ipv6 address is server address
  5. Relay-Reply source ipv6 address is server address, destination ipv6 address is same as Relay-Forward source ipv6 address

How did you do it?

run dhcp_relay/test_dhcpv6_relay.py

How did you verify/test it?

Test case pass on dual tor and single tor

Any platform specific information?

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

Documentation

@mssonicbld
Copy link
Collaborator Author

Original PR: #9842

@mssonicbld
Copy link
Collaborator Author

/azp run Azure.sonic-mgmt

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld mssonicbld merged commit ba8953c into sonic-net:202305 Sep 12, 2023
@mssonicbld mssonicbld deleted the cherry/202305/9842 branch February 4, 2024 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants