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

[dual tor]: Move y cable simulator driver injection to pretest #2981

Merged
merged 2 commits into from
Feb 16, 2021

Conversation

theasianpianist
Copy link
Contributor

Signed-off-by: Lawrence Lee [email protected]<!--
Please make sure you've read and understood our contributing guidelines;
https://github.com/Azure/SONiC/blob/gh-pages/CONTRIBUTING.md

Please provide following information to help code review process a bit easier:
-->

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?

With manual image changes, the y_cable_simulator_client on dual ToR testbeds is overwritten. Currently, a new minigraph needs to be deployed to inject the client again, which has a lot of overhead and is not desirable.

How did you do it?

Create a test case in test_pretest.py which creates and injects the simulator client to ToRs in a dual ToR topology.

How did you verify/test it?

./run_tests.sh -n <testbed_name> -i <inventory files> -u -c test_pretest.py::test_inject_y_cable_simulator_client

Verify that the file gets placed into /usr/lib/python3/dist-packages inside the pmon container on both ToRs.

Deploy minigraph, ensure that it completes successfully.

Any platform specific information?

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

Documentation

@theasianpianist theasianpianist requested review from yxieca, bingwang-ms and a team February 12, 2021 00:07
@vaibhavhd
Copy link
Contributor

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@yxieca yxieca merged commit d097645 into sonic-net:master Feb 16, 2021
@theasianpianist theasianpianist deleted the inject-cable-sim branch May 13, 2021 22:51
wangxin added a commit to wangxin/sonic-mgmt that referenced this pull request Nov 11, 2021
PR sonic-net#2981 moved injecting y-cable driver to dualtor DUTs from deploy-mg to a test case in test_pretest.py.
This caused an chicken and egg problem. Initially without simulated y-cable driver or mux configuration
in dualtor DUTs, the mux status is "unknown". When we run the test_pretest.py script to inject simulated
y-cable driver or mux configuration, sanity check is performed by default. One of the check item is to
check the mux simulator. Before simulated y-cable is injected/configured on dualtor DUTs, the muxcable
status on DUTs would be "unknown" and mux simulator sanity check would fail after PR sonic-net#4640 was merged.
Then test_pretest would not be able to inject simulated y-cable driver or configuration.

This change:
* Deprecated test case test_inject_y_cable_simulator_client in test_pretest.py.
* Added back injecting simulated y-cable driver and configuration in "testbed-cli.sh deploy-mg".
* Added extra light weighted tool "testbed-cli.sh config-y-cable" just for injecting simulated y-cable
  driver or mux configuration.

Signed-off-by: Xin Wang <[email protected]>
wangxin added a commit that referenced this pull request Nov 12, 2021
…4676)

PR #2981 moved injecting y-cable driver to dualtor DUTs from deploy-mg to a test case in test_pretest.py.
This caused a chicken and egg problem. Initially without simulated y-cable driver or mux configuration
in dualtor DUTs, the mux status is "unknown". When we run the test_pretest.py script to inject simulated
y-cable driver or mux configuration, sanity check is performed by default. One of the check item is to
check the mux simulator. Before simulated y-cable is injected/configured on dualtor DUTs, the muxcable
status on DUTs would be "unknown" and mux simulator sanity check would fail after PR #4640 was merged.
Then test_pretest would not be able to inject simulated y-cable driver or configuration.

How did you do it?
Changes:
* Deprecated test case test_inject_y_cable_simulator_client in test_pretest.py.
* Added back injecting simulated y-cable driver and configuration in "testbed-cli.sh deploy-mg".
* Added extra light weighted tool "testbed-cli.sh config-y-cable" just for injecting simulated y-cable
driver or mux configuration.

Signed-off-by: Xin Wang <[email protected]>
AntonHryshchuk pushed a commit to AntonHryshchuk/sonic-mgmt that referenced this pull request Jan 4, 2022
…onic-net#4676)

PR sonic-net#2981 moved injecting y-cable driver to dualtor DUTs from deploy-mg to a test case in test_pretest.py.
This caused a chicken and egg problem. Initially without simulated y-cable driver or mux configuration
in dualtor DUTs, the mux status is "unknown". When we run the test_pretest.py script to inject simulated
y-cable driver or mux configuration, sanity check is performed by default. One of the check item is to
check the mux simulator. Before simulated y-cable is injected/configured on dualtor DUTs, the muxcable
status on DUTs would be "unknown" and mux simulator sanity check would fail after PR sonic-net#4640 was merged.
Then test_pretest would not be able to inject simulated y-cable driver or configuration.

How did you do it?
Changes:
* Deprecated test case test_inject_y_cable_simulator_client in test_pretest.py.
* Added back injecting simulated y-cable driver and configuration in "testbed-cli.sh deploy-mg".
* Added extra light weighted tool "testbed-cli.sh config-y-cable" just for injecting simulated y-cable
driver or mux configuration.

Signed-off-by: Xin Wang <[email protected]>
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.

3 participants