Project

Profile

Help

Issue #1640

closed

Pulp 2.7 should gracefully fail with Docker v2 feeds

Added by Ichimonji10 about 8 years ago. Updated about 5 years ago.

Status:
CLOSED - WONTFIX
Priority:
Normal
Assignee:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version - Docker:
1.0.0
Platform Release:
Target Release - Docker:
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

It is possible to create and sync a Docker repository via the CLI with the following commands, or commands like them:

pulp-admin docker repo create \
    --feed https://registry-1.docker.io \
    --repo-id abc123 \
    --upstream-name library/busybox
pulp-admin docker repo sync run --repo-id abc123

This command succeeds on the current master version of Pulp. It fails on Pulp 2.7, with the following message printed to stdout:

+----------------------------------------------------------------------+
    Synchronizing Repository [e4820ec7-2b78-422b-8ab6-8da5742cb19e]
+----------------------------------------------------------------------+

This command may be exited via ctrl+c without affecting the request.

Task Failed

METHOD NOT ALLOWED

The following can be found with journalctl:

Feb 08 17:50:30 dev pulp[7568]: celery.worker.job:ERROR: (7568-52000) Task pulp.server.managers.repo.sync.sync[a41b7aea-80f2-473d-9a3e-16555b506f57] raised unexpected: IOError('METHOD NOT ALLOWED',)
Feb 08 17:50:30 dev pulp[7568]: celery.worker.job:ERROR: (7568-52000) Traceback (most recent call last):
Feb 08 17:50:30 dev pulp[7568]: celery.worker.job:ERROR: (7568-52000)   File "/usr/lib/python2.7/site-packages/celery/app/trace.py", line 240, in trace_task
Feb 08 17:50:30 dev pulp[7568]: celery.worker.job:ERROR: (7568-52000)     R = retval = fun(*args, **kwargs)
Feb 08 17:50:30 dev pulp[7568]: celery.worker.job:ERROR: (7568-52000)   File "/home/vagrant/devel/pulp/server/pulp/server/async/tasks.py", line 393, in __call__
Feb 08 17:50:30 dev pulp[7568]: celery.worker.job:ERROR: (7568-52000)     return super(Task, self).__call__(*args, **kwargs)
Feb 08 17:50:30 dev pulp[7568]: celery.worker.job:ERROR: (7568-52000)   File "/usr/lib/python2.7/site-packages/celery/app/trace.py", line 437, in __protected_call__
Feb 08 17:50:30 dev pulp[7568]: celery.worker.job:ERROR: (7568-52000)     return self.run(*args, **kwargs)
Feb 08 17:50:30 dev pulp[7568]: celery.worker.job:ERROR: (7568-52000)   File "/home/vagrant/devel/pulp/server/pulp/server/managers/repo/sync.py", line 96, in sync
Feb 08 17:50:30 dev pulp[7568]: celery.worker.job:ERROR: (7568-52000)     call_config)
Feb 08 17:50:30 dev pulp[7568]: celery.worker.job:ERROR: (7568-52000)   File "/home/vagrant/devel/pulp/server/pulp/server/managers/repo/sync.py", line 150, in _do_sync
Feb 08 17:50:30 dev pulp[7568]: celery.worker.job:ERROR: (7568-52000)     sync_report = sync_repo(transfer_repo, conduit, call_config)
Feb 08 17:50:30 dev pulp[7568]: celery.worker.job:ERROR: (7568-52000)   File "/home/vagrant/devel/pulp/server/pulp/server/async/tasks.py", line 578, in wrap_f
Feb 08 17:50:30 dev pulp[7568]: celery.worker.job:ERROR: (7568-52000)     return f(*args, **kwargs)
Feb 08 17:50:30 dev pulp[7568]: celery.worker.job:ERROR: (7568-52000)   File "/home/vagrant/devel/pulp_docker/plugins/pulp_docker/plugins/importers/importer.py", line 84, in sync_repo
Feb 08 17:50:30 dev pulp[7568]: celery.worker.job:ERROR: (7568-52000)     return self.sync_step.sync()
Feb 08 17:50:30 dev pulp[7568]: celery.worker.job:ERROR: (7568-52000)   File "/home/vagrant/devel/pulp_docker/plugins/pulp_docker/plugins/importers/sync.py", line 125, in sync
Feb 08 17:50:30 dev pulp[7568]: celery.worker.job:ERROR: (7568-52000)     self.process_lifecycle()
Feb 08 17:50:30 dev pulp[7568]: celery.worker.job:ERROR: (7568-52000)   File "/home/vagrant/devel/pulp/server/pulp/plugins/util/publish_step.py", line 502, in process_lifecycle
Feb 08 17:50:30 dev pulp[7568]: celery.worker.job:ERROR: (7568-52000)     super(PluginStep, self).process_lifecycle()
Feb 08 17:50:30 dev pulp[7568]: celery.worker.job:ERROR: (7568-52000)   File "/home/vagrant/devel/pulp/server/pulp/plugins/util/publish_step.py", line 126, in process_lifecycle
Feb 08 17:50:30 dev pulp[7568]: celery.worker.job:ERROR: (7568-52000)     step.process()
Feb 08 17:50:30 dev pulp[7568]: celery.worker.job:ERROR: (7568-52000)   File "/home/vagrant/devel/pulp/server/pulp/plugins/util/publish_step.py", line 203, in process
Feb 08 17:50:30 dev pulp[7568]: celery.worker.job:ERROR: (7568-52000)     self._process_block()
Feb 08 17:50:30 dev pulp[7568]: celery.worker.job:ERROR: (7568-52000)   File "/home/vagrant/devel/pulp/server/pulp/plugins/util/publish_step.py", line 245, in _process_block
Feb 08 17:50:30 dev pulp[7568]: celery.worker.job:ERROR: (7568-52000)     self.process_main()
Feb 08 17:50:30 dev pulp[7568]: celery.worker.job:ERROR: (7568-52000)   File "/home/vagrant/devel/pulp_docker/plugins/pulp_docker/plugins/importers/sync.py", line 158, in process_main
Feb 08 17:50:30 dev pulp[7568]: celery.worker.job:ERROR: (7568-52000)     available_images = self.parent.index_repository.get_image_ids()
Feb 08 17:50:30 dev pulp[7568]: celery.worker.job:ERROR: (7568-52000)   File "/home/vagrant/devel/pulp_docker/plugins/pulp_docker/plugins/registry.py", line 112, in get_image_ids
Feb 08 17:50:30 dev pulp[7568]: celery.worker.job:ERROR: (7568-52000)     raw_data = self._get_single_path(path)
Feb 08 17:50:30 dev pulp[7568]: celery.worker.job:ERROR: (7568-52000)   File "/home/vagrant/devel/pulp_docker/plugins/pulp_docker/plugins/registry.py", line 79, in _get_single_path
Feb 08 17:50:30 dev pulp[7568]: celery.worker.job:ERROR: (7568-52000)     raise IOError(report.error_msg)
Feb 08 17:50:30 dev pulp[7568]: celery.worker.job:ERROR: (7568-52000) IOError: METHOD NOT ALLOWED

