Skip to content

Check DHCP servers are routed after link flap in test_dhcp_relay#4251

Merged
bingwang-ms merged 1 commit intosonic-net:masterfrom
bingwang-ms:fix_dhcp_relay
Sep 15, 2021
Merged

Check DHCP servers are routed after link flap in test_dhcp_relay#4251
bingwang-ms merged 1 commit intosonic-net:masterfrom
bingwang-ms:fix_dhcp_relay

Conversation

@bingwang-ms
Copy link
Collaborator

Signed-off-by: bingwang [email protected]

Description of PR

Summary:
Fixes # (issue)
This PR is to fix test_dhcp_relay_after_link_flap failure.

 "FAIL: dhcp_relay_test.DHCPTest", 
        "----------------------------------------------------------------------", 
        "Traceback (most recent call last):", 
        "  File \"ptftests/dhcp_relay_test.py\", line 563, in runTest", 
        "    self.verify_relayed_discover()", 
        "  File \"ptftests/dhcp_relay_test.py\", line 445, in verify_relayed_discover", 
        "    \"Failed: Discover count of %d != %d\" % (discover_count, num_expected_packets))", 
        "AssertionError: Failed: Discover count of 0 != 48", 

The root cause for the failure is the default route is not rebuilt after uplink flap when test was running.
This PR addressed the issue by adding a wait_until after link flap to wait until routes to DHCP server are rebuilt.

Type of change

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

Back port request

  • 201911

Approach

What is the motivation for this PR?

This PR is to fix test_dhcp_relay_after_link_flap failure.

How did you do it?

This PR addressed the issue by adding a wait_until after link flap to wait until routes to DHCP server are rebuilt.

How did you verify/test it?

Verified on SN4600. All test cases in test_dhcp_relay pass now.

Any platform specific information?

No.

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

No.

Documentation

@bingwang-ms bingwang-ms requested review from a user and tahmed-dev September 14, 2021 02:44
@bingwang-ms bingwang-ms requested a review from a team as a code owner September 14, 2021 02:44
@bingwang-ms
Copy link
Collaborator Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

@tahmed-dev tahmed-dev left a comment

Choose a reason for hiding this comment

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

Thanks!


pytest_assert(wait_until(50, 5, check_link_status, duthost, dhcp_relay['uplink_interfaces'], "up"),
"Not all uplinks are up")

Copy link
Contributor

Choose a reason for hiding this comment

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

is the issue happening if the portchannel consists of one interface and doesn't happen otherwise?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No, I don't think so. There are two members in each portchannel on this testbed

  No.  Team Dev         Protocol     Ports
-----  ---------------  -----------  ---------------------------
 0001  PortChannel0001  LACP(A)(Up)  Ethernet0(S) Ethernet4(S)
 0002  PortChannel0002  LACP(A)(Up)  Ethernet20(S) Ethernet16(S)
 0003  PortChannel0003  LACP(A)(Up)  Ethernet68(S) Ethernet64(S)
 0004  PortChannel0004  LACP(A)(Up)  Ethernet84(S) Ethernet80(S)

@bingwang-ms bingwang-ms merged commit 2861c76 into sonic-net:master Sep 15, 2021
vmittal-msft pushed a commit to vmittal-msft/sonic-mgmt that referenced this pull request Sep 28, 2021
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
…lly (#25635)

#### Why I did it
src/sonic-swss
```
* b2c4e649 - (HEAD -> 202511, origin/202511) [202511][ssw][ha] vnetorch support primary/secondary live update for custom bfd (sonic-net#4228) (6 hours ago) [Jing Zhang]
* d317c8f9 - [countersyncd]: Fix cargo bench compiling error (sonic-net#4263) (17 hours ago) [mssonicbld]
* 725d6660 - [HFT]: keep STATE_DB session stream_status in sync with profile stream_state (sonic-net#4190) (22 hours ago) [mssonicbld]
* fa01e8d2 - [countersyncd]: Modify the exit behavior of the main function (sonic-net#4225) (27 hours ago) [mssonicbld]
* 82243e7f - [macsecmgr]: Fix MACsec unconfigure failures due to time out (sonic-net#4233) (2 days ago) [mssonicbld]
* 8d476206 - [ci] Install redis from Debian (sonic-net#4251) (3 days ago) [mssonicbld]
* 0c11b096 - [Bug] This patch is to fix a major bug in the for loop of the (sonic-net#4173) (3 days ago) [ashishalok-arista]
```
#### How I did it
#### How to verify it
#### Description for the changelog
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