glance does not work when working with swift
My swift server is working well, and also glance server also works well when using file "default_store = file", but when I change to "default_store = swift", "glance add" will not work, can any of you help check why?
Thanks in advance!
root@glance-
Failed to add image. Got error:
400 Bad Request
The server could not comply with the request since it is either malformed or otherwise incorrect.
Error uploading image: global name 'swift_client' is not defined
Note: Your image metadata may still be in the registry, but the image's status will likely be 'killed'.
root@glance-
[DEFAULT]
# Show more verbose log output (sets INFO log level output)
verbose = True
# Show debugging output in logs (sets DEBUG log level output)
debug = False
# Which backend store should Glance use by default is not specified
# in a request to add a new image to Glance? Default: 'file'
# Available choices are 'file', 'swift', and 's3'
default_store = swift
# Address to bind the API server
bind_host = 0.0.0.0
# Port the bind the API server to
bind_port = 9292
# Address to find the registry server
registry_host = 0.0.0.0
# Port the registry server is listening on
registry_port = 9191
# 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/
# ============ Filesystem Store Options =======
# Directory that the Filesystem backend store
# writes image data to
filesystem_
# ============ Swift Store Options =======
# Address where the Swift authentication service lives
swift_store_
# User to authenticate against the Swift authentication service
swift_store_user = tester
# Auth key for the user authenticating against the
# Swift authentication service
swift_store_key = tk361dc384f1214
# Container within the account that the account should use
# for storing images in Swift
swift_store_
# Do we create the container if it does not exist?
swift_store_
# Whether to use ServiceNET to communicate with the Swift storage servers.
# (If you aren't RACKSPACE, leave this False!)
#
# To use ServiceNET for authentication, prefix hostname of
# `swift_
# Ex. https:/
swift_enable_snet = False
# ============ S3 Store Options =======
# Address where the S3 authentication service lives
s3_store_host = 127.0.0.
# User to authenticate against the S3 authentication service
s3_store_access_key = <20-char AWS access key>
# Auth key for the user authenticating against the
# S3 authentication service
s3_store_secret_key = <40-char AWS secret key>
# Container within the account that the account should use
# for storing images in S3. Note that S3 has a flat namespace,
# so you need a unique bucket name for your glance images. An
# easy way to do this is append your AWS access key to "glance".
# S3 buckets in AWS *must* be lowercased, so remember to lowercase
# your AWS access key if you use it in your bucket name below!
s3_store_bucket = <lowercased 20-char aws access key>glance
# Do we create the bucket if it does not exist?
s3_store_
# ============ Image Cache Options =======
image_cache_enabled = False
# Directory that the Image Cache writes data to
# Make sure this is also set in glance-pruner.conf
image_cache_datadir = /var/lib/
# Number of seconds after which we should consider an incomplete image to be
# stalled and eligible for reaping
image_cache_
# ============ Delayed Delete Options =======
# Turn on/off delayed delete
delayed_delete = False
[pipeline:
pipeline = versionnegotiation context apiv1app
# To enable Image Cache Management API replace pipeline with below:
# pipeline = versionnegotiation imagecache apiv1app
[pipeline:versions]
pipeline = versionsapp
[app:versionsapp]
paste.app_factory = glance.
[app:apiv1app]
paste.app_factory = glance.
[filter:
paste.filter_
[filter:imagecache]
paste.filter_
[filter:context]
paste.filter_
root@glance-
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Glance Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Guangya Liu
- Solved:
- Last query:
- Last reply: