Skip to content

Conversation

@yaqiangz
Copy link
Contributor

@yaqiangz yaqiangz commented Jan 6, 2025

Manually cherry-pick below PRs:

#51 Clear counter when dhcp6relay init
#52 Add wait and check ip address check when dhcp6relay init

Why I did it
When dhcp6relay startup, it would clear and reset the counter in DHCP_RELAY table, and it would cause that counter data of deleted Vlan wouldn't be clear.

How I did it
Clear all counter when dhcp6relay init

How I verify it
UT
Install new dhcp6relay in testbed
Why I did it
There is wait in wait_for_intf.sh inside dhcp_relay container wait_for_intf.sh.j2 to wait all vlans' ipv6 link local address to be ready. Only after that, related dhcp relay processes could be started (i.e. dhcrelay, dhcp6relay, dhcpmon)
If ipv6 link local address for one vlan is not ready, it would block all vlans' dhcpv4 and dhcpv6 relay, which is unexpected.

Work item tracking
Microsoft ADO (number only): 30491632

How I did it
Add wait LLA in dhcp6relay process with crrent PR
Add libevent timer to periodicly check LLA and initialization for no-ready Vlan, after they are all ready, delete the timer.
With this change, dhcp6relay would only wait vlans whose LLA are not ready, and vlans whose LLA are ready would not be blocked.

Remove wait logic in wait script by this PR: [dhcp_relay] Remove wait LLA in wati_for_intf.sh in dhcp_relay container sonic-buildimage#21182

How to verify it
Install new dhcp6relay, and run below test:

In 2 Vlans scenraio (Vlan1000 and Vlan2000), remove lla for Vlan2000, then restart dhcp6relay. Then dhcp6relay successfully bind 547 for Vlan1000. After adding lla back for Vlan2000, we can see dhcp6relay successfully bind 547 for Vlan2000.
With new dhcp6relay, run dhcpv6_relay tests and all passed https://github.com/sonic-net/sonic-mgmt/blob/master/tests/dhcp_relay/test_dhcpv6_relay.py
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants