Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2208013

Summary: pulpcore_export_destination value not added to allowed export path for content exports in Satelite
Product: Red Hat Satellite Reporter: Taft Sanders <tasander>
Component: Inter Satellite SyncAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED NOTABUG QA Contact: Satellite QE Team <sat-qe-bz-list>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.12.3CC: ahumbe, jpasqual, paji, rlavi
Target Milestone: UnspecifiedKeywords: WorkAround
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-06-26 14:35:57 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:

Description Taft Sanders 2023-05-17 16:38:42 UTC
Description of problem:
Setting a custom export location in Satellite WebUI > Administrator > Settings > Content > pulpcore_export_destination does not work

Version-Release number of selected component (if applicable):
satellite-6.12.3-1.el8sat.noarch

How reproducible:
Every time

Steps to Reproduce:
1. Sync a repository on immediate sync policy
2. Set the pulpcore_export_destination to any destination pulp can read and write to, like /tmp
3. Export the repository

Actual results:
[root@bombsat612 ~]# hammer content-export complete repository --id 6
[...................................................................................................................................................................] [100%]
Error: Error message: the server returns an error
HTTP status code: 400
Response headers: {"Date"=>"Wed, 17 May 2023 16:24:38 GMT", "Server"=>"gunicorn", "Content-Type"=>"application/json", "Vary"=>"Accept,Cookie", "Allow"=>"GET, POST, HEAD, OPTIONS", "X-Frame-Options"=>"DENY", "Content-Length"=>"171", "X-Content-Type-Options"=>"nosniff", "Referrer-Policy"=>"same-origin", "Correlation-ID"=>"80d36b95-7540-4268-adb0-1db9302f56be", "Access-Control-Expose-Headers"=>"Correlation-ID", "Via"=>"1.1 bombsat612.d.sysmgmt.cee.redhat.com", "Connection"=>"close"}
Response body: {"path":["Path '/tmp/Default_Organization/Export-Red_Hat_Satellite_Client_6_for_RHEL_7_Server_RPMs_x86_64-6/6.0/2023-05-17T12-24-38-04-00' is not an allowed export path"]}


Expected results:
[root@bombsat612 ~]# hammer content-export complete repository --id 6
[...................................................................................................................................................................] [100%]
Generated /tmp/Default_Organization/Export-Red_Hat_Satellite_Client_6_for_RHEL_7_Server_RPMs_x86_64-6/7.0/2023-05-17T12-25-50-04-00/metadata.json


Additional info:
This setting's value doesn't appear to be taken into consideration even with making the code change for a known issue where pulp doesn't get the polling interval and bulk_load_size values from settings (Bugzilla 2121288).

A simple work-around is to add the path to the /etc/pulp/settings.py parameter 'ALLOWED_EXPORT_PATHS' like the following:
BEFORE:
  ALLOWED_EXPORT_PATHS = ["/var/lib/pulp/exports"]
AFTER:
  ALLOWED_EXPORT_PATHS = ["/var/lib/pulp/exports","/tmp"]

Then restart the pulpcore services:
# systemctl restart pulpcore*

The export worked after making this change:
[root@bombsat612 ~]# vim /etc/pulp/settings.py
[root@bombsat612 ~]# systemctl restart pulpcore*
[root@bombsat612 ~]# hammer content-export complete repository --id 6
[...................................................................................................................................................................] [100%]
Generated /tmp/Default_Organization/Export-Red_Hat_Satellite_Client_6_for_RHEL_7_Server_RPMs_x86_64-6/7.0/2023-05-17T12-25-50-04-00/metadata.json

Comment 1 Joniel Pasqualetto 2023-05-17 18:39:24 UTC
I think this is expected if you don't previously add an additional export path to pulp.

Do it like this (to be persistent):

~~~
satellite-installer --foreman-proxy-content-pulpcore-additional-export-paths /satellite_exports
~~~

Then you should be able to modify the configuration on the webUI to match it.

Comment 2 Brad Buckingham 2023-05-18 15:24:06 UTC
Partha,

Is it expected that a user should perform both an installer command and Setting update to change the location of the export path?

Is it necessary to have both?

If so, should this be a documentation bugzilla or notabug?

Comment 3 Partha Aji 2023-06-20 18:20:26 UTC
This issue is a dupe of https://bugzilla.redhat.com/show_bug.cgi?id=2158186 and the outcome of that was there NOTABUG

If you are setting your new default path to be something that is not in the allowed_export paths you would need to run installer and restart. Since pulp services require that.

Recommend going through the comments in that bug.

Comment 4 Taft Sanders 2023-06-26 14:35:57 UTC
(In reply to Partha Aji from comment #3)
> This issue is a dupe of https://bugzilla.redhat.com/show_bug.cgi?id=2158186
> and the outcome of that was there NOTABUG
> 
> If you are setting your new default path to be something that is not in the
> allowed_export paths you would need to run installer and restart. Since pulp
> services require that.
> 
> Recommend going through the comments in that bug.

Based on the comments from Bugzilla 2158186, I'm closing this out as not a bug. I have filed an RFE instead to have the installer option '--foreman-proxy-content-pulpcore-additional-export-paths' set the setting 'pulpcore_export_destination' to the new value provided by default.

Comment 5 Taft Sanders 2023-08-28 14:37:06 UTC
(In reply to Taft Sanders from comment #4)
> (In reply to Partha Aji from comment #3)
> > This issue is a dupe of https://bugzilla.redhat.com/show_bug.cgi?id=2158186
> > and the outcome of that was there NOTABUG
> > 
> > If you are setting your new default path to be something that is not in the
> > allowed_export paths you would need to run installer and restart. Since pulp
> > services require that.
> > 
> > Recommend going through the comments in that bug.
> 
> Based on the comments from Bugzilla 2158186, I'm closing this out as not a
> bug. I have filed an RFE instead to have the installer option
> '--foreman-proxy-content-pulpcore-additional-export-paths' set the setting
> 'pulpcore_export_destination' to the new value provided by default.

RFE created: https://bugzilla.redhat.com/show_bug.cgi?id=2217525