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

Test case for BFD echo-mode #12642

Merged
merged 4 commits into from
May 13, 2024
Merged

Conversation

Ghulam-Bahoo
Copy link
Contributor

Description of PR

Summary:
This PR introduces a new test case in the existing BFD test plan focused on testing the existing BFD echo-mode feature. By testing BFD echo-mode functionality, I aim to ensure its reliability and effectiveness in real-world scenarios.

Type of change

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

Approach

What is the motivation for this PR?

Enabling BFD Echo-mode provides an additional layer of fault detection in network environments. This proactive approach helps to minimize network downtime and improve overall network reliability.

How did you do it?

Enabling BFD echo-mode across all neighbors in the topology.

How did you verify/test it?

I verified the test by running the command:

  • show bfd peer

which will show all the details about bfd neighbors.

@ridahanif96
Copy link
Contributor

@yxieca Hi Ying, can you please assign a reviewer for this testcase.

@yxieca yxieca requested a review from siqbal1986 April 30, 2024 18:28


@pytest.mark.parametrize('ipv6', [False, True], ids=['ipv4', 'ipv6'])
def test_bfd_echo_mode(request, rand_selected_dut, ptfhost, tbinfo, ipv6):
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you please point to me where the actual BFD session is being created.
From what i understand you are simply setting vtysh -c 'configure terminal' -c 'bfd' -c 'bfd peer {neighbor IP}' -c 'echo-mode'
and then you do
vtysh -c 'show bfd peer'"
Is the intent of the test simply to test i f the echo mode is configurable.

Copy link
Contributor Author

@Ghulam-Bahoo Ghulam-Bahoo May 6, 2024

Choose a reason for hiding this comment

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

This command establishes the BFD neighborship first and then enables the echo-mode on the peer. The breakdown of the command is as follows:
-c bfd (to instantiate the bfd instance)
-c bfd peer (neighbor IP)
These two commands create the bfd session.

-c echo-mode (enabling echo-mode on the peer)
This command is to configure the peer.

Refer to lines 326-328 in bfd_test.py.

assert error is False
finally:
# Cleanup: Remove BFD sessions and echo mode configurations
remove_bfd_sessions(duthost, neighbor_addrs)
Copy link
Contributor

Choose a reason for hiding this comment

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

if no sessions are created why the cleanup.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

BFD sessions are being created first as mentioned in the previous comment. So, cleanup is required for session tear-down.

@ridahanif96
Copy link
Contributor

ridahanif96 commented May 9, 2024

@siqbal1986 Hi, Can you please help expedite this test-case. Target is 202405 release. Thanks in advance.

@ridahanif96
Copy link
Contributor

@yxieca can you pls help merge this testcase.

@yxieca yxieca merged commit ffae98d into sonic-net:master May 13, 2024
13 checks passed
@dgsudharsan
Copy link
Contributor

@Ghulam-Bahoo @siqbal1986 This test uses FRR based bfd and not BFD offload. However for FRR based BFD we need to have frr_mgmt_framework_config set to true
https://github.com/sonic-net/sonic-buildimage/blob/72b2f79c75705ccdfc73f6b2a0ab05c375eff400/dockers/docker-fpm-frr/frr/supervisord/supervisord.conf.j2#L65

I don't see this test case explicitly introducing this configuration. How does this test work?

We see the following error

vtysh -c 'configure terminal' -c 'bfd'
bfdd is not running

@nhe-NV FYI

@bingwang-ms
Copy link
Collaborator

@Ghulam-Bahoo Can you please help check?

@siqbal1986
Copy link
Contributor

@Ghulam-Bahoo @ridahanif96 Can you please address the issue in this test as mentioned in an earlier comment. This test has been failing from day one. the other choice is to revert this PR.

ridahanif96 added a commit to Ghulam-Bahoo/sonic-mgmt that referenced this pull request Dec 4, 2024
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.

6 participants