-
Notifications
You must be signed in to change notification settings - Fork 551
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
Add support for specifying a directory other than /tmp for installation execution #2068
base: develop
Are you sure you want to change the base?
Conversation
@edlitmus You need to refresh, released v2024.12.12 today, fix the lint errors by running the following in your work directory And lastly, you need to add tests to ensure your changes to code are tested. |
Thanks, I refreshed and fixed the lint errors.
Any guides on adding tests for this? I'm not sure where to start on that. |
@edlitmus Adding tests using pytest, similar to Salt itself, except don't have to use nox. Take a look at https://github.com/saltstack/salt-bootstrap/blob/develop/tests/integration/test_installation.py and also Salt test and pytest documentation
Lastly, if you add a feature to Linux, you cannot ignore Windows, needs to be added there too, that is, bootstrap-salt.ps1 needs updating too. |
@dmurphy18 Sorry for the delay on this, I was taking time off, but I did some digging into the Windows side of this, and it doesn't look like the options for the Windows script are a match for the shell script. Also, I don't think it makes sense to add the same feature to the Windows script as I do not believe that As for the tests, I still need to look into how to add something to do validations. |
What does this PR do?
Adds an option to specify something other than
/tmp
for installation execution.What issues does this PR fix or reference?
Systems that have been hardened to CIS-2 benchmarks should have
/tmp
and/var/tmp
mounted with thenoexec
option. This causes installations to fail when trying to execute anything from/tmp
.New Behavior
Using the new option allows installations to proceed as expected. An example using the
ubuntu
user home directory:bash /home/ubuntu/bootstrap-salt.sh -X -U -A localhost -T /home/ubuntu onedir "$SALT_VERSION"