Ask Your Question

Swift as backend for Glance HTTP 500 error

asked 2013-08-21 10:21:06 -0600

piotrkopec gravatar image

Hello everyone;

I have configured Glance to use Swift as a backend storage service, however I cannot upload image using glance image-create command. Following error occures:

    [root@openstack182 images]# glance image-create --name="Cirros 0.3.1" --disk-format=qcow2 --container-format bare < cirros-0.3.1-x86_64-disk.img
Request returned failure status.
500 Internal Server Error
The server has either erred or is incapable of performing the requested operation.
    (HTTP 500)

This seems strange to me because Glance works correctly using files as a storage ( default_store = file ). Swift also works ok, I can upload files to containers using swift upload command. My configuration files are as follows:


# Show more verbose log output (sets INFO log level output)
#verbose = False

# Show debugging output in logs (sets DEBUG log level output)
#debug = False

# Which backend scheme should Glance use by default is not specified
# in a request to add a new image to Glance? Known schemes are determined
# by the known_stores option below.
# Default: 'file'
default_store = swift

# List of which store classes and store class locations are
# currently known to glance at startup.
#known_stores =,
#     ,
#     ,
#     ,
#     ,

# Maximum image size (in bytes) that may be uploaded through the
# Glance API server. Defaults to 1 TB.
# WARNING: this value should only be increased after careful consideration
# and must be set to a value under 8 EB (9223372036854775808).
#image_size_cap = 1099511627776

# Address to bind the API server
bind_host =

# Port the bind the API server to
bind_port = 9292

# Log to this file. Make sure you do not set the same log
# file for both the API and registry servers!
log_file = /var/log/glance/api.log

# Backlog requests when creating socket
backlog = 4096

# TCP_KEEPIDLE value in seconds when creating socket.
# Not supported on OS X.
#tcp_keepidle = 600

# SQLAlchemy connection string for the reference implementation
# registry server. Any valid SQLAlchemy connection string is fine.
# See:
sql_connection = mysql://glance:openstack@

# Period in seconds after which SQLAlchemy should reestablish its connection
# to the database.
# MySQL uses a default `wait_timeout` of 8 hours, after which it will drop
# idle connections. This can result in 'MySQL Gone Away' exceptions. If you
# notice this, you can lower this value to ensure that SQLAlchemy reconnects
# before MySQL can drop the connection.
sql_idle_timeout = 3600

# Number of Glance API worker processes to start.
# On machines with more than one CPU increasing this value
# may improve performance (especially if using SSL with
# compression turned on). It is typically recommended to set
# this value to the number of CPUs present on your machine.
workers = 1

# Role used to identify an authenticated user as administrator
#admin_role = admin

# Allow unauthenticated users to access the API with read-only
# privileges. This only applies when using ContextMiddleware.
#allow_anonymous_access = False

# Allow access to version 1 of glance api
#enable_v1_api = True

# Allow access to version 2 of glance ...
edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2013-08-27 03:28:08 -0600

piotrkopec gravatar image

The problem was with:

# Address where the Swift authentication service lives
# Valid schemes are 'http://' and 'https://'
# If no scheme specified,  default to 'https://'
# For swauth, use something like ''
swift_store_auth_address =

I didn't specify protocol so the default (https) have been aplied.

edit flag offensive delete link more


Great to see you debug the issue and find out resolution and posted back :)

coolsvap gravatar imagecoolsvap ( 2013-08-27 04:14:04 -0600 )edit
SGPJ gravatar imageSGPJ ( 2014-04-25 03:29:54 -0600 )edit

answered 2013-08-26 17:34:18 -0600

notmyname gravatar image

First you need to find out if the error is coming from Glance or from Swift. Does the glance CLI have a --debug option? If so, you may be able to see what's going on. If not, you'll need to look in your logs to find the error. Swift logs to syslog, so the logs will be wherever you have configured them to go.

If you find that the 500 error is from Swift, look at the proxy log line that has the 500. That will contain a transaction id. (Swift uses a transaction id to tie together requests across different services.) Search for that transaction id, and you'll find the other server requests associated with that client API call. Most likely you'll find the real cause of the 500 error logged there.

edit flag offensive delete link more

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

1 follower


Asked: 2013-08-21 10:21:06 -0600

Seen: 2,328 times

Last updated: Aug 27 '13