Skip to content

Remove pre-3006 install support from svtminion.sh - #80

Merged
twangboy merged 3 commits into
saltstack:mainfrom
twangboy:remove-pre-3006-support
Nov 14, 2026
Merged

twangboy merged 3 commits into
saltstack:mainfrom
twangboy:remove-pre-3006-support

Conversation

@twangboy

Copy link
Copy Markdown
Contributor

Why

linux/svtminion.sh only installs Salt 3006 and later from the Broadcom repository. Those tarballs provide salt/salt-minion, so the pre-3006 salt/run/run layout can no longer be installed. The code that generated /usr/bin/salt-minion and /usr/bin/salt-call wrapper scripts for that layout could therefore never run on a fresh install.

What changed

  • Removed _create_pre_3006_helper_scripts and salt_wrapper_file_list.
  • Removed the pre-3006 branch in the install step. It now always symlinks salt-minion and salt-call from the onedir.
  • Removed POST_3005_FLAG and its three assignments. _find_salt_pid no longer switches on it.

What did not change

An existing pre-3006 onedir install is still detected, so --remove, --status and --reconfig keep working on machines that have one.

  • _check_onedir_minion_install still returns 1 for salt/run/run and 2 for salt/salt-minion.
  • _find_salt_pid matches both /usr/bin/salt-minion and salt/run/run minion in a single pgrep pattern.

The first version of this change dropped that detection, and it would have made --remove ignore old installs. The third commit restores it.

Tests

  • New tests/linux/test_onedir_detection.sh covers _check_onedir_minion_install (no install, 3006 and later, pre-3006, both layouts) and _find_salt_pid (both process patterns, no match).
  • It is added to ci.yml and templates/ci.yml with the other Linux unit tests.
  • The test commit comes first and passes against the old code, so it records the behaviour before the cleanup.
  • Run locally: all five tests/linux/test_*.sh pass. shellcheck and the Rocky 9 end-to-end install were not run locally and will run in CI.

Notes for review

  • Commits are in order: tests, cleanup, restore detection. The last two could be squashed.
  • The Windows script is unchanged. Its legacy checks in Find-StandardSaltInstallation and Get-SaltVersion detect standard installs made by the Salt installer. They stop the script from installing over those installs, and test_existing_salt.ps1 covers them.

Characterize _check_onedir_minion_install and _find_salt_pid, including
the pre-3006 behaviour, before removing pre-3006 support.
The script only installs Salt 3006 and later from the Broadcom
repository, whose tarballs provide salt/salt-minion, so the pre-3006
salt/run/run layout can no longer be installed.

- Remove _create_pre_3006_helper_scripts and salt_wrapper_file_list
- Remove the pre-3006 branch when linking salt-minion and salt-call
- Detect only the salt/salt-minion layout in
  _check_onedir_minion_install, which now returns 1 when found
- Drop POST_3005_FLAG and the run/run pgrep fallback in _find_salt_pid
- Update tests to match
Removing pre-3006 support also dropped detection of an existing
salt/run/run install, so --remove, --status and --reconfig treated it as
not installed. Restore detection (and the run/run process lookup) while
leaving the wrapper script generation removed.
@twangboy twangboy self-assigned this Nov 13, 2026
@twangboy
twangboy merged commit b9f330e into saltstack:main Nov 14, 2026
21 checks passed
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.

1 participant