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

[counter] Clear counter table when dhcp6relay init #45

Merged
merged 1 commit into from
Dec 19, 2023

Conversation

yaqiangz
Copy link
Contributor

@yaqiangz yaqiangz commented Dec 19, 2023

Why I did it

Fix issue sonic-net/sonic-buildimage#15047
dhcpv6 counter didn't restore after config reload

Work item tracking
  • Microsoft ADO (number only): 26065484

How I did it

  1. Clear all counters when dhcp6relay start and add related ut
  2. Remove clear counter in initialize_counter since they are cleared in previous

How to verify it

  1. UT passed
  2. Build debian packet and install in DUT do manually testing
  3. Run dhcp_relay test, all passed
============================= test session starts ==============================
platform linux -- Python 3.8.10, pytest-7.1.3, pluggy-1.2.0
ansible: 2.9.27
rootdir: /var/src/sonic-mgmt-int/tests, configfile: pytest.ini
plugins: html-3.2.0, forked-1.6.0, ansible-3.1.5, xdist-1.28.0, allure-pytest-2.8.22, repeat-0.9.1, metadata-3.0.0
collected 22 items

dhcp_relay/test_dhcp_pkt_fwd.py::TestDhcpPktFwd::testDhcpPacketForwarding[pktInfo0] PASSED [  4%]
dhcp_relay/test_dhcp_pkt_fwd.py::TestDhcpPktFwd::testDhcpPacketForwarding[pktInfo1] PASSED [  9%]
dhcp_relay/test_dhcp_pkt_fwd.py::TestDhcpPktFwd::testDhcpPacketForwarding[pktInfo2] PASSED [ 13%]
dhcp_relay/test_dhcp_pkt_fwd.py::TestDhcpPktFwd::testDhcpPacketForwarding[pktInfo3] PASSED [ 18%]
dhcp_relay/test_dhcp_relay.py::test_interface_binding PASSED             [ 22%]
dhcp_relay/test_dhcp_relay.py::test_dhcp_relay_default[single] PASSED    [ 27%]
dhcp_relay/test_dhcp_relay.py::test_dhcp_relay_after_link_flap[single] PASSED [ 31%]
dhcp_relay/test_dhcp_relay.py::test_dhcp_relay_start_with_uplinks_down[single] PASSED [ 36%]
dhcp_relay/test_dhcp_relay.py::test_dhcp_relay_unicast_mac[single] PASSED [ 40%]
dhcp_relay/test_dhcp_relay.py::test_dhcp_relay_random_sport[single] PASSED [ 45%]
dhcp_relay/test_dhcp_relay.py::test_dhcp_relay_counter[single] PASSED    [ 50%]
dhcp_relay/test_dhcp_relay.py::test_dhcp_relay_default[dual] SKIPPED     [ 54%]
dhcp_relay/test_dhcp_relay.py::test_dhcp_relay_after_link_flap[dual] SKIPPED [ 59%]
dhcp_relay/test_dhcp_relay.py::test_dhcp_relay_start_with_uplinks_down[dual] SKIPPED [ 63%]
dhcp_relay/test_dhcp_relay.py::test_dhcp_relay_unicast_mac[dual] SKIPPED [ 68%]
dhcp_relay/test_dhcp_relay.py::test_dhcp_relay_random_sport[dual] SKIPPED [ 72%]
dhcp_relay/test_dhcp_relay.py::test_dhcp_relay_counter[dual] SKIPPED     [ 77%]
dhcp_relay/test_dhcpv6_relay.py::test_interface_binding PASSED           [ 81%]
dhcp_relay/test_dhcpv6_relay.py::test_dhcpv6_relay_counter PASSED        [ 86%]
dhcp_relay/test_dhcpv6_relay.py::test_dhcp_relay_default PASSED          [ 90%]
dhcp_relay/test_dhcpv6_relay.py::test_dhcp_relay_after_link_flap PASSED  [ 95%]
dhcp_relay/test_dhcpv6_relay.py::test_dhcp_relay_start_with_uplinks_down PASSED [100%]INFO:root:Can not get Allure report URL. Please check logs

@yaqiangz yaqiangz force-pushed the master_fix_counter branch 7 times, most recently from 2eefb57 to 7a62cf9 Compare December 19, 2023 07:06
@yaqiangz yaqiangz requested a review from kellyyeh December 19, 2023 09:35
@yaqiangz yaqiangz changed the title [test] Just want to build [counter] Clear counter table when dhcp6relay init Dec 19, 2023
@yaqiangz yaqiangz marked this pull request as ready for review December 19, 2023 09:35
@yaqiangz
Copy link
Contributor Author

@kellyyeh Could you help to review and merge this PR?

@dgsudharsan
Copy link

@yaqiangz @yxieca Can you please update dhcp-relay submodule in 202205 so this fix will be included?

kellyyeh added a commit to kellyyeh/sonic-dhcp-relay that referenced this pull request Mar 6, 2024
kellyyeh added a commit that referenced this pull request Mar 6, 2024
* Revert "[counter] Clear counter table when init (#45)"

This reverts commit 5ae186f.

* Revert "dhcpv6 per interface counter support (#43)"

This reverts commit 2b33d76.

* Update buster to bullseye libyang deb
yaqiangz pushed a commit to yaqiangz/sonic-dhcp-relay that referenced this pull request May 31, 2024
* Revert "[counter] Clear counter table when init (sonic-net#45)"

This reverts commit 5ae186f.

* Revert "dhcpv6 per interface counter support (sonic-net#43)"

This reverts commit 2b33d76.

* Update buster to bullseye libyang deb
yxieca pushed a commit that referenced this pull request May 31, 2024
* Skip vlans with no dhcpv6 server configured (#46)

* Revert DHCPv6 Counter (#48)

* Revert "[counter] Clear counter table when init (#45)"

This reverts commit 5ae186f.

* Revert "dhcpv6 per interface counter support (#43)"

This reverts commit 2b33d76.

* Update buster to bullseye libyang deb

---------

Co-authored-by: kellyyeh <[email protected]>
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.

3 participants