Skip to content

Conversation

@ekohl
Copy link
Member

@ekohl ekohl commented Sep 7, 2023

This implements a rake task orchestration:tftp:prune to prune old files. The actual pruning logic is implemented on the Smart Proxy where Foreman only specified the age (token_duration * 60).

I considered making this a foreman-task, but we can't rely on that so it's a rake task.

This implements a rake task orchestration:tftp:prune to prune old files.
The actual pruning logic is implemented on the Smart Proxy where Foreman
only specified the age (token_duration * 60).
@theforeman-bot
Copy link
Member

Issues: #36730

@ehelms
Copy link
Member

ehelms commented Sep 7, 2023

The question for me is -- what should trigger this pruning? An event? A timer?

@ekohl
Copy link
Member Author

ekohl commented Sep 7, 2023

Good question.

I thought about some cron/timer/event, but because of the risk it currently might have (theforeman/smart-proxy#873 (review)) I'm hesitant right now.

The very first step could be to replace the existing foreman-maintain code (https://github.com/theforeman/foreman_maintain/blob/master/definitions/checks/foreman_proxy/check_tftp_storage.rb) with invoking this rake task. From an end user perspective there wouldn't a difference, except that it would run on all Smart Proxies instead of just the local one.

@ehelms
Copy link
Member

ehelms commented Sep 7, 2023

The very first step could be to replace the existing foreman-maintain code (https://github.com/theforeman/foreman_maintain/blob/master/definitions/checks/foreman_proxy/check_tftp_storage.rb) with invoking this rake task. From an end user perspective there wouldn't a difference, except that it would run on all Smart Proxies instead of just the local one.

That did occur to me and I think is a fair way to treat this -- purely as a re-factor and then later can consider how it might could be more self-healing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants