Skip to content

[sanity_check]: Improve mux simulator sanity check#3678

Merged
theasianpianist merged 5 commits intosonic-net:masterfrom
theasianpianist:mux-sim-sanity-improve
Jul 7, 2021
Merged

[sanity_check]: Improve mux simulator sanity check#3678
theasianpianist merged 5 commits intosonic-net:masterfrom
theasianpianist:mux-sim-sanity-improve

Conversation

@theasianpianist
Copy link
Contributor

@theasianpianist theasianpianist commented Jun 16, 2021

Signed-off-by: Lawrence Lee [email protected]

Description of PR

Summary:
Fixes sonic-net/sonic-buildimage#8105

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?

Current mux simulator sanity check is very flaky since it is not able to directly send/receive packets on the DUT, instead it runs commands on the DUT that should generate specific packets.

How did you do it?

  • Create fixture to get status of all mux simulator ports from server
  • Change mux sim sanity check to examine returned status/flows instead
    of sending traffic
  • Add support to sanity check for infrastructure recovery actions

How did you verify/test it?

  • Run the sanity check on a healthy dual ToR testbed, verify passing
  • Manually remove some mux simulator flows
    • Run the sanity check
    • Verify the test fails, and for the correct reason
    • Verify the mux simulator recovery action is run
    • Verify the second sanity check passes

Any platform specific information?

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

Documentation

* Create fixture to get status of all mux simulator ports from server
* Change mux sim sanity check to examine returned status/flows instead
of sending traffic
* Add support to sanity check for infrastructure recovery actions

Signed-off-by: Lawrence Lee <[email protected]>
@theasianpianist theasianpianist requested review from a team and wangxin June 16, 2021 22:01
@lgtm-com
Copy link

lgtm-com bot commented Jun 16, 2021

This pull request introduces 2 alerts when merging 2530e29 into 1be712a - view on LGTM.com

new alerts:

  • 2 for Unused import

Copy link
Collaborator

@wangxin wangxin left a comment

Choose a reason for hiding this comment

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

The new mux_simulator server introduced a field "healthy". Would it be helpful for this change?
https://github.com/Azure/sonic-mgmt/blob/master/ansible/roles/vm_set/files/mux_simulator.py#L340

active_flows, mux_flows = None, None

for input_intf, actions in intf_status['flows'].items():
if 'muxy' in input_intf:
Copy link
Collaborator

Choose a reason for hiding this comment

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

With the fix of #3359, PTF interface name is not guaranteed to be starting with "muxy". Suggest to use "mu".

@wangxin
Copy link
Collaborator

wangxin commented Jun 28, 2021

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@theasianpianist theasianpianist marked this pull request as draft June 30, 2021 18:53
- Check the 'healthy' field returned by the mux simulator
- Update interface name prefix

Signed-off-by: Lawrence Lee <[email protected]>
@theasianpianist theasianpianist marked this pull request as ready for review July 1, 2021 00:17
@theasianpianist theasianpianist requested review from a team and wangxin July 1, 2021 00:17
@theasianpianist theasianpianist merged commit eac976b into sonic-net:master Jul 7, 2021
vmittal-msft pushed a commit to vmittal-msft/sonic-mgmt that referenced this pull request Sep 28, 2021
[sanity_check]: Improve mux simulator sanity check

- Create fixture to get status of all mux simulator ports from server
- Change mux sim sanity check to examine returned status/flows instead
of sending traffic
- Add support to sanity check for infrastructure recovery actions
- Check the 'healthy' field returned by the mux simulator
- Update interface name prefix

Signed-off-by: Lawrence Lee <[email protected]>
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
…lly (sonic-net#22860)

#### Why I did it
src/sonic-swss
```
* 6785d662 - (HEAD -> 202405, origin/202405) Update swss pipeline to use ubuntu 22.04 agent pool (sonic-net#3678) (3 days ago) [mssonicbld]
```
#### 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.

[sanity_check] mux simulator sanity check fails

2 participants