Project

Profile

Help

Issue #1016

closed

docker sync fails in an unexpected way if feed url scheme is not specified

Added by cduryee almost 9 years ago. Updated about 5 years ago.

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

Description

If you don't specify http or https in the feed url, you will get a confusing error.

For example:

  1. pulp-admin docker repo create --repo-id=synctest3 --feed=index.docker.io --upstream-name=busybox
    Repository [synctest3] successfully created

However, when you attempt to sync:

pulp-admin docker repo sync run --repo-id synctest3

you will get:

Invalid URL u'/v1/repositories/busybox/images': No schema supplied. Perhaps you meant http:///v1/repositories/busybox/images?
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/nectar/downloaders/threaded.py", line 190, in _fetch
response = session.get(request.url, headers=headers)
File "/usr/lib/python2.6/site-packages/requests/sessions.py", line 469, in get
return self.request('GET', url, **kwargs)
File "/usr/lib/python2.6/site-packages/requests/sessions.py", line 443, in request
prep = self.prepare_request(req)
File "/usr/lib/python2.6/site-packages/requests/sessions.py", line 374, in prepare_request
hooks=merge_hooks(request.hooks, self.hooks),
File "/usr/lib/python2.6/site-packages/requests/models.py", line 304, in prepare
self.prepare_url(url, params)
File "/usr/lib/python2.6/site-packages/requests/models.py", line 358, in prepare_url
"Perhaps you meant http://{0}?".format(url))
MissingSchema: Invalid URL u'/v1/repositories/busybox/images': No schema supplied. Perhaps you meant http:///v1/repositories/busybox/images?

Ideally, pulp-admin would notice that the URL scheme is missing and raise an error during repo creation.

Actions #1

Updated by ipanova@redhat.com almost 9 years ago

I think pulp-admin does not check the scheme or url integrity during repo creation it only checks that the feed is a string https://github.com/pulp/pulp/blob/master/server/pulp/plugins/util/importer_config.py#L53

Actions #2

Updated by jortel@redhat.com almost 9 years ago

  • Triaged changed from No to Yes
  • Tags Easy Fix added

Need to validate the scheme.

Actions #3

Updated by bmbouter about 5 years ago

  • Status changed from NEW to CLOSED - WONTFIX
Actions #4

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.

Actions #5

Updated by bmbouter about 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF