Keystone-enabled glance can't fetch images from Keystone-enabled Swift

Bug #1003545 reported by Roman Yepishev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
New
Undecided
Unassigned

Bug Description

Ubuntu 12.04, glance 2012.1

Upon uploading the image to Swift through glance the following location is generated:
swift+https://service:glance:WoadNoap4@192.168.100.52:35357/v2.0/glance/c7ca1222-a641-4b28-be44-930a9e5db1f7

When this location is split, the trailing v2.0/ slash is discarded and authurl passed to swift client is "https://192.168.100.52:35357/v2.0". Swift client does urljoin() on https://192.168.100.52:35357/v2.0 + "tokens" and makes https://192.168.100.52:35357/tokens, which of course does not work (404 Not Found from Keystone) since there is nothing listening on /tokens path.

This leads to the following message from glance without anything being queried from Swift.

404 Not Found

  An object with the specified identifier was not found.
Details: Swift could not find image at uri swift+https://service:glance:*password*@192.168.100.52:35357/v2.0/glance/c7ca1222-a641-4b28-be44-930a9e5db1f7

I added the trailing slash to get() method @ glance/store/swift.py and I was able to fetch the image from swift via glance since the keystone URL is constructed correctly.
    def get(self, location):
       ...
        loc = location.store_location
        swift_conn = self._make_swift_connection(
            auth_url=loc.swift_auth_url + '/', user=loc.user, key=loc.key)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.