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 2158186

Summary: In Satellite GUI, under Administer setting, Updating/Setting a Pulp 3 export destination filepath does not work.
Product: Red Hat Satellite Reporter: Satyajit Das <sadas>
Component: Inter Satellite SyncAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED NOTABUG QA Contact: Satellite QE Team <sat-qe-bz-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.12.0CC: ahumbe, apatel, bbuckingham, mhulan, paji, sat-qe-bz-list, saydas, steven.w-ctr.mercurio
Target Milestone: UnspecifiedKeywords: Triaged, WorkAround
Target Release: UnusedFlags: sadas: needinfo-
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-02 16:29:38 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 Satyajit Das 2023-01-04 14:19:17 UTC
Description of problem:

In Satellite GUI, under Administer setting, Updating/Setting a new Pulp 3 export destination filepath does not work and fails when exporting the content to the new path with the below error:-
[.............................................................................................................................................] 
Response body: {"path":["Path '/var/lib/pulp/test/RedHat/Test/1.0/2023-01-04T19-26-19-05-30' is not an allowed export path"]}
[.............................................................................................................................................] 


Version-Release number of selected component (if applicable):

6.11 and 6.12


How reproducible:

100%


Steps to Reproduce:

1. Create a new export destination path in the satellite CLI

# mkdir -p /var/lib/pulp/test && chown pulp:pulp /var/lib/pulp/test

2. Next Update the Pulp 3 export destination filepath in the Satellite GUI:-

Navigate to Satellite GUI > Administer settings > Content > Pulp 3 export destination filepath  

3. Export the content using hammer:-

hammer content-export complete version --id 2



Actual results:

[.............................................................................................................................................] [100%]
Error: Error message: the server returns an error
HTTP status code: 400
Response headers: {"Date"=>"Wed, 04 Jan 2023 14:10:44 GMT", "Server"=>"gunicorn", "Content-Type"=>"application/json", "Vary"=>"Accept,Cookie", "Allow"=>"GET, POST, HEAD, OPTIONS", "X-Frame-Options"=>"DENY", "Content-Length"=>"110", "X-Content-Type-Options"=>"nosniff", "Referrer-Policy"=>"same-origin", "Correlation-ID"=>"bedbbe52-21cf-4a12-b65b-870dd049297c", "Access-Control-Expose-Headers"=>"Correlation-ID", "Via"=>"1.1 satellite.example.com", "Connection"=>"close"}
Response body: {"path":["Path '/var/lib/pulp/test/RedHat/Test/1.0/2023-01-04T19-40-44-05-30' is not an allowed export path"]}



Expected results:

Should export to new destination without any errors.


Additional info:
====================================

Workaround to fix the issue.

#### update the file with the below change:-

# vi /etc/pulp/settings.py // Look for the ALLOWED_EXPORT_PATHS and update the path


ALLOWED_EXPORT_PATHS = ["/var/lib/pulp/exports", "/var/lib/pulp/test"]


# save and exit

Next restart the services of the Red Hat Satellite server.

# satellite-maintain service restart

Next tried to export and it works:-

# hammer content-export complete version --id 2
[.............................................................................................................................................] [100%]
Generated /var/lib/pulp/test/RedHat/Test/1.0/2023-01-04T19-45-03-05-30/metadata.json

====================================

Comment 1 Sayan Das 2023-01-10 09:22:20 UTC
I am sharing my thoughts here but they may not be correct.

I believe "Pulp 3 export destination file path" is only there to select a default export location but That location needs to be known and allowed by Pulp for export work i.e. /a /b and /c should be in ALLOWED_EXPORT_PATHS alongside with /var/lib/pulp/exports , before we can choose /a or /b or /c for "Pulp 3 export destination file path" in settings.

So the correct sequence should be:

* Use the "--foreman-proxy-content-pulpcore-additional-export-paths" installer option to add all the additional export path entries. 

* Then choose any one of them as the default path in "Pulp 3 export destination file path" in settings.


If this flow is correct, then 

* We need to have the description of "Pulp 3 export destination file path" settings updated perhaps.

* We also need to have this workflow documented in ISS\Export-Import section

Comment 4 Brad Buckingham 2023-02-16 16:27:11 UTC
Partha,

Can you take a look at this one and provide your thoughts?  Thanks!

Comment 10 Steven Mercurio 2023-12-13 08:39:48 UTC
If this is not a bug then in settings there should be a DROPDOWN COMBO BOX NOT A TYEXT FIELD that allows you to select KNOWN paths and a link to the DOC on setting additional paths in the description.

Also the 6.11 DOCs need to be updated at the VERY LEAST to mention that you need to run the installer to set export paths.

Also the flat out closing of a BZ without a single word is REALLY bad form!

Comment 11 Red Hat Bugzilla 2024-04-27 04:25:03 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days