-
Epic
-
Resolution: Unresolved
-
Major
-
None
-
None
-
None
Active Storage is the Rails standard way to manage files. It supports multiple backends: disk, s3, database, postgresql and more. This allows deployments on isolated environments, such as containers or multi-machine deployments.
Today Foreman doesn't have such an infrastructure, so for for the rendered report templates it's using a custom solution. Additionally, foreman_rh_cloud also invented its own mechanism. Then in some places it's using temporary files to pass file uploads between Foreman and DynFlow tasks.
Acceptance criteria:
- Foreman is configured to use ActiveStorage
- Code (including Foreman plugins) that deals with files is updated to use ActiveStorage
- Existing artifacts are migrated
Open Questions:
- Which backend(s) do we support?
Implementation hints:
- https://github.com/theforeman/foreman/pull/9642 was a previous PR to implement this.
- https://github.com/search?q=(org%3Atheforeman%20OR%20org%3Akatello)%20Rails.root%20-repo%3Atheforeman%2Fredmine%20%20NOT%20is%3Aarchived%20-path%3A%2F%5Etest%2F%20language%3ARuby%20-path%3A*.rake&type=code is a partial search that can find some cases, but it's incomplete. foreman_rh_cloud hardcodes /var/lib/foreman (https://github.com/theforeman/foreman_rh_cloud/blob/f6422b481419f90aa1c86b0262557895f0bfcef0/lib/foreman_inventory_upload.rb#L2-L10). What more is hiding out there?
- is related to
-
SAT-39137 foremanctl: Manifest upload fails with "No such file or directory @ rb_sysopen - /usr/share/foreman/tmp/import_<uuid>.zip"
-
- Refinement
-