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

Enable "KeepAlive" probes for Salt SSH executions (bsc#1211649) #610

Conversation

meaksh
Copy link
Member

@meaksh meaksh commented Oct 30, 2023

This PR is a backport of saltstack/salt#65488 to openSUSE/release/3006.0 branch.

What issues does this PR fix or reference?

Tracks: https://github.com/SUSE/spacewalk/issues/21578


What does this PR do?

This PR enables "KeepAlive" probes the SSH connections created by Salt SSH, in order to be more reliable when there are problems in the network or ssh stuck connections, preventing "salt-ssh" process from getting stuck (or even worse, "salt-api" threads getting stuck).

Previous Behavior

No ServerAliveInterval or ServerAliveCountMax options were passed to the "ssh" command.

New Behavior

The KeepAlive proves (ServerAliveInterval) is now enabled by default for Salt SSH executions. This behavior can be disabled via configuration value / roster or CLI argument.

The following new configuration values were added to the Salt Master.

  • ssh_keepalive (default: True)
  • ssh_keepalive_interval (default: 60)
  • ssh_keepalive_count_max (default: 3)

These new configuration values can be set via master configuration or passed to salt-ssh CLI.

Merge requirements satisfied?

[NOTICE] Bug fixes or features added to Salt require tests.

Commits signed with GPG?

Yes

@meaksh meaksh force-pushed the openSUSE/fix/3006.0-enable-keepalive-on-salt-ssh-connection branch from 2ed6008 to cbb9186 Compare October 31, 2023 10:57
Copy link
Contributor

@vzhestkov vzhestkov left a comment

Choose a reason for hiding this comment

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

Looks good for me. It makes sense to have such parameters for ssh 👍

@meaksh meaksh changed the title Enable "KeepAlive" probes for Salt SSH executions Enable "KeepAlive" probes for Salt SSH executions (bsc#1211649) Dec 1, 2023
@meaksh meaksh merged commit 5303cc6 into openSUSE/release/3006.0 Dec 1, 2023
3 checks passed
@meaksh meaksh deleted the openSUSE/fix/3006.0-enable-keepalive-on-salt-ssh-connection branch December 1, 2023 10:59
meaksh added a commit that referenced this pull request Oct 29, 2024
* Enable KeepAlive probes for Salt SSH connections (bsc#1211649)

* Add tests for Salt SSH keepalive options

* Add changelog file

* Make changes suggested by pre-commit
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