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

[sanity-check] Add IPv4 MGMT reachability check #16645

Merged
merged 5 commits into from
Jan 23, 2025

Conversation

lizhijianrd
Copy link
Contributor

Description of PR

Summary:
Recently, we observed some DUT lost IPv4 MGMT reachability. However, since it's still IPv6 MGMT reachable, the issue is hard to be noticed.
To catch such issue, this PR introduces IPv4 MGMT sanity check. If the device has IPv4 MGMT IP assigned but it's unreachable, then sanity_check will fail the testcase.

Type of change

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

Back port request

  • 202012
  • 202205
  • 202305
  • 202311
  • 202405
  • 202411

Approach

What is the motivation for this PR?

Recently, we observed some DUT lost IPv4 MGMT reachability. However, since it's still IPv6 MGMT reachable, the issue is hard to be noticed.

How did you do it?

To catch such issue, this PR introduces IPv4 MGMT sanity check. If the device has IPv4 MGMT IP assigned but it's unreachable, then sanity_check will fail the testcase.

How did you verify/test it?

Verified by run test_bgp_fact with sanity_check.

When DUT IPv4 MGMT is reachable, sanity_check will pass and we can see below logs:

    {
        "failed": false,
        "check_item": "ipv4_mgmt",
        "host": "bjw2-can-720dt-1"
    },

If manually remove the DUT IPv4 MGMT address from eth0, then sanity_check fails with below error logs:

E                   Failed: !!!!!!!!!!!!!!!!Pre-test sanity check failed: !!!!!!!!!!!!!!!!
E                   [
E                       {
E                           "failed": true,
E                           "check_item": "ipv4_mgmt",
E                           "host": "720dt-1"
E                       }
E                   ]

Any platform specific information?

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

Documentation

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

@xwjiang-ms xwjiang-ms left a comment

Choose a reason for hiding this comment

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

LGTM

@Blueve Blueve merged commit a6edd1a into sonic-net:master Jan 23, 2025
17 checks passed
mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Jan 23, 2025
Summary:
Recently, we observed some DUT lost IPv4 MGMT reachability. However, since it's still IPv6 MGMT reachable, the issue is hard to be noticed.
To catch such issue, this PR introduces IPv4 MGMT sanity check. If the device has IPv4 MGMT IP assigned but it's unreachable, then sanity_check will fail the testcase.

What is the motivation for this PR?
Recently, we observed some DUT lost IPv4 MGMT reachability. However, since it's still IPv6 MGMT reachable, the issue is hard to be noticed.

How did you do it?
To catch such issue, this PR introduces IPv4 MGMT sanity check. If the device has IPv4 MGMT IP assigned but it's unreachable, then sanity_check will fail the testcase.

How did you verify/test it?
Verified by run test_bgp_fact with sanity_check.
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202411: #16649

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.

5 participants