Full log traceback:
Apr 30 06:39:44 pulphost.domain.local gunicorn[23232]: pulp [fb5f8febe0cf4fc88bc1857f87f4054c]: - admin [30/Apr/2021:06:39:44 +0000] "POST /pulp/api/v3/repositories/deb/apt/dbd1bbf7-a5ef-46b6-922a-0ddf62b92ebc/sync/ HTTP/1.0" 202 67 "-" "HTTPie/0.9.8"
Apr 30 06:39:44 pulphost.domain.local rq[22865]: pulp [None]: rq.worker:INFO: 22865@pulphost.domain.local: bda07a1f-7f81-4f50-9914-ae453df2ca26
Apr 30 06:39:44 pulphost.domain.local rq[23117]: pulp [fb5f8febe0cf4fc88bc1857f87f4054c]: rq.worker:INFO: resource-manager: Job OK (02c00f37-c7a7-47d6-b5d0-ee7f09b4069e)
Apr 30 06:39:46 pulphost.domain.local rq[22865]: pulp [fb5f8febe0cf4fc88bc1857f87f4054c]: pulp_deb.app.tasks.synchronizing:INFO: Downloading Release file for distribution: "bullseye"
Apr 30 06:39:46 pulphost.domain.local rq[22865]: pulp [fb5f8febe0cf4fc88bc1857f87f4054c]: rq.worker:ERROR: Traceback (most recent call last):
Apr 30 06:39:46 pulphost.domain.local rq[22865]: File "/usr/local/lib/pulp/lib/python3.6/site-packages/pulpcore/app/models/repository.py", line 307, in download_factory
Apr 30 06:39:46 pulphost.domain.local rq[22865]: return self._download_factory
Apr 30 06:39:46 pulphost.domain.local rq[22865]: AttributeError: 'AptRemote' object has no attribute '_download_factory'
Apr 30 06:39:46 pulphost.domain.local rq[22865]: During handling of the above exception, another exception occurred:
Apr 30 06:39:46 pulphost.domain.local rq[22865]: Traceback (most recent call last):
Apr 30 06:39:46 pulphost.domain.local rq[22865]: File "/usr/local/lib/pulp/lib/python3.6/site-packages/rq/worker.py", line 1008, in perform_job
Apr 30 06:39:46 pulphost.domain.local rq[22865]: rv = job.perform()
Apr 30 06:39:46 pulphost.domain.local rq[22865]: File "/usr/local/lib/pulp/lib/python3.6/site-packages/rq/job.py", line 706, in perform
Apr 30 06:39:46 pulphost.domain.local rq[22865]: self._result = self._execute()
Apr 30 06:39:46 pulphost.domain.local rq[22865]: File "/usr/local/lib/pulp/lib/python3.6/site-packages/rq/job.py", line 729, in _execute
Apr 30 06:39:46 pulphost.domain.local rq[22865]: result = self.func(*self.args, **self.kwargs)
Apr 30 06:39:46 pulphost.domain.local rq[22865]: File "/usr/local/lib/pulp/lib/python3.6/site-packages/pulp_deb/app/tasks/synchronizing.py", line 122, in synchronize
Apr 30 06:39:46 pulphost.domain.local rq[22865]: DebDeclarativeVersion(first_stage, repository, mirror=mirror).create()
Apr 30 06:39:46 pulphost.domain.local rq[22865]: File "/usr/local/lib/pulp/lib/python3.6/site-packages/pulpcore/plugin/stages/declarative_version.py", line 149, in create
Apr 30 06:39:46 pulphost.domain.local rq[22865]: loop.run_until_complete(pipeline)
Apr 30 06:39:46 pulphost.domain.local rq[22865]: File "/usr/lib/python3.6/asyncio/base_events.py", line 484, in run_until_complete
Apr 30 06:39:46 pulphost.domain.local rq[22865]: return future.result()
Apr 30 06:39:46 pulphost.domain.local rq[22865]: File "/usr/local/lib/pulp/lib/python3.6/site-packages/pulpcore/plugin/stages/api.py", line 225, in create_pipeline
Apr 30 06:39:46 pulphost.domain.local rq[22865]: await asyncio.gather(*futures)
Apr 30 06:39:46 pulphost.domain.local rq[22865]: File "/usr/local/lib/pulp/lib/python3.6/site-packages/pulpcore/plugin/stages/api.py", line 43, in __call__
Apr 30 06:39:46 pulphost.domain.local rq[22865]: await self.run()
Apr 30 06:39:46 pulphost.domain.local rq[22865]: File "/usr/local/lib/pulp/lib/python3.6/site-packages/pulpcore/plugin/stages/artifact_stages.py", line 174, in run
Apr 30 06:39:46 pulphost.domain.local rq[22865]: pb.done += task.result() # download_count
Apr 30 06:39:46 pulphost.domain.local rq[22865]: File "/usr/local/lib/pulp/lib/python3.6/site-packages/pulpcore/plugin/stages/artifact_stages.py", line 200, in _handle_content_unit
Apr 30 06:39:46 pulphost.domain.local rq[22865]: await asyncio.gather(*downloaders_for_content)
Apr 30 06:39:46 pulphost.domain.local rq[22865]: File "/usr/local/lib/pulp/lib/python3.6/site-packages/pulp_deb/app/tasks/synchronizing.py", line 135, in download
Apr 30 06:39:46 pulphost.domain.local rq[22865]: await super().download()
Apr 30 06:39:46 pulphost.domain.local rq[22865]: File "/usr/local/lib/pulp/lib/python3.6/site-packages/pulpcore/plugin/stages/models.py", line 87, in download
Apr 30 06:39:46 pulphost.domain.local rq[22865]: downloader = self.remote.get_downloader(url=self.url, **validation_kwargs)
Apr 30 06:39:46 pulphost.domain.local rq[22865]: File "/usr/local/lib/pulp/lib/python3.6/site-packages/pulpcore/app/models/repository.py", line 371, in get_downloader
Apr 30 06:39:46 pulphost.domain.local rq[22865]: return self.download_factory.build(url, **kwargs)
Apr 30 06:39:46 pulphost.domain.local rq[22865]: File "/usr/local/lib/pulp/lib/python3.6/site-packages/pulpcore/app/models/repository.py", line 309, in download_factory
Apr 30 06:39:46 pulphost.domain.local rq[22865]: self._download_factory = DownloaderFactory(self)
Apr 30 06:39:46 pulphost.domain.local rq[22865]: File "/usr/local/lib/pulp/lib/python3.6/site-packages/pulpcore/download/factory.py", line 88, in __init__
Apr 30 06:39:46 pulphost.domain.local rq[22865]: self._session = self._make_aiohttp_session_from_remote()
Apr 30 06:39:46 pulphost.domain.local rq[22865]: File "/usr/local/lib/pulp/lib/python3.6/site-packages/pulpcore/download/factory.py", line 129, in _make_aiohttp_session_from_remote
Apr 30 06:39:46 pulphost.domain.local rq[22865]: headers.update(json.loads(self._remote.headers))
Apr 30 06:39:46 pulphost.domain.local rq[22865]: File "/usr/lib/python3.6/json/__init__.py", line 348, in loads
Apr 30 06:39:46 pulphost.domain.local rq[22865]: 'not {!r}'.format(s.__class__.__name__))
Apr 30 06:39:46 pulphost.domain.local rq[22865]: TypeError: the JSON object must be str, bytes or bytearray, not 'list'
Apr 30 06:39:46 pulphost.domain.local rq[22865]: Traceback (most recent call last):
Apr 30 06:39:46 pulphost.domain.local rq[22865]: File "/usr/local/lib/pulp/lib/python3.6/site-packages/pulpcore/app/models/repository.py", line 307, in download_factory
Apr 30 06:39:46 pulphost.domain.local rq[22865]: return self._download_factory
Apr 30 06:39:46 pulphost.domain.local rq[22865]: AttributeError: 'AptRemote' object has no attribute '_download_factory'
Apr 30 06:39:46 pulphost.domain.local rq[22865]: During handling of the above exception, another exception occurred:
Apr 30 06:39:46 pulphost.domain.local rq[22865]: Traceback (most recent call last):
Apr 30 06:39:46 pulphost.domain.local rq[22865]: File "/usr/local/lib/pulp/lib/python3.6/site-packages/rq/worker.py", line 1008, in perform_job
Apr 30 06:39:46 pulphost.domain.local rq[22865]: rv = job.perform()
Apr 30 06:39:46 pulphost.domain.local rq[22865]: File "/usr/local/lib/pulp/lib/python3.6/site-packages/rq/job.py", line 706, in perform
Apr 30 06:39:46 pulphost.domain.local rq[22865]: self._result = self._execute()
Apr 30 06:39:46 pulphost.domain.local rq[22865]: File "/usr/local/lib/pulp/lib/python3.6/site-packages/rq/job.py", line 729, in _execute
Apr 30 06:39:46 pulphost.domain.local rq[22865]: result = self.func(*self.args, **self.kwargs)
Apr 30 06:39:46 pulphost.domain.local rq[22865]: File "/usr/local/lib/pulp/lib/python3.6/site-packages/pulp_deb/app/tasks/synchronizing.py", line 122, in synchronize
Apr 30 06:39:46 pulphost.domain.local rq[22865]: DebDeclarativeVersion(first_stage, repository, mirror=mirror).create()
Apr 30 06:39:46 pulphost.domain.local rq[22865]: File "/usr/local/lib/pulp/lib/python3.6/site-packages/pulpcore/plugin/stages/declarative_version.py", line 149, in create
Apr 30 06:39:46 pulphost.domain.local rq[22865]: loop.run_until_complete(pipeline)
Apr 30 06:39:46 pulphost.domain.local rq[22865]: File "/usr/lib/python3.6/asyncio/base_events.py", line 484, in run_until_complete
Apr 30 06:39:46 pulphost.domain.local rq[22865]: return future.result()
Apr 30 06:39:46 pulphost.domain.local rq[22865]: File "/usr/local/lib/pulp/lib/python3.6/site-packages/pulpcore/plugin/stages/api.py", line 225, in create_pipeline
Apr 30 06:39:46 pulphost.domain.local rq[22865]: await asyncio.gather(*futures)
Apr 30 06:39:46 pulphost.domain.local rq[22865]: File "/usr/local/lib/pulp/lib/python3.6/site-packages/pulpcore/plugin/stages/api.py", line 43, in __call__
Apr 30 06:39:46 pulphost.domain.local rq[22865]: await self.run()
Apr 30 06:39:46 pulphost.domain.local rq[22865]: File "/usr/local/lib/pulp/lib/python3.6/site-packages/pulpcore/plugin/stages/artifact_stages.py", line 174, in run
Apr 30 06:39:46 pulphost.domain.local rq[22865]: pb.done += task.result() # download_count
Apr 30 06:39:46 pulphost.domain.local rq[22865]: File "/usr/local/lib/pulp/lib/python3.6/site-packages/pulpcore/plugin/stages/artifact_stages.py", line 200, in _handle_content_unit
Apr 30 06:39:46 pulphost.domain.local rq[22865]: await asyncio.gather(*downloaders_for_content)
Apr 30 06:39:46 pulphost.domain.local rq[22865]: File "/usr/local/lib/pulp/lib/python3.6/site-packages/pulp_deb/app/tasks/synchronizing.py", line 135, in download
Apr 30 06:39:46 pulphost.domain.local rq[22865]: await super().download()
Apr 30 06:39:46 pulphost.domain.local rq[22865]: File "/usr/local/lib/pulp/lib/python3.6/site-packages/pulpcore/plugin/stages/models.py", line 87, in download
Apr 30 06:39:46 pulphost.domain.local rq[22865]: downloader = self.remote.get_downloader(url=self.url, **validation_kwargs)
Apr 30 06:39:46 pulphost.domain.local rq[22865]: File "/usr/local/lib/pulp/lib/python3.6/site-packages/pulpcore/app/models/repository.py", line 371, in get_downloader
Apr 30 06:39:46 pulphost.domain.local rq[22865]: return self.download_factory.build(url, **kwargs)
Apr 30 06:39:46 pulphost.domain.local rq[22865]: File "/usr/local/lib/pulp/lib/python3.6/site-packages/pulpcore/app/models/repository.py", line 309, in download_factory
Apr 30 06:39:46 pulphost.domain.local rq[22865]: self._download_factory = DownloaderFactory(self)
Apr 30 06:39:46 pulphost.domain.local rq[22865]: File "/usr/local/lib/pulp/lib/python3.6/site-packages/pulpcore/download/factory.py", line 88, in __init__
Apr 30 06:39:46 pulphost.domain.local rq[22865]: self._session = self._make_aiohttp_session_from_remote()
Apr 30 06:39:46 pulphost.domain.local rq[22865]: File "/usr/local/lib/pulp/lib/python3.6/site-packages/pulpcore/download/factory.py", line 129, in _make_aiohttp_session_from_remote
Apr 30 06:39:46 pulphost.domain.local rq[22865]: headers.update(json.loads(self._remote.headers))
Apr 30 06:39:46 pulphost.domain.local rq[22865]: File "/usr/lib/python3.6/json/__init__.py", line 348, in loads
Apr 30 06:39:46 pulphost.domain.local rq[22865]: 'not {!r}'.format(s.__class__.__name__))
Apr 30 06:39:46 pulphost.domain.local rq[22865]: TypeError: the JSON object must be str, bytes or bytearray, not 'list'
Fixes ability to specify custom headers on a Remote
The Remotes APIs accepts a list of headers to be sent with each request during sync. However, the headers were not being properly passed to aiohttp. This patch fixes how the headers are passed to aiohttp.
This patch also ensures that any User-Agent headers configured on a remote are appended to the User-Agent string generated by pulp.
fixes: #8689 https://pulp.plan.io/issues/8689