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

Prevent source files in /tmp from being deleted by file.managed states #37023

Merged
merged 1 commit into from
Oct 16, 2016

Conversation

terminalmage
Copy link
Contributor

@terminalmage terminalmage commented Oct 14, 2016

Due to how the __clean_tmp() function works, if you use a source
file that is local to the minion but within the system's temp dir (e.g.
/tmp/foo.txt), it will be removed by the file.managed state. This stops
that by creating temp files with a specific prefix, and then only
cleaning files that match that prefix.

Fixes #37021.

This should be merged after #37022, and then merged forward, where it will conflict in develop. See the PR message for #37022 for more information on why this approach was taken.

Due to how the ``__clean_tmp()`` function works, if you use a source
file that is local to the minion but within the system's temp dir (e.g.
/tmp/foo.txt), it will be removed by the file.managed state. This stops
that by creating temp files with a specific prefix, and then only
cleaning files that match that prefix.
@rallytime rallytime merged commit 4e2ad07 into saltstack:2015.8 Oct 16, 2016
gitebra pushed a commit to gitebra/salt that referenced this pull request Oct 20, 2016
* upstream/develop:
  removed trailing whitespaces in apache_module.py
  Revert "Fix integration tests launching - remove redundant "config_dir" argument in call to ShellTestCase.run_run from SaltDaemonScriptBase._wait_until_running"
  use versionadded and deprecated warnings in apache_module
  Fix link in libvirt docs
  Clearer check.
  Add run_on_start to SCHEDULE_CONF (saltstack#37098)
  Fix issue saltstack#37063
  Add one more paragraph
  Restructure grain writing docs
  [2016.3] Update salt.utils.cloud references to __utils__ for cache funcs
  remove options from pylint (saltstack#37054)
  Update the Fedora installation docs
  Move strip to powershell block, add -NoProfile
  Further clarification on new grains docs from saltstack#37028
  Prevent source files in /tmp from being deleted by file.managed states (saltstack#37023)
  Prevent fallback to uptime on status.uptime for Solaris 9, 10 and 11.
  args does not always exist (saltstack#37019)
  Mitigates failure reports when making sure an existing supervisor process group is running, despite success.
@terminalmage terminalmage deleted the tempfile-handling-2015.8 branch November 30, 2016 03:40
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.

None yet

2 participants