Project

Profile

Help

Issue #5637

Not using proxy setting of pulpcore.download?

Added by Anonymous 12 months ago. Updated 9 months ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
-
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Sprint 61
Quarter:

Description

Behind corporate proxy the docker remote sync task returns:

    "error": {
        "traceback": "  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/rq/worker.py\", line 822, in perform_job\n    rv = job.perform()\n  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/rq/job.py\", line 605, in perform\n    self._result = self._execute()\n  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/rq/job.py\", line 611, in _execute\n    return self.func(*self.args, **self.kwargs)\n  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/pulp_docker/app/tasks/synchronize.py\", line 47, in synchronize\n    dv.create()\n  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/pulpcore/plugin/stages/declarative_version.py\", line 169, in create\n    loop.run_until_complete(pipeline)\n  File \"/usr/lib64/python3.6/asyncio/base_events.py\", line 484, in run_until_complete\n    return future.result()\n  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/pulpcore/plugin/stages/api.py\", line 209, in create_pipeline\n    await asyncio.gather(*futures)\n  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/pulpcore/plugin/stages/api.py\", line 43, in __call__\n    await self.run()\n  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/pulp_docker/app/tasks/sync_stages.py\", line 58, in run\n    await list_downloader.run(extra_data={'repo_name': repo_name})\n  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/pulpcore/plugin/download/base.py\", line 221, in run\n    return await self._run(extra_data=extra_data)\n  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/backoff/_async.py\", line 131, in retry\n    ret = await target(*args, **kwargs)\n  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/pulp_docker/app/downloaders.py\", line 62, in _run\n    async with self.session.get(self.url, headers=headers) as response:\n  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/aiohttp/client.py\", line 1012, in __aenter__\n    self._resp = await self._coro\n  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/aiohttp/client.py\", line 483, in _request\n    timeout=real_timeout\n  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/aiohttp/connector.py\", line 523, in connect\n    proto = await self._create_connection(req, traces, timeout)\n  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/aiohttp/connector.py\", line 859, in _create_connection\n    req, traces, timeout)\n  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/aiohttp/connector.py\", line 1004, in _create_direct_connection\n    raise last_exc\n  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/aiohttp/connector.py\", line 986, in _create_direct_connection\n    req=req, client_error=client_error)\n  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/aiohttp/connector.py\", line 943, in _wrap_create_connection\n    raise client_error(req.connection_key, exc) from exc\n",
        "description": "Cannot connect to host quay.io:443 ssl:default [Connect call failed ('23.23.190.62', 443)]"

Could it be that the proxy setting is not used:
https://github.com/pulp/pulp_docker/blob/4.0.0b7/pulp_docker/app/downloaders.py#L60

async with self.session.get(self.url, headers=headers) as response:

as compared to
https://github.com/pulp/pulpcore/blob/master/pulpcore/download/http.py#L182

async with self.session.get(self.url, proxy=self.proxy) as response:

Associated revisions

Revision fef5d5d0 View on GitHub
Added by Timoses 12 months ago

Use proxy for downloads

closes #5626 https://pulp.plan.io/issues/5626

History

#1 Updated by Anonymous 12 months ago

Adding "proxy=self.proxy" to the argument list of "session.get" resolves the issue.

Created a pull request here: https://github.com/pulp/pulp_docker/pull/440

#2 Updated by ipanova@redhat.com 12 months ago

  • Triaged changed from No to Yes
  • Sprint set to Sprint 61

#3 Updated by ipanova@redhat.com 12 months ago

  • Status changed from NEW to MODIFIED

#4 Updated by ipanova@redhat.com 11 months ago

  • Project changed from Docker Support to Container Support

#5 Updated by ipanova@redhat.com 11 months ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

#6 Updated by ipanova@redhat.com 9 months ago

  • Sprint/Milestone set to 1.0.0

Please register to edit this issue

Also available in: Atom PDF