Ask Your Question
0

Use Swift as Backend for Glance Images

asked 2016-06-07 05:34:46 -0500

D3LTA9 gravatar image

updated 2016-06-07 08:58:20 -0500

Having difficulty getting swift to work as my image datastore for glance.

I just get a server error when I try and create a image after applying the below configuration and restarting glance.

/etc/glance/glance-api.conf

[glance_store]

default_store = swift
stores = glance.store.swift.Store (have tried just "swift" as well)

swift_store_auth_version = 2

swift_store_auth_address = http://controller:35357/v2.0/

swift_store_user = service:glance

swift_store_key = GLANCE_PASS

swift_store_container = glance

swift_store_create_container_on_put = True

swift_store_large_object_size = 5120

swift_store_large_object_chunk_size = 200

swift_enable_snet = False

Commented out:

filesystem_store_datadir = /var/lib/glance/images/

Really not sure what I am missing as every other guide I have looked at has a similar configuration if not less options, which I have also tried.

The only thing I can think of is somehow it cannot create the container due a permission issue but as my glance user has the admin role I do not see how this could be an issue.

Any hell would be appreciated thanks!

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2016-06-07 10:26:52 -0500

dbaxps gravatar image

Setup Swift as Glance backend on RDO Liberty Multi node deployment (CentOS 7.2)
http://lxer.com/module/newswire/view/...
For RDO Liberty

[glance_store]
default_store = swift
stores = glance.store.swift.Store
swift_store_auth_address = http://192.169.142.127:5000/v2.0/
swift_store_user = services:glance
swift_store_key = f6a9398960534797
swift_store_create_container_on_put = True
swift_store_large_object_size = 5120
swift_store_large_object_chunk_size = 200
swift_enable_snet = False
os_region_name=RegionOne

where

Value f6a9398960534797  is corresponding CONFIG_GLANCE_KS_PW in answer-file, i.e. keystone glance password for authentification
edit flag offensive delete link more

Comments

Thanks for the reply but I am still getting the same error using that configuration too - "The server has either erred or is incapable of performing the requested operation. (HTTP 500)". Of course, I changed the authentication address and password to my own before attempting to create an image.

D3LTA9 gravatar imageD3LTA9 ( 2016-06-07 18:54:39 -0500 )edit
0

answered 2016-06-07 19:16:59 -0500

D3LTA9 gravatar image

After checking the logs there are a bunch of errors but the one that sticks out is:

2016-06-08 12:10:36.177 16908 ERROR glance.common.wsgi [req-1b62c167-0e31-410e-acc5-a2f973d826ac 3e26e02df83a4c2cae4d98dba4f24a8f 5ee06ce2b2fb49e390cde66370504fc3 - - -] Caught error: Unauthorized. Check username, password and tenant name/id.

So this would suggest that its error with the lines:

swift_store_user = service:glance

swift_store_key = GLANCE_PASS

But I dont see how they could be any different. The swift_store_user line should be formatted:

project(tenant):user so service:glance

and I have used the same password for all services (I know, you shouldn't but this is just a proof of concept project essentially) so I cant see how it could be wrong either.

edit flag offensive delete link more

Comments

Create keystonerc_glance following keystonerc_admin

# .  keystonerc_glance
# glance image-list

If it fails mistake is yours.On RDO I do have keystone's glance password automatically set-up and placed in answer-file

dbaxps gravatar imagedbaxps ( 2016-06-08 03:23:19 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

2 followers

Stats

Asked: 2016-06-07 05:34:46 -0500

Seen: 766 times

Last updated: Jun 07 '16