Skip to content

Reset sshd timeout in stage deploy minigraph.#6820

Merged
yejianquan merged 5 commits intosonic-net:masterfrom
yutongzhang-microsoft:yutongzhang/sshd_timeout
Nov 14, 2022
Merged

Reset sshd timeout in stage deploy minigraph.#6820
yejianquan merged 5 commits intosonic-net:masterfrom
yutongzhang-microsoft:yutongzhang/sshd_timeout

Conversation

@yutongzhang-microsoft
Copy link
Copy Markdown
Contributor

Description of PR

In pr [https://github.com/sonic-net/sonic-buildimage/pull/12109], it decrease the sshd timout from 15mins to 5mins. It may cause timeout when executing generate_dump -s yesterday in posttest. So in this pr, during deploying minigraph, we reset this time.

Summary:
Fixes # (issue)

Type of change

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

Back port request

  • 201911
  • 202012
  • 202205

Approach

What is the motivation for this PR?

In pr [https://github.com/sonic-net/sonic-buildimage/pull/12109], it decrease the sshd timout from 15mins to 5mins. It may cause timeout when executing generate_dump -s yesterday in posttest. So in this pr, during deploying minigraph, we reset this time.

How did you do it?

Modify the value /etc/ssh/sshd_config/ClientAliveInterval in deploy minigraph.

How did you verify/test it?

Any platform specific information?

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

Documentation

@azure-pipelines
Copy link
Copy Markdown

The pre-commit check detected issues in the files touched by this pull request.
The detected issues may be old or new. For new issues, please try to fix them.

For old issues, it is not mandatory to fix them because they were not caused by this change. It is unfair to blame
author of this pull request. But if you can take extra effort to fix the old issues as well, that would be great!

Detailed pre-commit check results:
trim trailing whitespace.................................................Failed
- hook id: trailing-whitespace
- exit code: 1
- files were modified by this hook

Fixing ansible/config_sonic_basedon_testbed.yml

fix end of files.........................................................Passed
check yaml...............................................................Failed
- hook id: check-yaml
- exit code: 1

while parsing a block collection
in "ansible/config_sonic_basedon_testbed.yml", line 392, column 7
did not find expected '-' indicator
in "ansible/config_sonic_basedon_testbed.yml", line 594, column 7

check for added large files..............................................Passed
check python ast.....................................(no files to check)Skipped
flake8...............................................(no files to check)Skipped

To run the pre-commit checks locally, you can follow below steps:

  1. Ensure that default python is python3. In sonic-mgmt docker container, default python is python2. You can run
    the check by activating the python3 virtual environment in sonic-mgmt docker container or outside of sonic-mgmt
    docker container.
  2. Ensure that the pre-commit package is installed:
sudo pip install pre-commit
  1. Go to repository root folder
  2. Install the pre-commit hooks:
pre-commit install
  1. Use pre-commit to check staged file:
pre-commit
  1. Alternatively, you can check committed files using:
pre-commit run --from-ref <commit_id> --to-ref <commit_id>

@azure-pipelines
Copy link
Copy Markdown

The pre-commit check detected issues in the files touched by this pull request.
The detected issues may be old or new. For new issues, please try to fix them.

For old issues, it is not mandatory to fix them because they were not caused by this change. It is unfair to blame
author of this pull request. But if you can take extra effort to fix the old issues as well, that would be great!

Detailed pre-commit check results:
trim trailing whitespace.................................................Failed
- hook id: trailing-whitespace
- exit code: 1
- files were modified by this hook

Fixing ansible/config_sonic_basedon_testbed.yml

fix end of files.........................................................Passed
check yaml...............................................................Failed
- hook id: check-yaml
- exit code: 1

while parsing a block collection
in "ansible/config_sonic_basedon_testbed.yml", line 392, column 7
did not find expected '-' indicator
in "ansible/config_sonic_basedon_testbed.yml", line 594, column 7

check for added large files..............................................Passed
check python ast.....................................(no files to check)Skipped
flake8...............................................(no files to check)Skipped

To run the pre-commit checks locally, you can follow below steps:

  1. Ensure that default python is python3. In sonic-mgmt docker container, default python is python2. You can run
    the check by activating the python3 virtual environment in sonic-mgmt docker container or outside of sonic-mgmt
    docker container.
  2. Ensure that the pre-commit package is installed:
sudo pip install pre-commit
  1. Go to repository root folder
  2. Install the pre-commit hooks:
pre-commit install
  1. Use pre-commit to check staged file:
pre-commit
  1. Alternatively, you can check committed files using:
pre-commit run --from-ref <commit_id> --to-ref <commit_id>

@azure-pipelines
Copy link
Copy Markdown

The pre-commit check detected issues in the files touched by this pull request.
The detected issues may be old or new. For new issues, please try to fix them.

For old issues, it is not mandatory to fix them because they were not caused by this change. It is unfair to blame
author of this pull request. But if you can take extra effort to fix the old issues as well, that would be great!

Detailed pre-commit check results:
trim trailing whitespace.................................................Failed
- hook id: trailing-whitespace
- exit code: 1
- files were modified by this hook

Fixing ansible/config_sonic_basedon_testbed.yml

fix end of files.........................................................Passed
check yaml...............................................................Passed
check for added large files..............................................Passed
check python ast.....................................(no files to check)Skipped
flake8...............................................(no files to check)Skipped

To run the pre-commit checks locally, you can follow below steps:

  1. Ensure that default python is python3. In sonic-mgmt docker container, default python is python2. You can run
    the check by activating the python3 virtual environment in sonic-mgmt docker container or outside of sonic-mgmt
    docker container.
  2. Ensure that the pre-commit package is installed:
sudo pip install pre-commit
  1. Go to repository root folder
  2. Install the pre-commit hooks:
pre-commit install
  1. Use pre-commit to check staged file:
pre-commit
  1. Alternatively, you can check committed files using:
pre-commit run --from-ref <commit_id> --to-ref <commit_id>

@azure-pipelines
Copy link
Copy Markdown

The pre-commit check detected issues in the files touched by this pull request.
The detected issues may be old or new. For new issues, please try to fix them.

For old issues, it is not mandatory to fix them because they were not caused by this change. It is unfair to blame
author of this pull request. But if you can take extra effort to fix the old issues as well, that would be great!

Detailed pre-commit check results:
trim trailing whitespace.................................................Failed
- hook id: trailing-whitespace
- exit code: 1
- files were modified by this hook

Fixing ansible/config_sonic_basedon_testbed.yml

fix end of files.........................................................Passed
check yaml...............................................................Passed
check for added large files..............................................Passed
check python ast.....................................(no files to check)Skipped
flake8...............................................(no files to check)Skipped

To run the pre-commit checks locally, you can follow below steps:

  1. Ensure that default python is python3. In sonic-mgmt docker container, default python is python2. You can run
    the check by activating the python3 virtual environment in sonic-mgmt docker container or outside of sonic-mgmt
    docker container.
  2. Ensure that the pre-commit package is installed:
sudo pip install pre-commit
  1. Go to repository root folder
  2. Install the pre-commit hooks:
pre-commit install
  1. Use pre-commit to check staged file:
pre-commit
  1. Alternatively, you can check committed files using:
pre-commit run --from-ref <commit_id> --to-ref <commit_id>

@yutongzhang-microsoft yutongzhang-microsoft changed the title Reset sshd timeout. Reset sshd timeout in stage deploy minigraph. Nov 14, 2022
Copy link
Copy Markdown
Collaborator

@yejianquan yejianquan left a comment

Choose a reason for hiding this comment

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

LGTM

@yejianquan yejianquan merged commit 2ecca4a into sonic-net:master Nov 14, 2022
@yutongzhang-microsoft yutongzhang-microsoft deleted the yutongzhang/sshd_timeout branch November 14, 2022 08:42
yejianquan pushed a commit that referenced this pull request Nov 14, 2022
* Reset sshd timeout

Approach
What is the motivation for this PR?
In pr [sonic-net/sonic-buildimage#12109], it decrease the sshd timout from 15mins to 5mins. It may cause timeout when executing generate_dump -s yesterday in posttest. So in this pr, during deploying minigraph, we reset this time.

How did you do it?
Modify the value /etc/ssh/sshd_config/ClientAliveInterval in deploy minigraph.

co-authorized by: jianquanye@microsoft.com
yejianquan pushed a commit that referenced this pull request Nov 14, 2022
* Reset sshd timeout

Approach
What is the motivation for this PR?
In pr [sonic-net/sonic-buildimage#12109], it decrease the sshd timout from 15mins to 5mins. It may cause timeout when executing generate_dump -s yesterday in posttest. So in this pr, during deploying minigraph, we reset this time.

How did you do it?
Modify the value /etc/ssh/sshd_config/ClientAliveInterval in deploy minigraph.

co-authorized by: jianquanye@microsoft.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants