swift backend not working with disabled swift auto account creation

Bug #1632263 reported by Maurice Escher
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
New
Undecided
Unassigned

Bug Description

Hi,

we have our swift proxy configured with account_autocreate = false (which is the default), i.e. a new project does not automatically have a swift account, but it needs to be created via PUT on the swift auth url.

In combination with multi-tenant swift backend use in glance that means, that new projects cannot create images. Image creation in-transparently fails with a 500 internal server error.
This is visible in the logs as "Failed to add container to Swift.
Got error from Swift: Container PUT failed [...] 404 Not Found".

We are running mitaka.

I think glance should try to create the swift account on that error.
It even could ask swift, whether the account_autocreate option is set (via /info, see http://developer.openstack.org/api-ref/object-storage/index.html#list-activated-capabilities).

If account creation is not an option, a more transparent error would be good to hint the end-user that a swift account is missing.

Thanks,
Maurice

P.S. This also holds true when you only have one swift container to store all your images, but it's not as big a problem because swift account creation then is a one-time only task.

Revision history for this message
Stefan Majewsky (stefan-majewsky) wrote :

It shall be noted that account_autocreate is set to True in a Devstack, which is probably why this issue fell through the cracks: https://github.com/openstack-dev/devstack/blob/792a7ab31f0553435c02bb230b2c60833eb58c8e/lib/swift#L430

Revision history for this message
wangxiyuan (wangxiyuan) wrote :

I think the second way you metioned is better. IMO, creating a swfit account automatically by Glance is out of Glance's duty.

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.