Uploaded image for project: 'Automation Hub'
  1. Automation Hub
  2. AAH-431

Importer handle azure storage in addition to aws storage for file url access

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

    • Icon: Task Task
    • Resolution: Done
    • Icon: Normal Normal
    • None
    • None
    • Backend
    • AAH Sprint 5, AAH Sprint 6, AAH Sprint 7, AAH Sprint 8, AAH Sprint 9, AAH Sprint 10, AAH Sprint 11

      pulp-ansible passes an artifact file to galaxy-importer, currently we use a specific interface to access the backend storage url. This interface works for aws but not for azure (error listed below for pulp azure backend). If the current interface which passes a parameters arg provides an exception, we should try without the parameters arg.rg.

      Related PR in pulpcore: https://github.com/pulp/pulpcore/pull/1137/files

      In the future pulp-ansible should pass the url to galaxy-importer in a standard way (separate arg, etc).

       

      pulp [None]: rq.worker:INFO: 1@example-pulp-worker-7ddccf4b74-fr9jw: pulp_ansible.app.tasks.collections.import_collection(temp_file_pk=UUID('f229e75c-3878-4753-8aa7-8944ed86bec6')) (f43d7d3d-e711-434a-bc7a-4a51a9a3b874)pulp [261161b587f94719965c94c347d49e88]: pulp_ansible.app.tasks.collections:INFO: Processing collection from tmp/files/f2/29e75c-3878-4753-8aa7-8944ed86bec6pulp [261161b587f94719965c94c347d49e88]: azure.storage.common.storageclient:INFO: Client-Request-ID=27398fca-82ad-11eb-bb84-0242ac11000e Outgoing request: Method=GET, Path=/test/tmp/files/f2/29e75c-3878-4753-8aa7-8944ed86bec6, Query={'snapshot': None, 'timeout': '20'}, Headers={'x-ms-lease-id': None, 'If-Modified-Since': None, 'If-Unmodified-Since': None, 'If-Match': None, 'If-None-Match': None, 'x-ms-range': 'bytes=0-33554431', 'x-ms-version': '2019-02-02', 'User-Agent': 'Azure-Storage/2.1.0-2.1.0 (Python CPython 3.9.2; Linux 4.19.157)', 'x-ms-client-request-id': '27398fca-82ad-11eb-bb84-0242ac11000e', 'x-ms-date': 'Thu, 11 Mar 2021 21:02:56 GMT', 'Authorization': 'REDACTED'}.pulp [261161b587f94719965c94c347d49e88]: azure.storage.common.storageclient:INFO: Client-Request-ID=27398fca-82ad-11eb-bb84-0242ac11000e Receiving Response: Server-Timestamp=Thu, 11 Mar 2021 21:02:56 GMT, Server-Request-ID=9c0053d6-401e-006c-44b9-16fba3000000, HTTP Status Code=206, Message=Partial Content, Headers={'content-length': '131644', 'content-type': 'application/gzip', 'content-range': 'bytes 0-131643/131644', 'last-modified': 'Thu, 11 Mar 2021 21:02:56 GMT', 'accept-ranges': 'bytes', 'etag': '"0x8D8E4D10B37B574"', 'server': 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id': '9c0053d6-401e-006c-44b9-16fba3000000', 'x-ms-client-request-id': '27398fca-82ad-11eb-bb84-0242ac11000e', 'x-ms-version': '2019-02-02', 'x-ms-creation-time': 'Thu, 11 Mar 2021 21:02:56 GMT', 'x-ms-lease-status': 'unlocked', 'x-ms-lease-state': 'available', 'x-ms-blob-type': 'BlockBlob', 'x-ms-server-encrypted': 'true', 'date': 'Thu, 11 Mar 2021 21:02:56 GMT'}.pulp [261161b587f94719965c94c347d49e88]: azure.storage.common.storageclient:INFO: Client-Request-ID=2779f510-82ad-11eb-bb84-0242ac11000e Outgoing request: Method=DELETE, Path=/test/tmp/files/f2/29e75c-3878-4753-8aa7-8944ed86bec6, Query={'snapshot': None, 'timeout': '20'}, Headers={'x-ms-lease-id': None, 'x-ms-delete-snapshots': None, 'If-Modified-Since': None, 'If-Unmodified-Since': None, 'If-Match': None, 'If-None-Match': None, 'x-ms-version': '2019-02-02', 'User-Agent': 'Azure-Storage/2.1.0-2.1.0 (Python CPython 3.9.2; Linux 4.19.157)', 'x-ms-client-request-id': '2779f510-82ad-11eb-bb84-0242ac11000e', 'x-ms-date': 'Thu, 11 Mar 2021 21:02:56 GMT', 'Authorization': 'REDACTED'}.pulp [261161b587f94719965c94c347d49e88]: azure.storage.common.storageclient:INFO: Client-Request-ID=2779f510-82ad-11eb-bb84-0242ac11000e Receiving Response: Server-Timestamp=Thu, 11 Mar 2021 21:02:56 GMT, Server-Request-ID=9c0054df-401e-006c-3cb9-16fba3000000, HTTP Status Code=202, Message=Accepted, Headers={'content-length': '0', 'server': 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id': '9c0054df-401e-006c-3cb9-16fba3000000', 'x-ms-client-request-id': '2779f510-82ad-11eb-bb84-0242ac11000e', 'x-ms-version': '2019-02-02', 'x-ms-delete-type-permanent': 'true', 'date': 'Thu, 11 Mar 2021 21:02:56 GMT'}.pulp [261161b587f94719965c94c347d49e88]: rq.worker:ERROR: Traceback (most recent call last):  File "/usr/local/lib/python3.9/site-packages/rq/worker.py", line 975, in perform_job    rv = job.perform()  File "/usr/local/lib/python3.9/site-packages/rq/job.py", line 696, in perform    self._result = self._execute()  File "/usr/local/lib/python3.9/site-packages/rq/job.py", line 719, in _execute    return self.func(*self.args, **self.kwargs)  File "/usr/local/lib/python3.9/site-packages/pulp_ansible/app/tasks/collections.py", line 201, in import_collection    importer_result = process_collection(  File "/usr/local/lib/python3.9/site-packages/galaxy_importer/collection.py", line 56, in import_collection    return _import_collection(file, filename, logger, cfg)  File "/usr/local/lib/python3.9/site-packages/galaxy_importer/collection.py", line 72, in _import_collection    storage_archive_url = file.storage.url(file.name, parameters=parameters)TypeError: url() got an unexpected keyword argument 'parameters'Traceback (most recent call last):  File "/usr/local/lib/python3.9/site-packages/rq/worker.py", line 975, in perform_job    rv = job.perform()  File "/usr/local/lib/python3.9/site-packages/rq/job.py", line 696, in perform    self._result = self._execute()  File "/usr/local/lib/python3.9/site-packages/rq/job.py", line 719, in _execute    return self.func(*self.args, **self.kwargs)  File "/usr/local/lib/python3.9/site-packages/pulp_ansible/app/tasks/collections.py", line 201, in import_collection    importer_result = process_collection(  File "/usr/local/lib/python3.9/site-packages/galaxy_importer/collection.py", line 56, in import_collection    return _import_collection(file, filename, logger, cfg)  File "/usr/local/lib/python3.9/site-packages/galaxy_importer/collection.py", line 72, in _import_collection    storage_archive_url = file.storage.url(file.name, parameters=parameters)TypeError: url() got an unexpected keyword argument 'parameters'
      

              cspealma@redhat.com Clara Spealman (Inactive)
              awcrosby5 Andrew Crosby (Inactive)
              Archiver:
              ranumula@redhat.com Raju Anumula

                Created:
                Updated:
                Resolved:
                Archived: