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.

Also available in: Atom PDF