Skip to content

Fixes #36730 - Implement pruning of old TFTP files - #9825

Draft
ekohl wants to merge 1 commit into
theforeman:developfrom
ekohl:36730-rake-task-prune-old-tftp-files
Draft

Fixes #36730 - Implement pruning of old TFTP files#9825
ekohl wants to merge 1 commit into
theforeman:developfrom
ekohl:36730-rake-task-prune-old-tftp-files

Conversation

@ekohl

@ekohl ekohl commented Sep 7, 2023

Copy link
Copy Markdown
Member

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
Copy Markdown
Member

Issues: #36730

@ehelms

ehelms commented Sep 7, 2023

Copy link
Copy Markdown
Member

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

@ekohl

ekohl commented Sep 7, 2023

Copy link
Copy Markdown
Member Author

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

ehelms commented Sep 7, 2023

Copy link
Copy Markdown
Member

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