Ask Your Question
0

installing glance with swift backend

asked 2011-10-06 12:12:53 -0500

moeketsi-christopher gravatar image

I am trying to configure glance to use swift.I have installed swift based on the instructions http://swift.openstack.org/howto_installmultinode.html (http://swift.openstack.org/howto_inst...) and it works works . I then installed glance and changed the /etc/glance/glance-api.config to look as follows :

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/glance/api.log

Send logs to syslog (/dev/log) instead of to file specified by log_file

use_syslog = False

============ Filesystem Store Options ========================

Directory that the Filesystem backend store

writes image data to

filesystem_store_datadir = /var/lib/glance/images/

============ Swift Store Options =============================

swift_store_auth_address = https://146.141.78.76:8080/auth/v1.0

User to authenticate against the Swift authentication service

swift_store_user = system:root

Auth key for the user authenticating against the

Swift authentication service

swift_store_key = testpass

Container within the account that the account should use

for storing images in Swift

swift_store_container = glance

Do we create the container if it does not exist?

swift_store_create_container_on_put = true

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_store_auth_address with 'snet-'.

Ex. https://example.com/v1.0/ -> https://snet-example.com/v1.0/

swift_enable_snet = False

============ 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/glance/image-cache/

Number of seconds after which we should consider an incomplete image to be

stalled and eligible for reaping

image_cache_stall_timeout = 86400

============ S3 Store Options =============================

Address where the S3 authentication service lives

s3_store_host = 127.0.0.1:8080/v1.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_create_bucket_on_put = False

============ Delayed Delete Options =============================

Turn on ...

(more)
edit retag flag offensive close merge delete

4 answers

Sort by ยป oldest newest most voted
0

answered 2011-10-07 09:49:42 -0500

moeketsi-christopher gravatar image

changed debug=true in glance-api and reverted to port 9292 and all is well .

edit flag offensive delete link more
0

answered 2011-10-06 13:34:29 -0500

jaypipes gravatar image

Hi!

That error means that another service is running on port 9292 on localhost. Are you sure that you haven't already started the Glance API server? The log file output you show above indicates that the Glance API service is started...

If you do a netstat -tnlp call, like so, you should see the service holding the port:

jpipes@serialcoder:~/repos/glance$ sudo netstat -tlnp | grep 9292 tcp 0 0 0.0.0.0:9292 0.0.0.0:* LISTEN 19010/python

jpipes@serialcoder:~/repos/glance$ ps aux | grep 19010 jpipes 19010 0.2 0.2 75068 23220 pts/2 S+ 09:31 0:00 python ./bin/glance-api --verbose ../swift.conf

Cheers, -jay

edit flag offensive delete link more
0

answered 2011-10-07 08:59:39 -0500

moeketsi-christopher gravatar image

I have changed my binding port to 9192 for the glance-api and 9193 for the registry (the registry returned the same error when it was started). I ran both commands that you posted and got

tcp 0 0 0.0.0.0:9292 0.0.0.0:* LISTEN 777/python when running "netstat -tlnp | grep 9292" - not sure if this output means that glance is using the port. and root 1678 0.0 0.0 7624 908 pts/4 S+ 10:53 0:00 grep --color=auto 19010 when running the second command. I suspect that glance-api is started when the computer starts the only problem is that nothing is logged in the api.log when this happens, and that seems to help, not sure if this will be a problem later though, when i intergrate nova . Thanks alot!

edit flag offensive delete link more
0

answered 2011-10-07 09:25:11 -0500

moeketsi-christopher gravatar image

Please ignore the comment above it does not make sense: What I am trying to say is :

I ran netstat -tlnp | grep 9292" as suggested by jay and got tcp 0 0 0.0.0.0:9292 0.0.0.0:* LISTEN 777/python i then ran ps -ef |grep 777 and got glance 777 771 0 10:24 ? 00:00:00 /usr/bin/python /usr/bin/glance-api , and realised that glance had started as suggested by Jay. I have changed the ports to make sure that I can read the logs.

Thank you Jay.

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

Stats

Asked: 2011-10-06 12:12:53 -0500

Seen: 132 times

Last updated: Oct 07 '11