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

Enhance robustness and add log rotation support for mux simulator #2936

Merged
merged 1 commit into from
Feb 19, 2021
Merged

Enhance robustness and add log rotation support for mux simulator #2936

merged 1 commit into from
Feb 19, 2021

Conversation

wangxin
Copy link
Collaborator

@wangxin wangxin commented Feb 5, 2021

Description of PR

Summary:
Fixes # (issue)

Type of change

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

Approach

What is the motivation for this PR?

If topology change is not performed correctly, some open vswitch bridges with "mbr-" prefix may not be completely removed. The mux simulator server is not able to handle those garbage bridges properly and could return error if trying to get mux status of all ports.

How did you do it?

This change enhanced the mux simulator to exclude bridges that do not have 3 ports attached to avoid such issue. Some other enhancements:

  • Add log rotation support.
  • Add troubleshooting guide in documentation.

How did you verify/test it?

Any platform specific information?

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

Documentation

If topology change is not performed correctly, some open vswitch bridges
with "mbr-" prefix may not be completly removed. The mux simulator server
is not able to handle those garbage bridges properly and could return error
if trying to get mux status of all ports. This change enhanced the mux
simualtor to exclude bridges that do not have 3 ports attached to avoid
such issue. Some other enhancements:
* Add log rotation support.
* Add troubleshooting guide in documentation.

Signed-off-by: Xin Wang <[email protected]>
@wangxin wangxin requested a review from a team February 5, 2021 08:02
@yxieca
Copy link
Collaborator

yxieca commented Feb 18, 2021

While this is a good idea to get test going. how can we warn and cleanup these garbage bridges?

@wangxin
Copy link
Collaborator Author

wangxin commented Feb 19, 2021

While this is a good idea to get test going. how can we warn and cleanup these garbage bridges?

It should not be the mux simulator's responsibility to cleanup garbage bridges. Probably we should record some key information of running test setup in a file on test server after add-topo. The key information should include the topology name. While running remove-topo, firstly check if the topology to be removed matches the recorded running topology. If no, fail early to avoid leaving garbage bridges.

@wangxin wangxin merged commit a4cc76e into sonic-net:master Feb 19, 2021
@wangxin wangxin deleted the enhance-mux-simulator-pr branch March 5, 2021 00:51
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.

2 participants