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

Feature request: Execution module with function(s) to clear files cached from the salt fileserver #34369

Open
terminalmage opened this issue Jun 29, 2016 · 9 comments
Assignees
Labels
Feature new functionality including changes to functionality and code refactors, etc.
Milestone

Comments

@terminalmage
Copy link
Contributor

terminalmage commented Jun 29, 2016

Currently, the minion fileserver cache is never purged. Adding functionality to control the minion fileserver cache would have a couple benefits:

  • Reclaim space on the minion
  • If a file with a password in it is cached to the minion, and later removed from the salt fileserver, its counterpart cached to the minion will remain there. Having the ability to easily clear it would help alleviate this potential security risk.
@terminalmage terminalmage self-assigned this Jun 29, 2016
@terminalmage terminalmage added this to the Approved milestone Jun 29, 2016
@terminalmage terminalmage added ZRELEASED - Carbon Feature new functionality including changes to functionality and code refactors, etc. ZD The issue is related to a Zendesk customer support ticket. labels Jun 29, 2016
@terminalmage
Copy link
Contributor Author

terminalmage commented Jun 29, 2016

ZD-702 > requested by Gary through ZD, has not been requested or committed to a customer

@meggiebot meggiebot added the P1 Priority 1 label Jul 13, 2016
@meggiebot
Copy link

@terminalmage how big is this feature add?

@UtahDave
Copy link
Contributor

I think some of this may already be done. I think there may be a runner function that clears the minion cache

@meggiebot meggiebot added P2 Priority 2 and removed P1 Priority 1 labels Jul 13, 2016
@terminalmage
Copy link
Contributor Author

@UtahDave To my knowledge that only clears grains/pillar/mine data. There is a saltutil.clear_cache function already, but it blows away all cached files in the minion cachedir.

The likely solution for this is a modification of this function that allows one to limit the function to just the fileserver cache. I might also add additional arguments to clean only files with a filename matching a pattern, or of a certain age, so that people can schedule a cache cleanup via cron to purge files older than N days.

@meggiebot this shouldn't take more than a day or two (famous last words), just haven't gotten around to it yet.

@terminalmage terminalmage modified the milestones: C 6, Approved Jul 15, 2016
@meggiebot meggiebot added TEAM Core ZRELEASED - 2017.7.0rc1 and removed ZRELEASED - Carbon ZD The issue is related to a Zendesk customer support ticket. labels Jul 26, 2016
@meggiebot meggiebot removed this from the C 6 milestone Jul 28, 2016
@Ch3LL Ch3LL added this to the Approved milestone Jul 28, 2016
@Ch3LL Ch3LL modified the milestones: Approved, oxygen Nov 22, 2017
@gtmanfred gtmanfred modified the milestones: oxygen, Approved May 7, 2018
@rallytime rallytime removed the ZRELEASED - Fluorine reitred label label Aug 2, 2018
@scallister
Copy link

Any updates on this issue?

@Oloremo
Copy link
Contributor

Oloremo commented Sep 26, 2019

This is a very much needed feature.

@max-arnold
Copy link
Contributor

See #51431

@Oloremo
Copy link
Contributor

Oloremo commented Nov 26, 2019

#51431 will remove everything in cache dir so it's far from perfect. I don't want to remove my custom modules\states etc.

@Oloremo
Copy link
Contributor

Oloremo commented Feb 3, 2020

I'm working on some archive.extracted state enchantments and cache control is the problem that I run on over and over. I'd really like to have an option to "keep N last releases" for archive.extracted case.

I understand that the cache is not really related to archive.extracted but they're interconnected a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature new functionality including changes to functionality and code refactors, etc.
Projects
None yet
Development

No branches or pull requests

10 participants