glance-api fails to start

Bug #1146865 reported by geordish
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Glance
Invalid
Undecided
Unassigned
glance (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

Fresh install from grizzly trunk testing ppa on Ubuntu 12.0.

root@controller2:/etc/glance# glance-api --debug --verbose
2013-03-05 07:14:19.530 1812 DEBUG glance.store [-] Attempting to import store glance.store.filesystem.Store _get_store_class /usr/lib/python2.7/dist-packages/glance/store/__init__.py:133
2013-03-05 07:14:19.531 1812 DEBUG glance.store [-] Registering store <class 'glance.store.filesystem.Store'> with schemes ('file', 'filesystem') create_stores /usr/lib/python2.7/dist-packages/glance/store/__init__.py:163
2013-03-05 07:14:19.531 1812 DEBUG glance.store.base [-] Late loading location class glance.store.filesystem.StoreLocation get_store_location_class /usr/lib/python2.7/dist-packages/glance/store/base.py:68
2013-03-05 07:14:19.531 1812 DEBUG glance.store.location [-] Registering scheme file with {'store_class': <class 'glance.store.filesystem.Store'>, 'location_class': <class 'glance.store.filesystem.StoreLocation'>} register_scheme_map /usr/lib/python2.7/dist-packages/glance/store/location.py:85
2013-03-05 07:14:19.532 1812 DEBUG glance.store.location [-] Registering scheme filesystem with {'store_class': <class 'glance.store.filesystem.Store'>, 'location_class': <class 'glance.store.filesystem.StoreLocation'>} register_scheme_map /usr/lib/python2.7/dist-packages/glance/store/location.py:85
2013-03-05 07:14:19.532 1812 DEBUG glance.store [-] Attempting to import store glance.store.http.Store _get_store_class /usr/lib/python2.7/dist-packages/glance/store/__init__.py:133
2013-03-05 07:14:19.532 1812 DEBUG glance.store [-] Registering store <class 'glance.store.http.Store'> with schemes ('http', 'https') create_stores /usr/lib/python2.7/dist-packages/glance/store/__init__.py:163
2013-03-05 07:14:19.532 1812 DEBUG glance.store.base [-] Late loading location class glance.store.http.StoreLocation get_store_location_class /usr/lib/python2.7/dist-packages/glance/store/base.py:68
2013-03-05 07:14:19.533 1812 DEBUG glance.store.location [-] Registering scheme http with {'store_class': <class 'glance.store.http.Store'>, 'location_class': <class 'glance.store.http.StoreLocation'>} register_scheme_map /usr/lib/python2.7/dist-packages/glance/store/location.py:85
2013-03-05 07:14:19.533 1812 DEBUG glance.store.location [-] Registering scheme https with {'store_class': <class 'glance.store.http.Store'>, 'location_class': <class 'glance.store.http.StoreLocation'>} register_scheme_map /usr/lib/python2.7/dist-packages/glance/store/location.py:85
2013-03-05 07:14:19.533 1812 DEBUG glance.store [-] Attempting to import store glance.store.rbd.Store _get_store_class /usr/lib/python2.7/dist-packages/glance/store/__init__.py:133
2013-03-05 07:14:19.534 1812 DEBUG glance.store [-] Registering store <class 'glance.store.rbd.Store'> with schemes ('rbd',) create_stores /usr/lib/python2.7/dist-packages/glance/store/__init__.py:163
2013-03-05 07:14:19.534 1812 DEBUG glance.store.base [-] Late loading location class glance.store.rbd.StoreLocation get_store_location_class /usr/lib/python2.7/dist-packages/glance/store/base.py:68
2013-03-05 07:14:19.534 1812 DEBUG glance.store.location [-] Registering scheme rbd with {'store_class': <class 'glance.store.rbd.Store'>, 'location_class': <class 'glance.store.rbd.StoreLocation'>} register_scheme_map /usr/lib/python2.7/dist-packages/glance/store/location.py:85
2013-03-05 07:14:19.534 1812 DEBUG glance.store [-] Attempting to import store glance.store.s3.Store _get_store_class /usr/lib/python2.7/dist-packages/glance/store/__init__.py:133
2013-03-05 07:14:19.535 1812 DEBUG glance.store [-] Registering store <class 'glance.store.s3.Store'> with schemes ('s3', 's3+http', 's3+https') create_stores /usr/lib/python2.7/dist-packages/glance/store/__init__.py:163
2013-03-05 07:14:19.535 1812 DEBUG glance.store.base [-] Late loading location class glance.store.s3.StoreLocation get_store_location_class /usr/lib/python2.7/dist-packages/glance/store/base.py:68
2013-03-05 07:14:19.536 1812 DEBUG glance.store.location [-] Registering scheme s3 with {'store_class': <class 'glance.store.s3.Store'>, 'location_class': <class 'glance.store.s3.StoreLocation'>} register_scheme_map /usr/lib/python2.7/dist-packages/glance/store/location.py:85
2013-03-05 07:14:19.536 1812 DEBUG glance.store.location [-] Registering scheme s3+http with {'store_class': <class 'glance.store.s3.Store'>, 'location_class': <class 'glance.store.s3.StoreLocation'>} register_scheme_map /usr/lib/python2.7/dist-packages/glance/store/location.py:85
2013-03-05 07:14:19.536 1812 DEBUG glance.store.location [-] Registering scheme s3+https with {'store_class': <class 'glance.store.s3.Store'>, 'location_class': <class 'glance.store.s3.StoreLocation'>} register_scheme_map /usr/lib/python2.7/dist-packages/glance/store/location.py:85
2013-03-05 07:14:19.536 1812 DEBUG glance.store [-] Attempting to import store glance.store.swift.Store _get_store_class /usr/lib/python2.7/dist-packages/glance/store/__init__.py:133
2013-03-05 07:14:19.544 1812 DEBUG glance.store [-] Registering store <function Store at 0x1e350c8> with schemes ('swift+https', 'swift', 'swift+http') create_stores /usr/lib/python2.7/dist-packages/glance/store/__init__.py:163
2013-03-05 07:14:19.545 1812 DEBUG glance.store.base [-] Late loading location class glance.store.swift.StoreLocation get_store_location_class /usr/lib/python2.7/dist-packages/glance/store/base.py:68
2013-03-05 07:14:19.545 1812 DEBUG glance.store.location [-] Registering scheme swift+https with {'store_class': <function Store at 0x1e350c8>, 'location_class': <class 'glance.store.swift.StoreLocation'>} register_scheme_map /usr/lib/python2.7/dist-packages/glance/store/location.py:85
2013-03-05 07:14:19.545 1812 DEBUG glance.store.location [-] Registering scheme swift+http with {'store_class': <function Store at 0x1e350c8>, 'location_class': <class 'glance.store.swift.StoreLocation'>} register_scheme_map /usr/lib/python2.7/dist-packages/glance/store/location.py:85
2013-03-05 07:14:19.545 1812 DEBUG glance.store.location [-] Registering scheme swift with {'store_class': <function Store at 0x1e350c8>, 'location_class': <class 'glance.store.swift.StoreLocation'>} register_scheme_map /usr/lib/python2.7/dist-packages/glance/store/location.py:85
2013-03-05 07:14:19.546 1812 DEBUG glance.common.config [-] Loading glance-api-keystone from /etc/glance/glance-api-paste.ini load_paste_app /usr/lib/python2.7/dist-packages/glance/common/config.py:201
2013-03-05 07:14:19.562 1812 CRITICAL glance [-] duplicate option: log-format
2013-03-05 07:14:19.562 1812 TRACE glance Traceback (most recent call last):
2013-03-05 07:14:19.562 1812 TRACE glance File "/usr/bin/glance-api", line 60, in <module>
2013-03-05 07:14:19.562 1812 TRACE glance server.start(config.load_paste_app(), default_port=9292)
2013-03-05 07:14:19.562 1812 TRACE glance File "/usr/lib/python2.7/dist-packages/glance/common/config.py", line 203, in load_paste_app
2013-03-05 07:14:19.562 1812 TRACE glance app = deploy.loadapp("config:%s" % conf_file, name=app_name)
2013-03-05 07:14:19.562 1812 TRACE glance File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 247, in loadapp
2013-03-05 07:14:19.562 1812 TRACE glance return loadobj(APP, uri, name=name, **kw)
2013-03-05 07:14:19.562 1812 TRACE glance File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 271, in loadobj
2013-03-05 07:14:19.562 1812 TRACE glance global_conf=global_conf)
2013-03-05 07:14:19.562 1812 TRACE glance File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 296, in loadcontext
2013-03-05 07:14:19.562 1812 TRACE glance global_conf=global_conf)
2013-03-05 07:14:19.562 1812 TRACE glance File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 320, in _loadconfig
2013-03-05 07:14:19.562 1812 TRACE glance return loader.get_context(object_type, name, global_conf)
2013-03-05 07:14:19.562 1812 TRACE glance File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 450, in get_context
2013-03-05 07:14:19.562 1812 TRACE glance global_additions=global_additions)
2013-03-05 07:14:19.562 1812 TRACE glance File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 562, in _pipeline_app_context
2013-03-05 07:14:19.562 1812 TRACE glance for name in pipeline[:-1]]
2013-03-05 07:14:19.562 1812 TRACE glance File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 458, in get_context
2013-03-05 07:14:19.562 1812 TRACE glance section)
2013-03-05 07:14:19.562 1812 TRACE glance File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 517, in _context_from_explicit
2013-03-05 07:14:19.562 1812 TRACE glance value = import_string(found_expr)
2013-03-05 07:14:19.562 1812 TRACE glance File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 22, in import_string
2013-03-05 07:14:19.562 1812 TRACE glance return pkg_resources.EntryPoint.parse("x=" + s).load(False)
2013-03-05 07:14:19.562 1812 TRACE glance File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1989, in load
2013-03-05 07:14:19.562 1812 TRACE glance entry = __import__(self.module_name, globals(),globals(), ['__name__'])
2013-03-05 07:14:19.562 1812 TRACE glance File "/usr/lib/python2.7/dist-packages/keystone/middleware/__init__.py", line 17, in <module>
2013-03-05 07:14:19.562 1812 TRACE glance from keystone.middleware.core import *
2013-03-05 07:14:19.562 1812 TRACE glance File "/usr/lib/python2.7/dist-packages/keystone/middleware/core.py", line 21, in <module>
2013-03-05 07:14:19.562 1812 TRACE glance from keystone.common import utils
2013-03-05 07:14:19.562 1812 TRACE glance File "/usr/lib/python2.7/dist-packages/keystone/common/utils.py", line 33, in <module>
2013-03-05 07:14:19.562 1812 TRACE glance from keystone import config
2013-03-05 07:14:19.562 1812 TRACE glance File "/usr/lib/python2.7/dist-packages/keystone/config.py", line 77, in <module>
2013-03-05 07:14:19.562 1812 TRACE glance CONF.register_cli_opts(logging_cli_opts)
2013-03-05 07:14:19.562 1812 TRACE glance File "/usr/lib/python2.7/dist-packages/oslo/config/cfg.py", line 1091, in __inner
2013-03-05 07:14:19.562 1812 TRACE glance return f(self, *args, **kwargs)
2013-03-05 07:14:19.562 1812 TRACE glance File "/usr/lib/python2.7/dist-packages/oslo/config/cfg.py", line 1244, in register_cli_opts
2013-03-05 07:14:19.562 1812 TRACE glance self.register_cli_opt(opt, group, clear_cache=False)
2013-03-05 07:14:19.562 1812 TRACE glance File "/usr/lib/python2.7/dist-packages/oslo/config/cfg.py", line 1091, in __inner
2013-03-05 07:14:19.562 1812 TRACE glance return f(self, *args, **kwargs)
2013-03-05 07:14:19.562 1812 TRACE glance File "/usr/lib/python2.7/dist-packages/oslo/config/cfg.py", line 1238, in register_cli_opt
2013-03-05 07:14:19.562 1812 TRACE glance return self.register_opt(opt, group, cli=True, clear_cache=False)
2013-03-05 07:14:19.562 1812 TRACE glance File "/usr/lib/python2.7/dist-packages/oslo/config/cfg.py", line 1091, in __inner
2013-03-05 07:14:19.562 1812 TRACE glance return f(self, *args, **kwargs)
2013-03-05 07:14:19.562 1812 TRACE glance File "/usr/lib/python2.7/dist-packages/oslo/config/cfg.py", line 1209, in register_opt
2013-03-05 07:14:19.562 1812 TRACE glance if _is_opt_registered(self._opts, opt):
2013-03-05 07:14:19.562 1812 TRACE glance File "/usr/lib/python2.7/dist-packages/oslo/config/cfg.py", line 479, in _is_opt_registered
2013-03-05 07:14:19.562 1812 TRACE glance raise DuplicateOptError(opt.name)
2013-03-05 07:14:19.562 1812 TRACE glance DuplicateOptError: duplicate option: log-format

