Repository navigation
Remove pre-3006 install support from svtminion.sh - #80
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
linux/svtminion.shonly installs Salt 3006 and later from the Broadcom repository. Those tarballs providesalt/salt-minion, so the pre-3006salt/run/runlayout can no longer be installed. The code that generated/usr/bin/salt-minionand/usr/bin/salt-callwrapper scripts for that layout could therefore never run on a fresh install.What changed
_create_pre_3006_helper_scriptsandsalt_wrapper_file_list.salt-minionandsalt-callfrom the onedir.POST_3005_FLAGand its three assignments._find_salt_pidno longer switches on it.What did not change
An existing pre-3006 onedir install is still detected, so
--remove,--statusand--reconfigkeep working on machines that have one._check_onedir_minion_installstill returns 1 forsalt/run/runand 2 forsalt/salt-minion._find_salt_pidmatches both/usr/bin/salt-minionandsalt/run/run minionin a singlepgreppattern.The first version of this change dropped that detection, and it would have made
--removeignore old installs. The third commit restores it.Tests
tests/linux/test_onedir_detection.shcovers_check_onedir_minion_install(no install, 3006 and later, pre-3006, both layouts) and_find_salt_pid(both process patterns, no match).ci.ymlandtemplates/ci.ymlwith the other Linux unit tests.tests/linux/test_*.shpass.shellcheckand the Rocky 9 end-to-end install were not run locally and will run in CI.Notes for review
Find-StandardSaltInstallationandGet-SaltVersiondetect standard installs made by the Salt installer. They stop the script from installing over those installs, andtest_existing_salt.ps1covers them.