Project

Profile

Help

Issue #7109

Changing MEDIA_ROOT does not propagate to STATIC_ROOT etc

Added by kossusukka 4 months ago. Updated 4 months ago.

Status:
NEW
Priority:
Normal
Assignee:
-
Category:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
CentOS 7
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:

Description

Pulpcore: 3.4.1

Set MEDIA_ROOT = "/opt/pulp/data" in /etc/pulp/settings.py and create corresponding directories. /var/lib/pulp directory does not exist and is not supposed to (all data deployed in /opt/pulp)

Running "pulpcore-manager collectstatic" fails due to: PermissionError: [Errno 13] Permission denied: '/var/lib/pulp'

By editing MEDIA_ROOT directly inside venv-dir/lib64/python3.6/site-packages/pulpcore/app/settings.py everything works ok. Just user config (/etc/pulp/settings.py) are unable to change mediaroot.

This is due to os.path.join(MEDIA_ROOT, xxxxxxx -calls in default settings.py which are executed before loading dynamic/user config. Paths should be (re?)generated after loading user config.

This applies to STATIC_ROOT, FILE_UPLOAD_TEMP_DIR, CHUNKED_UPLOAD_DIR and possibly other paths which are defined by using MEDIA_ROOT before loading user defined config.

History

#1 Updated by fao89 4 months ago

  • Triaged changed from No to Yes

Please register to edit this issue

Also available in: Atom PDF