g-api unable to run

Bug #1087131 reported by Vincent Hou
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Glance
Invalid
Undecided
Unassigned
devstack
Invalid
Undecided
Unassigned

Bug Description

I am using the latest devstack and glance code. This is the error message when I run g-api using devstack.

======================================g-api=============================================
2012-12-06 13:28:08 11089 WARNING glance.api.v2.images [-] Could not find schema properties file schema-image.json. Continuing without custom properties
2012-12-06 13:28:08 11089 INFO glance.db.sqlalchemy.api [-] not auto-creating glance registry DB
2012-12-06 13:28:08 11089 DEBUG glance.notifier [-] Converted strategy alias rabbit to glance.notifier.notify_kombu.RabbitStrategy __init__ /opt/stack/g
lance/glance/notifier/__init__.py:55
2012-12-06 13:28:08 11089 INFO glance.notifier.notify_kombu [-] Connecting to AMQP server on localhost:5672
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/eventlet/hubs/poll.py", line 97, in wait
    readers.get(fileno, noop).cb(fileno)
  File "/usr/local/lib/python2.7/dist-packages/eventlet/greenthread.py", line 192, in main
    result = function(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/amqplib/client_0_8/channel.py", line 843, in exchange_declare
    (40, 11), # Channel.exchange_declare_ok
  File "/usr/local/lib/python2.7/dist-packages/amqplib/client_0_8/abstract_channel.py", line 105, in wait
    return amqp_method(self, args)
  File "/usr/local/lib/python2.7/dist-packages/amqplib/client_0_8/channel.py", line 273, in _close
    (class_id, method_id))
