Issue #2229
closedUnhelpful error message when attempting to sync api/v1 from api/v2 endpoint
Description
When I tried
curl -X POST https://pulp-dev:443/pulp/api/v2/repositories/1a18d18e-b20e-471d-baa2-6aa108941122/actions/sync/ --data '{"override_config": {"feed": "https://registry-1.docker.io", "upstream_name": "busybox", "ssl_validation": false, "enable_v1": true}}'
Sync task failed with
PulpException: Could not fetch repository busybox from registry https://registry-1.docker.io - METHOD NOT ALLOWED DKR1007
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/celery/app/trace.py", line 240, in trace_task
R = retval = fun(*args, **kwargs)
File "/home/vagrant/devel/pulp/server/pulp/server/async/tasks.py", line 488, in call
return super(Task, self).__call__(*args, **kwargs)
File "/home/vagrant/devel/pulp/server/pulp/server/async/tasks.py", line 103, in call
return super(PulpTask, self).__call__(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/celery/app/trace.py", line 438, in protected_call
return self.run(*args, **kwargs)
File "/home/vagrant/devel/pulp/server/pulp/server/controllers/repository.py", line 760, in sync
sync_report = sync_repo(transfer_repo, conduit, call_config)
File "/home/vagrant/devel/pulp/server/pulp/server/async/tasks.py", line 673, in wrap_f
return f(*args, **kwargs)
File "/home/vagrant/devel/pulp_docker/plugins/pulp_docker/plugins/importers/importer.py", line 84, in sync_repo
return self.sync_step.process_lifecycle()
File "/home/vagrant/devel/pulp/server/pulp/plugins/util/publish_step.py", line 565, in process_lifecycle
super(PluginStep, self).process_lifecycle()
File "/home/vagrant/devel/pulp/server/pulp/plugins/util/publish_step.py", line 162, in process_lifecycle
step.process()
File "/home/vagrant/devel/pulp/server/pulp/plugins/util/publish_step.py", line 252, in process
self._process_block()
File "/home/vagrant/devel/pulp/server/pulp/plugins/util/publish_step.py", line 296, in _process_block
self.process_main()
File "/home/vagrant/devel/pulp_docker/plugins/pulp_docker/plugins/importers/v1_sync.py", line 51, in process_main
available_images = self.parent.v1_index_repository.get_image_ids()
File "/home/vagrant/devel/pulp_docker/plugins/pulp_docker/plugins/registry.py", line 166, in get_image_ids
reason=str(e))
PulpCodedException: Could not fetch repository busybox from registry https://registry-1.docker.io - METHOD NOT ALLOWED
but docker pull
$ docker pull busybox
latest: Pulling from docker.io/busybox
4185ddbe03f8: Pull complete
b05baf071fd5: Pull complete
Digest: sha256:65ce39ce3eb0997074a460adfb568d0b9f0f6a4392d97b6035630c9d7bf92402
Status: Downloaded newer image for docker.io/busybox:latest
worked
Updated by jluza over 7 years ago
So if I run sync with enable_v1 = true on upstream registry that supports only v2, it fails with METHOD NOT ALLOWED. But without it, task finishes successfully.
Updated by amacdona@redhat.com over 7 years ago
- Subject changed from Cannot sync from upstream registry to Unhelpful error message when attempting to sync api/v1 from api/v2 endpoint
Updated by ttereshc over 7 years ago
- Platform Release deleted (
2.10.1) - Target Release - Docker deleted (
2.1.0)
Updated by bmbouter about 5 years ago
- Status changed from NEW to CLOSED - WONTFIX
Updated by bmbouter about 5 years ago
Pulp 2 is approaching maintenance mode, and this Pulp 2 ticket is not being actively worked on. As such, it is being closed as WONTFIX. Pulp 2 is still accepting contributions though, so if you want to contribute a fix for this ticket, please reopen or comment on it. If you don't have permissions to reopen this ticket, or you want to discuss an issue, please reach out via the developer mailing list.