Revision history for this message
Brian Waldon (bcwaldon) wrote :

I think the error is pretty obvious. Can you paste your glance-api.conf here?

Changed in glance:
status: New → Incomplete
Revision history for this message
geordish (me-geordish) wrote :
Download full text (12.7 KiB)

I thought so too, however I don't have log-format configured. Configuration is mostly stable.

[DEFAULT]
# 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 = 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,

# 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 = 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

# 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: http://www.sqlalchemy.org/docs/05/reference/sqlalchemy/connections.html#sqlalchemy.create_engine
#sql_connection = sqlite:////var/lib/glance/glance.sqlite
sql_connection = mysql://glanceUser:glancePass@10.0.0.1/glance

# 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 api
#enable_v2_api = True

# Return the URL that references where the data is stored on
# the backend storage system. For example, if using the
# file system store a URL of 'file:///path/to/image' will
# be returned to the user in the 'direct_url' meta-data field.
# The default value is false.
#show_image_direct_url = False

# ==========...

Revision history for this message
geordish (me-geordish) wrote :

By stable, I mean default.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in glance (Ubuntu):
status: New → Confirmed
Revision history for this message
Salman Baset (salman-h) wrote :

I am encountering the same problem

Revision history for this message
Olivier Archer (olivier-archer) wrote :

