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 plan] 4-byte AS Translation #8973

Merged
merged 25 commits into from
Sep 1, 2024
Merged

Conversation

Azarack
Copy link
Contributor

@Azarack Azarack commented Jul 13, 2023

Description of PR

Test plan and automation to verify 4-byte to 2-byte ASN translation feature functions as expected.

Summary:
Fixes # (issue)

Type of change

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

Back port request

  • 201911
  • 202012
  • 202205

Approach

What is the motivation for this PR?

How did you do it?

How did you verify/test it?

Any platform specific information?

vsonic neighbors

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

T2 topology

Documentation

@Azarack
Copy link
Contributor Author

Azarack commented Sep 29, 2023

@wenyiz2021 can you review this PR?

@hasan-brcm
Copy link

@kishorekunal01 review

-c "address-family ipv4 unicast" \
-c "network {}" \
-c "neighbor {} soft-reconfiguration inbound" \
-c "neighbor {} route-map FROM_BGP_PEER_V4 in" \

Choose a reason for hiding this comment

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

route-map define is missing in the file, what exactly the route-map contain, similar other route map in the files as well.

Copy link
Contributor Author

@Azarack Azarack Mar 19, 2024

Choose a reason for hiding this comment

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

@kishorekunal01 This is a pre-configured route map that is part of the T2 BGP configuration. I did add a comment specifying this at the start of the command block.


def test_4_byte_asn_translation(setup):
# copy existing BGP config to a new 4-byte ASN. Use existing route-maps for consistancy.
cmd = 'vtysh{} \
Copy link
Contributor

Choose a reason for hiding this comment

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

there is a space needed after vtysh : cli_options = "-n " + duthost.get_namespace_from_asic_id(asic_index)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, sorry I missed this.

setup['peer_group_v6'], setup['peer_group_v6'], setup['neigh_ip_v6'], setup['neigh2_ip_v6'])
logger.debug(setup['duthost'].shell(cmd, module_ignore_errors=True))

cmd = 'vtysh \
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 add the cli_options = "-n " + duthost.get_namespace_from_asic_id(asic_index) here also? T2 neighbor could be multi-asic

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I added cli options for the neighbor.

logger.debug("DUT BGP Config: {}".format(setup['duthost'].shell("show run bgp")['stdout']))
logger.debug("Neighbor BGP Config: {}".format(setup['neighhost'].shell("show run bgp")['stdout']))

time.sleep(bgp_sleep)
Copy link
Contributor

Choose a reason for hiding this comment

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

could you elaborate on what the previous cmd is doing?
the sleep time could be different among T2s

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The previous command configures a 4-byte ASN on the neighbor device.
I'm not sure what you mean by the sleep time being different as this is a variable set in the script.

Copy link
Contributor

Choose a reason for hiding this comment

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

I mean how did you decide bgp_sleep?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is the standard amount of time we wait for our tests to allow BGP to converge. Then after running the test case if there is an issue it is extended.

Copy link
Contributor

Choose a reason for hiding this comment

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

LGTM if this sleep time of 120 works well on T2

@Azarack
Copy link
Contributor Author

Azarack commented Apr 4, 2024

@wenyiz2021 Hello, can you please look at the updates I have made as per your comments?

@wenyiz2021
Copy link
Contributor

LGTM

@kishorekunal01 can you check if your question is resolved

@kishorekunal01
Copy link

LGTM

@kishorekunal01 can you check if your question is resolved

Yes, it is resolved

@Azarack
Copy link
Contributor Author

Azarack commented Apr 11, 2024

@kishorekunal01 @wenyiz2021 Does someone else need to approve this for it to be merged?

@Azarack
Copy link
Contributor Author

Azarack commented May 14, 2024

@wenyiz2021 Can you merge this or does someone else need to approve?


# Test name

BGP Session Flaps
Copy link
Contributor

Choose a reason for hiding this comment

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

looks like the test name and overview is not aligned with test description. Can you check?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@prsunny You are correct that this was a mistake. I have updated it to the proper name.


## Overview

The goal of this test is to verify that the CPU and memory do not spike during cycles of BGP sessions flapping.
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this really meant to be a test for session flap and memory check?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@prsunny You are correct that this was a mistake. I have updated it to the proper overview.

@Azarack
Copy link
Contributor Author

Azarack commented Aug 8, 2024

@BYGX-wcr Please review this PR.

@wenyiz2021
Copy link
Contributor

@Azarack I don't have permission to merge, if @prsunny approves he can merge

@Azarack
Copy link
Contributor Author

Azarack commented Aug 22, 2024

@Azarack I don't have permission to merge, if @prsunny approves he can merge

@prsunny Are you able to merge this PR now that it is approved?

@prsunny
Copy link
Contributor

prsunny commented Aug 22, 2024

@wangxin , would you please merge?

@rlhui rlhui merged commit 4f84c7a into sonic-net:master Sep 1, 2024
16 checks passed
eddieruan-alibaba pushed a commit to eddieruan-alibaba/sonic-mgmt that referenced this pull request Sep 4, 2024
Test plan and automation to verify 4-byte to 2-byte ASN translation feature functions as expected.
* adding test and test plan
* change to use random frontend dut
* adding clarification for route-map and updating tor and namespace
* adding neighbor cli options
* Updating name and overview
hdwhdw pushed a commit to hdwhdw/sonic-mgmt that referenced this pull request Sep 20, 2024
Test plan and automation to verify 4-byte to 2-byte ASN translation feature functions as expected.
* adding test and test plan
* change to use random frontend dut
* adding clarification for route-map and updating tor and namespace
* adding neighbor cli options
* Updating name and overview
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

7 participants