Problem:
No problem but rather a question.
If using an external nfs share mounted to /var/lib/pulp/media/artifact/4manRepos can I change the MEDIA_ROOT setting in the pulp config (/etc/pulp/settings.py) from the default value of “/var/lib/pulp/media” to “/var/lib/pulp/media/artifact/4manRepos” to use my external nfs share for storage of repo data?
Expected outcome:
Either YES I can and all pulp repo data will be stored on the intended nfs share or NO, that’s a bad idea because…
Foreman and Proxy versions:
3.13.0 Foreman and Proxy plugin versions:
katello 4.15.0
foreman_remote_execution 14.0.2
foreman_discovery 25.0.0
foreman_ansible 15.0.1
foreman-tasks 10.0.1 Distribution and version:
RockyLinux9.5
I think it’s fair to say that it can be edited without worries. Just note that, if Pulpcore settings are modified outside of custom hiera / foreman-installer, they will get wiped out during the next foreman-installer run.
Regarding “Just note that, if Pulpcore settings are modified outside of custom hiera / foreman-installer,” would the desired way be to do a foreman-installer katello specifying the MEDIA_ROOT variable with my new location or specify it in pulpcore_spec.rb? I’ll poke around, for my installation I probably won’t be running foreman-installer again anyways however, I’ll be sure to document this just in case.
The file that you’d need to edit is /etc/foreman-installer/custom-hiera.yaml, which the docs appendix I linked has some info about.
There are essentially only two ways to describe the Foreman configuration to the installer. One is via the normal flags passed into foreman-installer, and the other is with custom hiera.
I’m not sure changing the MEDIA_ROOT this way is the best solution. Please have a look at the installation layout. In particular this sentence:
These is also the cache_dir which is used to configure WORKING_DIRECTORY and FILE_UPLOAD_TEMP_DIR. This defaults to /var/lib/pulp/tmp. It is strongly recommended that this is on the same filesystem as MEDIA_ROOT.
The WORKING_DIRECTORY is used to stage downloads. Once completed, they are moved into the MEDIA_ROOT. Moving files on the same filesystem is a cheap operation. Between different filesystems it’s essentially a copy and is always going to be slower.
So under the hood we have these parameters, but they’re not really intended for users to change.
In our storage guidelines we recommend putting the entirety of /var/lib/pulp on NFS if you want to, though I don’t know how much we actually test this. Still, the other directories are really tiny I don’t see why you wouldn’t just mount /var/lib/pulp entirely.
Thank you, I agree with your thoughts about just mounting /var/lib/pulp/. This is a lab instance I’m working on so wrt filesystem size it’s not that large anyways. I’ll do that and report back on how it’s working out.
Hey, just want to say Thank you!! Just making /var/lib/pulp an nfs mount as suggested worked just fine following the documentation in the storage guide. The only snag which was due to me was that I forgot to chown pulp:pulp /var/lib/pulp after mounting it. As it was owned by root pulp failed to start b/c it couldn’t cd into that directory. Upon fixing that I’m good to go and am in the process of re-adding my repos.