Bug 2028446
| Summary: | Pulp: Add options to change the import and export path in /etc/pulp/settings.py | ||
|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | Ganesh Payelkar <gpayelka> |
| Component: | Installation | Assignee: | satellite6-bugs <satellite6-bugs> |
| Status: | CLOSED ERRATA | QA Contact: | Omkar Khatavkar <okhatavk> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 6.10.0 | CC: | ahumbe, egolov, ehelms, gtalreja, jlenz, jpasqual, matthew.lesieur, mmccune, myarboro, saydas, sjalgaon, wclark |
| Target Milestone: | 6.11.0 | Keywords: | Triaged |
| Target Release: | Unused | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | foreman-installer-3.1.2.6-1 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2022-07-05 14:30:33 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
I have an additional request here which could probably serve as an improvement I guess. We suggest users to use /var/www/html/pub/sat-import/ in following guide when they are importing content_iso's : https://access.redhat.com/documentation/en-us/red_hat_satellite/6.10/html-single/content_management_guide/index#configuring-satellite-to-synchronize-content-with-a-local-cdn-server_content-management So, should that not be a part of this setting in /etc/pulp/settings.py ? ALLOWED_IMPORT_PATHS = ["/var/lib/pulp/sync_imports", "/var/lib/pulp/imports"] Can we get this re-reviewed to see if this is something we supported in 6.9 and prior? if so, I'd say this is not an RFE and more of a bug that we can't support configuring export location I believe the reason custom hiera didn't work here is that the parameter values are specified by puppet-foreman_proxy_content in its resource like declaration of the pulpcore class: https://github.com/theforeman/puppet-foreman_proxy_content/blob/master/manifests/init.pp#L259-L260 Meanwhile the order of precedence for setting class parameters is 1. Parameter values are explicitly set with a resource-like class declaration. 2. Puppet performs a Hiera lookup in the style of <CLASS NAME>::<PARAMETER NAME>. 3. The default value set in the class definition. So #1 will take the highest priority in this case, and the hiera lookup (#2) will never get performed. What would be required in order to make this work, would be a parameter in the foreman_proxy_content module that could be overridden (currently it is conditionally hardcoded based on the scenario). @ehelms could you kindly remind me why we moved this from the installer component to the repositories component? Created redmine issue https://projects.theforeman.org/issues/34882 from this bug Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/34882 has been resolved. Verified this on Satellite 6.11 with Snap 21. It is working as expected. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: Satellite 6.11 Release), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2022:5498 |
Description of problem: [RFE] Add options to change the import and export path in /etc/pulp/settings.py Version-Release number of selected component (if applicable): satellite-6.10 How reproducible: New installation Actual results: There is no option available through custom-hiera.yaml or satellite-installer to change the below directories to custom path # cat /etc/pulp/settings.py ALLOWED_IMPORT_PATHS = ["/var/lib/pulp/sync_imports", "/var/lib/pulp/imports"] ALLOWED_EXPORT_PATHS = ["/var/lib/pulp/exports"] It seems to be a hard-coded in the configuration : # cat /usr/share/foreman-installer/modules/foreman_proxy_content/manifests/init.pp |grep -iE "sync_imports|imports" $pulpcore_allowed_import_path = ['/var/lib/pulp/sync_imports'] $pulpcore_allowed_import_path = ['/var/lib/pulp/sync_imports', '/var/lib/pulp/imports'] # cat /usr/share/foreman-installer/modules/pulpcore/templates/settings.py.erb ALLOWED_IMPORT_PATHS = <%= scope['pulpcore::allowed_import_path'] %> ALLOWED_EXPORT_PATHS = <%= scope['pulpcore::allowed_export_path'] %> Expected results: If changing the import and export path is allowed, then we will need a module for custom-hiera.yaml and satellite-installer parameter Additional info: Tried the below parameters in hiera but not work after running the installer. # cat /etc/foreman-installer/custom-hiera.yaml pulpcore::allowed_import_path: ['/mnt/test5', '/mnt/test6'] pulpcore::allowed_export_path: ['/mnt/test7']