AMQPChannelException: (406, u"PRECONDITION_FAILED - cannot redeclare exchange 'glance' in vhost '/' with different type, durable, internal or autodelete
 value", (40, 10), 'Channel.exchange_declare')
Removing descriptor: 6
2012-12-06 13:28:09 11089 CRITICAL glance [-] (406, u"PRECONDITION_FAILED - cannot redeclare exchange 'glance' in vhost '/' with different type, durable
, internal or autodelete value", (40, 10), 'Channel.exchange_declare')
2012-12-06 13:28:09 11089 TRACE glance Traceback (most recent call last):
2012-12-06 13:28:09 11089 TRACE glance File "/opt/stack/glance/bin/glance-api", line 60, in <module>
2012-12-06 13:28:09 11089 TRACE glance server.start(config.load_paste_app, default_port=9292)
2012-12-06 13:28:09 11089 TRACE glance File "/opt/stack/glance/glance/common/wsgi.py", line 208, in start
2012-12-06 13:28:09 11089 TRACE glance self.run_child()
2012-12-06 13:28:09 11089 TRACE glance File "/opt/stack/glance/glance/common/wsgi.py", line 259, in run_child
2012-12-06 13:28:09 11089 TRACE glance self.run_server()
2012-12-06 13:28:09 11089 TRACE glance File "/opt/stack/glance/glance/common/wsgi.py", line 279, in run_server
2012-12-06 13:28:09 11089 TRACE glance self.app_func(),
2012-12-06 13:28:09 11089 TRACE glance File "/opt/stack/glance/glance/common/config.py", line 187, in load_paste_app
2012-12-06 13:28:09 11089 TRACE glance app = deploy.loadapp("config:%s" % conf_file, name=app_name)
2012-12-06 13:28:09 11089 TRACE glance File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 247, in loadapp
2012-12-06 13:28:09 11089 TRACE glance return loadobj(APP, uri, name=name, **kw)
2012-12-06 13:28:09 11089 TRACE glance File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 272, in loadobj
2012-12-06 13:28:09 11089 TRACE glance return context.create()
2012-12-06 13:28:09 11089 TRACE glance File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 710, in create
2012-12-06 13:28:09 11089 TRACE glance return self.object_type.invoke(self)
2012-12-06 13:28:09 11089 TRACE glance File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 203, in invoke
2012-12-06 13:28:09 11089 TRACE glance app = context.app_context.create()
2012-12-06 13:28:09 11089 TRACE glance File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 710, in create
2012-12-06 13:28:09 11089 TRACE glance return self.object_type.invoke(self)
2012-12-06 13:28:09 11089 TRACE glance File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 146, in invoke
2012-12-06 13:28:09 11089 TRACE glance return fix_call(context.object, context.global_conf, **context.local_conf)
2012-12-06 13:28:09 11089 TRACE glance File "/usr/lib/python2.7/dist-packages/paste/deploy/util.py", line 56, in fix_call
2012-12-06 13:28:09 11089 TRACE glance val = callable(*args, **kw)
2012-12-06 13:28:09 11089 TRACE glance File "/opt/stack/glance/glance/common/wsgi.py", line 407, in factory
2012-12-06 13:28:09 11089 TRACE glance return cls(routes.Mapper())
2012-12-06 13:28:09 11089 TRACE glance File "/opt/stack/glance/glance/api/v2/router.py", line 42, in __init__
2012-12-06 13:28:09 11089 TRACE glance images_resource = images.create_resource(custom_image_properties)
2012-12-06 13:28:09 11089 TRACE glance File "/opt/stack/glance/glance/api/v2/images.py", line 726, in create_resource
2012-12-06 13:28:09 11089 TRACE glance controller = ImagesController()
2012-12-06 13:28:09 11089 TRACE glance File "/opt/stack/glance/glance/api/v2/images.py", line 48, in __init__
2012-12-06 13:28:09 11089 TRACE glance self.notifier = notifier or glance.notifier.Notifier()
2012-12-06 13:28:09 11089 TRACE glance File "/opt/stack/glance/glance/notifier/__init__.py", line 65, in __init__
2012-12-06 13:28:09 11089 TRACE glance self.strategy = strategy_class()
2012-12-06 13:28:09 11089 TRACE glance File "/opt/stack/glance/glance/notifier/notify_kombu.py", line 68, in __init__
2012-12-06 13:28:09 11089 TRACE glance self.reconnect()
2012-12-06 13:28:09 11089 TRACE glance File "/opt/stack/glance/glance/notifier/notify_kombu.py", line 130, in reconnect
2012-12-06 13:28:09 11089 TRACE glance self._connect()
2012-12-06 13:28:09 11089 TRACE glance File "/opt/stack/glance/glance/notifier/notify_kombu.py", line 121, in _connect
2012-12-06 13:28:09 11089 TRACE glance queue.declare()
2012-12-06 13:28:09 11089 TRACE glance File "/usr/local/lib/python2.7/dist-packages/kombu/entity.py", line 359, in declare
2012-12-06 13:28:09 11089 TRACE glance return (self.name and self.exchange.declare(nowait),
2012-12-06 13:28:09 11089 TRACE glance File "/usr/local/lib/python2.7/dist-packages/kombu/entity.py", line 151, in declare
2012-12-06 13:28:09 11089 TRACE glance nowait=nowait)
2012-12-06 13:28:09 11089 TRACE glance File "/usr/local/lib/python2.7/dist-packages/kombu/syn.py", line 14, in blocking
2012-12-06 13:28:09 11089 TRACE glance return __sync_current(fun, *args, **kwargs)
2012-12-06 13:28:09 11089 TRACE glance File "/usr/local/lib/python2.7/dist-packages/kombu/syn.py", line 40, in __eblocking__
2012-12-06 13:28:09 11089 TRACE glance return spawn(fun, *args, **kwargs).wait()
2012-12-06 13:28:09 11089 TRACE glance File "/usr/local/lib/python2.7/dist-packages/eventlet/greenthread.py", line 166, in wait
2012-12-06 13:28:09 11089 TRACE glance return self._exit_event.wait()
2012-12-06 13:28:09 11089 TRACE glance File "/usr/local/lib/python2.7/dist-packages/eventlet/event.py", line 116, in wait
2012-12-06 13:28:09 11089 TRACE glance return hubs.get_hub().switch()
2012-12-06 13:28:09 11089 TRACE glance File "/usr/local/lib/python2.7/dist-packages/eventlet/hubs/hub.py", line 177, in switch
2012-12-06 13:28:09 11089 TRACE glance return self.greenlet.switch()
2012-12-06 13:28:09 11089 TRACE glance File "/usr/local/lib/python2.7/dist-packages/eventlet/greenthread.py", line 192, in main
2012-12-06 13:28:09 11089 TRACE glance result = function(*args, **kwargs)
2012-12-06 13:28:09 11089 TRACE glance File "/usr/local/lib/python2.7/dist-packages/amqplib/client_0_8/channel.py", line 843, in exchange_declare
2012-12-06 13:28:09 11089 TRACE glance (40, 11), # Channel.exchange_declare_ok
2012-12-06 13:28:09 11089 TRACE glance File "/usr/local/lib/python2.7/dist-packages/amqplib/client_0_8/abstract_channel.py", line 105, in wait
2012-12-06 13:28:09 11089 TRACE glance return amqp_method(self, args)
2012-12-06 13:28:09 11089 TRACE glance File "/usr/local/lib/python2.7/dist-packages/amqplib/client_0_8/channel.py", line 273, in _close
2012-12-06 13:28:09 11089 TRACE glance (class_id, method_id))
2012-12-06 13:28:09 11089 TRACE glance AMQPChannelException: (406, u"PRECONDITION_FAILED - cannot redeclare exchange 'glance' in vhost '/' with different type, durable, internal or autodelete value", (40, 10), 'Channel.exchange_declare')
2012-12-06 13:28:09 11089 TRACE glance
2012-12-06 13:28:09 11082 ERROR eventlet.wsgi.server [-] Not respawning child 11089, cannot recover from termination
===================================================================================================

Revision history for this message
Jay Pipes (jaypipes) wrote :

Set rabbit_durable_queues = True in your glance-api.conf.

Revision history for this message
Jiajun-xu (jiajun-xu) wrote :

I also met the issue and setting "rabbit_durable_queues = True" could solve it.

Revision history for this message
Nicolae Paladi (n-paladi) wrote :

I have met the same issue;
when setting "rabbit_durable_queues = True" g-api can indeed be started;
However, Devstack always rewrites the glance-api.conf each time, resetting
"rabbit_durable_queues = False" so this breaks the execution of the devstack scripts

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

We aren't going to change anything in Glance to treat this. The only place that measurable work could be done is in Devstack (where we actually had a hacky fix for this at one point). I'll let the Devstack team triage this.

Changed in glance:
status: New → Invalid
Changed in devstack:
assignee: nobody → Bogdan Dobrelya (bogdando)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to devstack (master)

Fix proposed to branch: master
Review: https://review.openstack.org/24061

Changed in devstack:
status: New → In Progress
Changed in devstack:
assignee: Bogdan Dobrelya (bogdando) → nobody
Dean Troyer (dtroyer)
Changed in devstack:
status: In Progress → 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.