Skip to content

[SSH] Fix SSH login session limit test case randomly failed issue. #5426 #5516

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

Merged
merged 8 commits into from
Apr 21, 2022

Conversation

liuh-80
Copy link
Contributor

@liuh-80 liuh-80 commented Apr 15, 2022

Description of PR

Fix SSH login session limit test case randomly failed issue. The issue is because update config file with 'tee' command, and tee command will exit when receive pipeline close command.

Type of change

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

Back port request

Approach

What is the motivation for this PR?

Fix SSH login session limit test case randomly failed issue.

How did you do it?

Code change:
1. Not use tee command to update template file in template folder.
2. Create template file with pipeline in home folder and move to template folder.

How did you verify/test it?

Run new UT make sure they are all pass.
Make sure all current UT not break during merge validation.

Any platform specific information?

N/A

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

@liuh-80 liuh-80 marked this pull request as ready for review April 15, 2022 06:50
@liuh-80 liuh-80 requested a review from a team as a code owner April 15, 2022 06:50
# run update template command and wait for template updated
config_file_content = []
while len(config_file_content) == 0:
stdin, stdout, stderr = admin_session.exec_command(LIMITS_CONF_TEMPLATE.format(hwsku, type, additional_content, template_path))
Copy link
Contributor Author

@liuh-80 liuh-80 Apr 15, 2022

Choose a reason for hiding this comment

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

This command sometimes will fail without error. can only randomly reproduce on testbed KVM.

Copy link
Contributor Author

@liuh-80 liuh-80 Apr 15, 2022

Choose a reason for hiding this comment

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

Re-run few times, all test passed:
ssh/test_ssh_limit.py::test_ssh_limits[] PASSED [100%]

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 explain in details "This command sometimes will fail without error" in PR description? If there is no error, why bothering fix.

Copy link
Contributor Author

@liuh-80 liuh-80 Apr 16, 2022

Choose a reason for hiding this comment

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

Fixed by remove the tee command. also decription updated.
The UT randomly failed because the template file not update, I found somestackover folow discussion about tee command will exist early when receive pipeline close signel.

@lgtm-com
Copy link

lgtm-com bot commented Apr 15, 2022

This pull request introduces 3 alerts when merging b598111 into 85e608b - view on LGTM.com

new alerts:

  • 3 for Variable defined multiple times

@liuh-80 liuh-80 requested a review from qiluo-msft April 15, 2022 09:25
@liuh-80 liuh-80 changed the title [SSH] Improve SSH login session limit test case. #5426 [SSH] Fix SSH login session limit test case randomly failed issue. #5426 Apr 16, 2022
@liuh-80
Copy link
Contributor Author

liuh-80 commented Apr 19, 2022

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@liuh-80
Copy link
Contributor Author

liuh-80 commented Apr 20, 2022

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@liuh-80
Copy link
Contributor Author

liuh-80 commented Apr 20, 2022

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@liuh-80
Copy link
Contributor Author

liuh-80 commented Apr 21, 2022

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@liuh-80 liuh-80 merged commit 16031e5 into sonic-net:master Apr 21, 2022
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