The following was produced with Pulp Docker 1.0-dev. This error can be reproduced with Pulp Smash using the following command:

python -m unittest2 discover pulp_smash.tests.docker.cli
Actions #1

Updated by amacdona@redhat.com about 8 years ago

  • Subject changed from Cannot Sync on Pulp 2.7 to Pulp 2.7 should gracefully fail with Docker v2 feeds
  • Version - Docker changed from master to 1.0.0

Pulp should fail more gracefully, but registry-1.docker.io is a Docker v2 endpoint and this is not supported for the Pulp 2.7 distribution with pulp_docker 1.x

For v1 content index.docker.io should be the feed.

Actions #2

Updated by Ichimonji10 about 8 years ago

Do you know of any v1 feeds I can use for tests?

Actions #3

Updated by amacdona@redhat.com about 8 years ago

index.docker.io is the dockerhub v1 endpoint.

Actions #4

Updated by Ichimonji10 about 8 years ago

Thank you.

Actions #5

Updated by rbarlow about 8 years ago

I don't think we will fix this in 1.0.0, and unfortunately it will be difficult to fix in 2.0.0 because the registries essentially lie about the versions of the Docker API that they support.

Actions #6

Updated by Ichimonji10 about 8 years ago

OK. Thanks for the info.

When Pulp Smash tests a Pulp 2.7 system, it'll only give that system docker v1 feeds. And when Pulp Smash tests a Pulp 2.8 system, it'll give both v1 and v2 feeds. In no case is Pulp 2.7 given a v2 feed. See: pulp_smash.tests.docker.cli.test_sync.SyncV2TestCase:

Show it is possible to sync a docker repository with a v2 registry.

This method requires Pulp 2.8 and above, and will raise a SkipTest exception if run against an earlier version of Pulp.

Actions #7

Updated by bmbouter about 8 years ago

  • Status changed from NEW to CLOSED - WONTFIX

Closing this as WONTFIX per comment 5: https://pulp.plan.io/issues/1640#note-5

Please update pulp-smash accordingly if necessary.

Actions #8

Updated by bmbouter about 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF