Skip to content

Dual tor failure utilities and sample tests#2845

Merged
vaibhavhd merged 5 commits intosonic-net:masterfrom
vaibhavhd:tor-failure-utils
Jan 27, 2021
Merged

Dual tor failure utilities and sample tests#2845
vaibhavhd merged 5 commits intosonic-net:masterfrom
vaibhavhd:tor-failure-utils

Conversation

@vaibhavhd
Copy link
Contributor

Description of PR

Summary: Add common utilities for dual ToR failure
Fixes # (issue) #2757

Type of change

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

Approach

What is the motivation for this PR?

ToR Failure utilities. This change includes fixtures to:

  1. Reboot TOR
  2. Blackhole traffic
  3. Shutdown bgp sessions
  4. Shutdown LinkProber (to be tested after LinkProber implementation is complete).

Some tests are added to verify functionality of these utilities.
Additionally Dual ToR failure testcase definitions are added. The implementation will be taken care in the future PRs.

How did you do it?

How did you verify/test it?

Tested utilities using sample tests on a dualtor testbed with MUX simulator running in server.

Any platform specific information?

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

Documentation

@vaibhavhd vaibhavhd added Pytest 🐍 Dual ToR Test Dev ♊ Action item for dual ToR test development labels Jan 21, 2021
@lgtm-com
Copy link

lgtm-com bot commented Jan 21, 2021

This pull request introduces 2 alerts when merging d10acc2 into da434f2 - view on LGTM.com

new alerts:

  • 1 for Unused local variable
  • 1 for 'import *' may pollute namespace

@lgtm-com
Copy link

lgtm-com bot commented Jan 22, 2021

This pull request introduces 2 alerts when merging 22c5527 into e02de23 - view on LGTM.com

new alerts:

  • 1 for Unused local variable
  • 1 for 'import *' may pollute namespace

@vaibhavhd vaibhavhd linked an issue Jan 23, 2021 that may be closed by this pull request
@vaibhavhd vaibhavhd requested a review from a team January 25, 2021 18:18
lo_ipv6 = ip

duthost.shell("ip -4 route add 0.0.0.0/0 nexthop via {}".format(lo_ipv4.ip))
#duthost.shell("ip -6 route add ::/0 nexthop via {}".format(lo_ipv6.ip))
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the reason for not running this line?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed the comment. Right now blackholing by only removing ipv4 default. This can be modified later if needed for ipv6.

@lgtm-com
Copy link

lgtm-com bot commented Jan 26, 2021

This pull request introduces 2 alerts when merging e61406e into 15793fb - view on LGTM.com

new alerts:

  • 1 for 'import *' may pollute namespace
  • 1 for Variable defined multiple times

@lgtm-com
Copy link

lgtm-com bot commented Jan 27, 2021

This pull request introduces 2 alerts when merging 7768897 into ca14e1b - view on LGTM.com

new alerts:

  • 1 for 'import *' may pollute namespace
  • 1 for Variable defined multiple times

@vaibhavhd vaibhavhd merged commit 056db9b into sonic-net:master Jan 27, 2021
@vaibhavhd vaibhavhd deleted the tor-failure-utils branch January 27, 2021 23:41
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
…lly (sonic-net#16532)

src/sonic-swss

* de7186c6 - (HEAD -> 202205, origin/202205) [202205][CodeQL]: Use dependencies with relevant versions in azp template. (sonic-net#2905) (13 days ago) [Nazarii Hnydyn]
* 106dd9ed - [CodeQL]: Use dependencies with relevant versions in azp template. (sonic-net#2845) (3 weeks ago) [Nazarii Hnydyn]
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
…lly (sonic-net#16642)

#### Why I did it
src/sonic-swss
```
* 0584d35b - (HEAD -> 202305, origin/202305) Revert "Support type7 encoded CAK key for macsec in config_db (sonic-net#2892)" (3 minutes ago) [stormliang]
* 7097cf2b - Revert "[teamd]: Clean teamd process if LAG creation fails (sonic-net#2888)" (3 days ago) [stormliang]
* a0eb0d07 - Support type7 encoded CAK key for macsec in config_db (sonic-net#2892) (4 days ago) [judyjoseph]
* c7e5f10e - [teamd]: Clean teamd process if LAG creation fails (sonic-net#2888) (4 days ago) [Lawrence Lee]
* f30b6107 - [CodeQL]: Use dependencies with relevant versions in azp template. (sonic-net#2845) (4 days ago) [Nazarii Hnydyn]
```
#### 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

Dual ToR Test Dev ♊ Action item for dual ToR test development Pytest 🐍

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ToR Failure Utilities

3 participants