← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1188182] Re: horizon is removing the URL path from glance's endpoint

 

** Changed in: horizon
       Status: Fix Committed => Fix Released

** Changed in: horizon
    Milestone: None => juno-1

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1188182

Title:
  horizon is removing the URL path from glance's endpoint

Status in OpenStack Dashboard (Horizon):
  Fix Released

Bug description:
  When the glance endpoint URL includes a path (for example:
  http://192.168.10.11/my/image/api/path/ - not the default config),
  horizon is removing the path portion ("/my/image/api/path"). Then,
  when it tries to access the glance API a 404 http error is returned.

  When using the glance client *CLI*, the code works as expected.

  The problem is related to the following horizon's code:

  https://github.com/openstack/horizon/blob/master/openstack_dashboard/api/glance.py

  ...
  38 def glanceclient(request):
  39    o = urlparse.urlparse(url_for(request, 'image'))
  40    url = "://".join((o.scheme, o.netloc))
  ...

  The URL created using urlparse "scheme" and "netloc" doesn't take into
  account the path.

  Details about urlparse:
  http://docs.python.org/2/library/urlparse.html

To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1188182/+subscriptions