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

[CPDEV-103189] Different improvements in SSH connections usage #671

Merged
merged 5 commits into from
Jun 24, 2024

Conversation

ilia1243
Copy link
Contributor

@ilia1243 ilia1243 commented Jun 4, 2024

Description

  • Support calculating of sha1 for Connection.put() of in memory StringIO buffer.
  • Added option NodeGroup.put(compare_hashes=True) to specify if sha1 of remote and local files should be compared.
    • The option is set to False in all cases when we do not expect existence of remote file, or expect its sha1 being always different.
  • Added check of sha1 for thirdparties provided as scripts (etcdctl.sh).
  • check_iaas --tasks network.ipip_connectivity now copies ipip_check binary only if is not copied yet or not actual.
  • Fail connect attempts early in case of not a connection-related exceptions.
  • fabric's Connection is now instantiated with channel_timeout=10 (default) to recover from problems with SSH (like in comment [MANOPD-89188] Type annotations and checks by mypy #463 (comment)).
  • Other minor fixes in installation of thirdparties.

Test Cases

TestCase 1

Check if etcdctl is actual.

Steps:

  1. Install cluster and manually change /usr/bin/etcdctl
  2. Run check_paas --tasks thirdparties.hashes

Results:

Before After
Check is successful Check fails

TestCase 2

Fail early during instantiating of SSH connections.

Steps:

  1. Specify incorrect path to RSA key file and run any procedure.

Results:

Before After
Procedure fails after 30 seconds Procedure fails immediately

Checklist

  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • Integration CI passed
  • Unit tests. If Yes list of new/changed tests with brief description
  • There is no merge conflicts

Added option NodeGroup.put(compare_hashes=True)
Do not show progress, check file for existence

Support sha1 for local scripts, and extend PaaS check
@vlar0816 vlar0816 changed the title Different improvements in SSH connections usage [CPDEV-103189] Different improvements in SSH connections usage Jun 20, 2024
@koryaga koryaga merged commit d723d73 into main Jun 24, 2024
42 checks passed
@koryaga koryaga deleted the bugfix/connection_fixes branch June 24, 2024 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants