Issue #7109
closedChanging MEDIA_ROOT does not propagate to STATIC_ROOT etc
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.
Related issues
Updated by dkliban@redhat.com almost 4 years ago
- Related to Task #7178: Recommended installation layout added
Updated by dkliban@redhat.com almost 4 years ago
- Related to deleted (Task #7178: Recommended installation layout)
Updated by dkliban@redhat.com almost 4 years ago
- Is duplicate of Task #7178: Recommended installation layout added
Updated by dkliban@redhat.com almost 4 years ago
- Status changed from NEW to CLOSED - DUPLICATE
Closing in favor of #7178 which will be fixed in 3.10. Thank you for reporting this issue.