Ask Your Question
0

glance service can't start up ,GOT KEYERROR(filecoder)

asked 2012-07-18 07:40:50 -0500

fanjunlun gravatar image

when i start up the glance service, the following info came out and nothing happen. root@cloudcontroller:/etc/glance# glance-api ERROR: Unable to load glance-api-keystone from configuration file /etc/glance/glance-api-paste.ini. Got: KeyError('filedecoder',)

my glance-api-paste.ini root@cloudcontroller:/etc/glance# vi glance-api-paste.ini

Default minimal pipeline

[pipeline:glance-api] #pipeline = versionnegotiation context rootapp pipeline = versionnegotiation unauthenticated-context rootapp

Use the following pipeline for keystone auth

i.e. in glance-api.conf:

[paste_deploy]

flavor = keystone

# [pipeline:glance-api-keystone] #pipeline = versionnegotiation authtoken context rootapp pipeline = versionnegotiation authtoken context rootapp

Use the following pipeline to enable transparent caching of image files

i.e. in glance-api.conf:

[paste_deploy]

flavor = caching

# #[pipeline:glance-api-caching] #pipeline = versionnegotiation unauthenticated-context cache rootapp

Use the following pipeline for keystone auth with caching

i.e. in glance-api.conf:

[paste_deploy]

flavor = keystone+caching

# [pipeline:glance-api-keystone+caching] pipeline = versionnegotiation authtoken context cache rootapp

Use the following pipeline for keystone auth with cache management

i.e. in glance-api.conf:

[paste_deploy]

flavor = keystone+cachemanagement

# [pipeline:glance-api-keystone+cachemanagement] pipeline = versionnegotiation authtoken context cache cachemanage rootapp

[composite:rootapp] use = egg:Paste#urlmap /: apiversions /v1: apiv1app /v2: apiv2app

[app:apiversions] paste.app_factory = glance.api.versions:create_resource

[app:apiv1app] paste.app_factory = glance.api.v1.router:API.factory

[app:apiv2app] paste.app_factory = glance.api.v2.router:API.factory

[filter:versionnegotiation] paste.filter_factory = glance.api.middleware.version_negotiation:VersionNegotiationFilter.factory

[filter:cache] paste.filter_factory = glance.api.middleware.cache:CacheFilter.factory

[filter:cachemanage] paste.filter_factory = glance.api.middleware.cache_manage:CacheManageFilter.factory

[filter:context] paste.filter_factory = glance.api.middleware.context:ContextMiddleware.factory

[filter:unauthenticated-context] paste.filter_factory = glance.api.middleware.context:UnauthenticatedContextMiddleware.factory

[filter:authtoken] paste.filter_factory = keystone.middleware.auth_token:filter_factory service_protocol = http service_host = 127.0.0.1 service_port = 5000 auth_host = 127.0.0.1 auth_port = 35357 auth_protocol = http auth_uri = http://127.0.0.1:5000/ admin_tenant_name = serviceTenant admin_user = glanceUser admin_password = glanceUser

my glance-api.conf root@cloudcontroller:/etc/glance# vi glance-api.conf [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 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 = file

List of which store classes and store class locations are

currently known to glance at startup.

known_stores = glance.store.filesystem.Store,

glance.store.http.Store,

glance.store.rbd.Store,

glance.store.s3.Store,

glance.store.swift.Store,

Address to bind the API server

bind_host = 0.0.0.0

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

SQLAlchemy connection string for the reference implementation

registry server. Any valid SQLAlchemy connection string is fine.

See: http://www.sqlalchemy.org/docs/05/reference/sqlalchemy/connections.html#sqlalchemy.create_engine (http://www.sqlalchemy.org/docs/05/ref...)

sql_connection = mysql://glancedbadmin:glance@172.20.2.2/glance ... (more)

edit retag flag offensive close merge delete

5 answers

Sort by ยป oldest newest most voted
0

answered 2012-07-18 10:47:25 -0500

eelilei gravatar image

Hi,I have the same problem,it seem that it is keystone's error,and maybe it is anyjson package.I reported the bug.

edit flag offensive delete link more
0

answered 2012-07-18 12:04:10 -0500

eelilei gravatar image

Hi,I fixed the error.You need pip install anyjson 0.2.4.

edit flag offensive delete link more
0

answered 2012-07-18 12:04:15 -0500

eelilei gravatar image

Hi,I fixed the error.You need pip install anyjson 0.2.4.

edit flag offensive delete link more
0

answered 2012-07-19 01:02:56 -0500

fanjunlun gravatar image

root@cloudcontroller:~# easy_install anyjson==0.2.4 Searching for anyjson==0.2.4 Best match: anyjson 0.2.4 Processing anyjson-0.2.4-py2.7.egg anyjson 0.2.4 is already the active version in easy-install.pth

Using /usr/local/lib/python2.7/dist-packages/anyjson-0.2.4-py2.7.egg Processing dependencies for anyjson==0.2.4 Finished processing dependencies for anyjson==0.2.4

Thank you Wall Lee. You solve my question.That's really weird. Because the anyjson was installed before. But after i execute the command above. the glance service can start up!

edit flag offensive delete link more
0

answered 2012-07-19 01:17:34 -0500

fanjunlun gravatar image

Thanks Wall Lee, that solved my question.

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: 2012-07-18 07:40:50 -0500

Seen: 408 times

Last updated: Jul 19 '12