Skip to content

Support S3-compatible Pulp storage - #418

Open
jakduch wants to merge 1 commit into
theforeman:masterfrom
jakduch:feature/s3-storage
Open

jakduch wants to merge 1 commit into
theforeman:masterfrom
jakduch:feature/s3-storage

Conversation

@jakduch

@jakduch jakduch commented Oct 2, 2026 •

Copy link
Copy Markdown

Summary

Add optional S3-compatible content storage while keeping filesystem storage as the default.

This continues #379 against current master and addresses its open review findings:

  • install the stable pulpcore-storage-s3 capability from theforeman/pulpcore-packaging#3189, which follows the django-storages packaging in #3186;
  • preserve Django’s local staticfiles backend so collectstatic continues to work;
  • omit MEDIA_ROOT for object storage so Django's default empty value applies;
  • avoid managing the unused local media directory.

storage_options is passed through to django-storages, which supports AWS S3 and S3-compatible endpoints without hard-coding provider-specific options.

Verification

  • bundle exec rake spec: 308 examples, 0 failures
  • acceptance coverage applies the S3 configuration twice, verifies the installed capability and generated settings, and runs pulpcore-manager check on the nightly repository where the new package is introduced
  • Puppet lint and syntax checks pass
  • git diff --check passes

This is the installer-side prerequisite for optional object storage in the experimental theforeman/foreman-kubernetes integration.

AI assistance disclosure: OpenAI Codex (GPT-5.6 Sol High).

@ekohl ekohl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This reads well. Perhaps you could also add an acceptance test that exercises the new code paths? Or would that be too hard?

@jakduch

jakduch commented Oct 3, 2026

Copy link
Copy Markdown
Author

Added in c882d2a. The acceptance test applies the S3 configuration twice, verifies the package and generated settings, and runs pulpcore-manager check.

It is limited to the nightly repository because pulpcore-storage-s3 is introduced by theforeman/pulpcore-packaging#3189 and is not available in the older stable repositories.

@alexjfisher

Copy link
Copy Markdown
Contributor

I can take a look tomorrow too. I'm using S3, and was doing some bits in my profile code around it, that I was planning to turn into some upstream module patch at some stage.

Comment thread README.md Outdated
Comment thread manifests/init.pp
Comment thread README.md

@alexjfisher alexjfisher left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I can't see anything I currently have fudged into my profile that couldn't be replaced when this goes into the module.

Install the stable Pulpcore S3 package capability and render Django storage settings when object storage is selected. Preserve filesystem storage by default, keep static assets local, and leave MEDIA_ROOT unset for S3 so Django uses its default.

Co-Authored-By: OpenAI Codex (GPT-5.6 Sol High) <noreply@openai.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Waiting for review in other projects

Development

Successfully merging this pull request may close these issues.

3 participants