Skip to content

Pulp volume ownership followup (SAT-47249) - #788

Open
lzap wants to merge 3 commits into
theforeman:masterfrom
lzap:pulp-volume-ownership-followup
Open

Pulp volume ownership followup (SAT-47249)#788
lzap wants to merge 3 commits into
theforeman:masterfrom
lzap:pulp-volume-ownership-followup

Conversation

@lzap

@lzap lzap commented Aug 26, 2026

Copy link
Copy Markdown
Member

Few changes as a follow-up to #734

  • Use variables instead harcoding 700
  • Recursing pulp content is a trap! Implemented suggested solution by @arvind4501 which only recurse when permissions were previously root:root.
  • Secrets should be owned by root, at least that is the pattern in the file

lzap and others added 3 commits August 26, 2026 16:40
Define pulp_container_uid and pulp_container_gid in base.yaml alongside
pulp_storage_path, and use them in the Pulp role tasks instead of
hardcoded UID/GID 700.

Co-authored-by: Cursor <cursoragent@cursor.com>
Stop recursing ownership on every deploy. Set owner on new directories
without recurse, then chown -R only when a volume path is still root-owned.
Apply the same conditional migration after restore, checking storage and
media paths so root-based backup content is corrected once.

Co-authored-by: Cursor <cursoragent@cursor.com>
Podman reads secret files when creating mounts; containers do not bind-mount
these paths directly. Restore root:root ownership for django_secret_key and
database_fields.symmetric.key after deploy and restore migrations.

Co-authored-by: Cursor <cursoragent@cursor.com>
(
restore_pulp_media_ownership.stat.exists and
restore_pulp_media_ownership.stat.uid == 0
)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I am not sure if checking media is necessary, just the root (storage) ownership might be enough.

owner: "700"
group: "700"
owner: root
group: root

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.

Why do these get owned by root instead of the pulp user?

register: restore_pulp_media_ownership

- name: Fix ownership after restore for non-root containers
- name: Migrate restored Pulp storage ownership from root to container user

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.

@sjha4 Can you take a look at the restore changes included in this PR?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants