Nova strips the path from glance servers specificed in [glance]/api_servers config
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Sean Dague |
Bug Description
Nova strips out the path from the URL for any glance server in the "api_servers" configuration option. This prevents the use of <host>/image as part of the location for glance to be specified.
the code in "nova.image.glance" for "get_api_servers" silently drops the path on the floor.
As you can see here:
def get_api_servers():
"""Shuffle a list of CONF.glance.
that will cycle through the list, looping around to the beginning
if necessary.
"""
api_servers = []
configured_
for api_server in configured_servers:
if '//' not in api_server:
o = urlparse.
port = o.port or 80
host = o.netloc.
if host[0] == '[' and host[-1] == ']':
host = host[1:-1]
use_ssl = (o.scheme == 'https')
random.
return itertools.
Urlparse.urlparse splits out as follows:
>>> urlparse.urlparse("http://
ParseResult(
This means that glance *must* be on the root of wherever it lives from nova's perspective. We should not prevent services from living outside of the "root" of the path / ignoring proper URL schemes.
no longer affects: | python-glanceclient |
It looks like glanceclient may make it exceedingly difficult to add in a path-prefix in the way nova is consuming it.