Skip to content

[master] Enable "KeepAlive" probes for Salt SSH executions#65488

Merged
dwoz merged 5 commits into
saltstack:masterfrom
meaksh:master-enable-keepalive-on-salt-ssh-connection
Jan 28, 2026
Merged

[master] Enable "KeepAlive" probes for Salt SSH executions#65488
dwoz merged 5 commits into
saltstack:masterfrom
meaksh:master-enable-keepalive-on-salt-ssh-connection

Conversation

@meaksh
Copy link
Copy Markdown
Contributor

@meaksh meaksh commented Oct 30, 2023

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 requested a review from a team as a code owner October 30, 2023 13:58
@meaksh meaksh requested review from dwoz and removed request for a team October 30, 2023 13:58
@salt-project-bot-prod-environment salt-project-bot-prod-environment Bot changed the title Enable "KeepAlive" probes for Salt SSH executions [master] Enable "KeepAlive" probes for Salt SSH executions Oct 30, 2023
@meaksh meaksh temporarily deployed to ci October 30, 2023 14:41 — with GitHub Actions Inactive
@meaksh meaksh temporarily deployed to ci October 30, 2023 14:41 — with GitHub Actions Inactive
@meaksh meaksh temporarily deployed to ci October 30, 2023 14:42 — with GitHub Actions Inactive
@meaksh meaksh temporarily deployed to ci October 30, 2023 14:42 — with GitHub Actions Inactive
@meaksh meaksh temporarily deployed to ci October 30, 2023 14:42 — with GitHub Actions Inactive
@meaksh meaksh temporarily deployed to ci October 30, 2023 14:42 — with GitHub Actions Inactive
@meaksh meaksh temporarily deployed to ci October 30, 2023 16:12 — with GitHub Actions Inactive
@meaksh meaksh temporarily deployed to ci October 30, 2023 16:12 — with GitHub Actions Inactive
@meaksh meaksh temporarily deployed to ci October 30, 2023 16:12 — with GitHub Actions Inactive
@meaksh meaksh temporarily deployed to ci October 30, 2023 16:12 — with GitHub Actions Inactive
@meaksh meaksh temporarily deployed to ci October 30, 2023 16:13 — with GitHub Actions Inactive
@meaksh meaksh temporarily deployed to ci October 30, 2023 16:13 — with GitHub Actions Inactive
@meaksh meaksh temporarily deployed to ci October 30, 2023 17:23 — with GitHub Actions Inactive
@meaksh meaksh temporarily deployed to ci October 30, 2023 17:23 — with GitHub Actions Inactive
@meaksh meaksh temporarily deployed to ci October 30, 2023 17:23 — with GitHub Actions Inactive
@meaksh meaksh temporarily deployed to ci October 30, 2023 17:24 — with GitHub Actions Inactive
@meaksh meaksh temporarily deployed to ci October 30, 2023 17:24 — with GitHub Actions Inactive
@meaksh meaksh temporarily deployed to ci October 30, 2023 17:24 — with GitHub Actions Inactive
@BadgerOps
Copy link
Copy Markdown
Contributor

I'm excited to see this PR! - I'm in an environment where setting/tuning keep-alive would be very beneficial.

@meaksh meaksh force-pushed the master-enable-keepalive-on-salt-ssh-connection branch from 632e23e to dd19465 Compare October 31, 2023 10:22
@meaksh meaksh temporarily deployed to ci October 31, 2023 10:49 — with GitHub Actions Inactive
@meaksh meaksh temporarily deployed to ci October 31, 2023 10:49 — with GitHub Actions Inactive
@meaksh meaksh temporarily deployed to ci October 31, 2023 10:49 — with GitHub Actions Inactive
@meaksh meaksh temporarily deployed to ci October 31, 2023 10:49 — with GitHub Actions Inactive
@meaksh meaksh temporarily deployed to ci October 31, 2023 10:50 — with GitHub Actions Inactive
agraul pushed a commit to agraul/salt that referenced this pull request Jan 27, 2025
…stack#610)

* 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

BACKPORT-UPSTREAM=saltstack#65488
@dwoz dwoz requested a review from a team as a code owner March 16, 2025 22:09
@twangboy twangboy force-pushed the master-enable-keepalive-on-salt-ssh-connection branch from 4823a10 to 041e584 Compare April 4, 2025 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:full Run the full test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants