Swift backend not taking into account new Swift account:user:key in URI

Bug #717431 reported by Jay Pipes on 2011-02-11
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Jay Pipes

Bug Description

The old cloudfiles client handled URIs for Swift in the form of:


However, newer Swift versions use an account system as well, so that a user is really "account:user". We need to take this into account when parsing the URIs coming into Glance.

Below is some IRC log discussing the issue.

<creiht> jaypipes: so the quick fix is to change line 102
<creiht> to
<creiht> user, key = creds.rsplit(':',1)
<creiht> that should still give you the right creds
<creiht> and the uri could be represented as:
<creiht> swift://account:user:password@auth_url/container/file.gz.0
<jaypipes> creiht: yup, that's what I was thinking too...

Related branches

Jay Pipes (jaypipes) wrote :

Marked this High priority since AFAICT, there is no workaround.

Jay Pipes (jaypipes) on 2011-02-22
Changed in glance:
milestone: none → cactus-2011-03-14
Jay Pipes (jaypipes) on 2011-03-01
Changed in glance:
assignee: nobody → Jay Pipes (jaypipes)
Jay Pipes (jaypipes) wrote :

this is no longer valid. With the new Swift work in 713126, simply set the the URI properly to:


where authurl might be, for instance, localhost:9090/v1/account

Changed in glance:
status: Confirmed → Fix Committed
Marcelo Martins (btorch) wrote :

Hi Jay,

Are you referring to the swift_store_auth_address property in the glance.conf file ? I have the cactus trunk rev87 and I noticed that issue while trying to clear the images. Glance is running on the same box I have swift-1.2.0 installed.

Jay Pipes (jaypipes) on 2011-03-16
Changed in glance:
status: Fix Committed → In Progress
Jay Pipes (jaypipes) wrote :

OK, so yet again, I was confusing the Auth URL with the Storage Management URL *returned* by the auth URL...

Solution is to parse the location with account:user properly.

Changed in glance:
status: In Progress → Triaged
Changed in glance:
status: Triaged → Fix Committed
Thierry Carrez (ttx) on 2011-04-15
Changed in glance:
milestone: cactus-2011-03-14 → 2011.2
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers