Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-14713

In Satellite GUI, under Administer setting, Updating/Setting a Pulp 3 export destination filepath does not work.

XMLWordPrintable

    • Sprint 111, Overflow
    • Moderate
    • None

      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

      1. 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.

            1. update the file with the below change:-
      1. 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"]

      1. save and exit

      Next restart the services of the Red Hat Satellite server.

      1. satellite-maintain service restart

      Next tried to export and it works:-

      1. 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

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

              jira-bugzilla-migration RH Bugzilla Integration
              jira-bugzilla-migration RH Bugzilla Integration
              RH Bugzilla Integration RH Bugzilla Integration
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: