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

Bug #717431 reported by Jay Pipes
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Glance
Fix Released
High
Jay Pipes

Bug Description

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

swift://user:password@authurl/container/object

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

Revision history for this message
Jay Pipes (jaypipes) wrote :

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

Jay Pipes (jaypipes)
Changed in glance:
milestone: none → cactus-2011-03-14
Jay Pipes (jaypipes)
Changed in glance:
assignee: nobody → Jay Pipes (jaypipes)
Revision history for this message
Jay Pipes (jaypipes) wrote :

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

swift://user:key@authurl/container/objname

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

Changed in glance:
status: Confirmed → Fix Committed
Revision history for this message
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)
Changed in glance:
status: Fix Committed → In Progress
Revision history for this message
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)
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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