Have you tried to change

/etc/glance/glance-api-paste.ini and /etc/glance/glance-registry-paste.ini

from

[filter:authtoken]
paste.filter_factory = keystone.middleware.auth_token:filter_factory

to

[filter:authtoken]
paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory

?

This is perhaps a documentation bug from http://docs.openstack.org/trunk/openstack-compute/install/apt/content/osfolubuntu-identityservice.html

Revision history for this message
geordish (me-geordish) wrote :

Hi,

I've tried that, but no change. I'm not convinced this is a configuration file issue.

For reference glance-registry appears to be working.

Dave

Revision history for this message
Mark Washenberger (markwash) wrote :

The traceback you included makes it look like it is *NOT* a config file issue. Rather two modules using the same oslo / openstack common config library are trying to globally register the same option (log-format). I'll have to trace down where that is being declared exactly--but it is probably somewhere in keystoneclient and somewhere else in glance.

Revision history for this message
terryg2012 (terry-gong) wrote :

Changing

/etc/glance/glance-api-paste.ini and /etc/glance/glance-registry-paste.ini

from

[filter:authtoken]
 paste.filter_factory = keystone.middleware.auth_token:filter_factory

to

[filter:authtoken]
 paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory

got rid of the crashing issue. Now I am getting this error:

root@cld4b1ubuntu:/home/stack# glance index
Authorization Failed: Unable to communicate with identity service: {"error": {"message": "An unexpected error prevented the server from fulfilling your request. Command 'openssl' returned non-zero exit status 3", "code": 500, "title": "Internal Server Error"}}. (HTTP 500)

Revision history for this message
terryg2012 (terry-gong) wrote :

I was able to resolve my last issue to get glance working. I needed to change the owner of the certificates. In particular, I executed the following command on my machine:

chown -R keystone:keystone /etc/keystone/ssl

Chuck Short (zulcss)
Changed in glance (Ubuntu):
status: Confirmed → Won't Fix
Alan Pevec (apevec)
Changed in glance:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.