no-db-compute exception with --config-drive 1 add_instance_metadata

Bug #1123435 reported by Brant Knudson
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Dan Smith

Bug Description

I saw this in the log when booting an instance with --config-drive 1

2013-02-12 14:19:09.590 DEBUG nova.openstack.common.rpc.amqp [req-0ca6842b-6caa-495f-ae3a-b043578f4600 admin demo] MSG_ID is cdf0d97a7a9e4515b70dba9a6ba7685c from (pid=9692) multicall /opt/stack/nova/nova/openstack/common/rpc/amqp.py:365
2013-02-12 14:19:09.826 ERROR nova.compute [req-0ca6842b-6caa-495f-ae3a-b043578f4600 admin demo] No db access allowed in nova-compute: File "/usr/local/lib/python2.7/dist-packages/eventlet/greenpool.py", line 80, in _spawn_n_impl
    func(*args, **kwargs)
  File "/opt/stack/nova/nova/openstack/common/rpc/amqp.py", line 276, in _process_data
    rval = self.proxy.dispatch(ctxt, version, method, **args)
  File "/opt/stack/nova/nova/openstack/common/rpc/dispatcher.py", line 133, in dispatch
    return getattr(proxyobj, method)(ctxt, **kwargs)
  File "/opt/stack/nova/nova/exception.py", line 88, in wrapped
    return f(self, context, *args, **kw)
  File "/opt/stack/nova/nova/compute/manager.py", line 191, in decorated_function
    return function(self, context, *args, **kwargs)
  File "/opt/stack/nova/nova/compute/manager.py", line 256, in decorated_function
    function(self, context, *args, **kwargs)
  File "/opt/stack/nova/nova/compute/manager.py", line 220, in decorated_function
    return function(self, context, *args, **kwargs)
  File "/opt/stack/nova/nova/compute/manager.py", line 1093, in run_instance
    do_run_instance()
  File "/opt/stack/nova/nova/openstack/common/lockutils.py", line 243, in inner
    retval = f(*args, **kwargs)
  File "/opt/stack/nova/nova/compute/manager.py", line 1092, in do_run_instance
    admin_password, is_first_time, node, instance)
  File "/opt/stack/nova/nova/compute/manager.py", line 722, in _run_instance
    injected_files, admin_password)
  File "/opt/stack/nova/nova/compute/manager.py", line 996, in _spawn
    block_device_info)
  File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 1199, in spawn
    admin_pass=admin_password)
  File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 1527, in _create_image
    content=files, extra_md=extra_md)
  File "/opt/stack/nova/nova/api/metadata/base.py", line 142, in __init__
    network_info = network.API().get_instance_nw_info(ctxt, instance)
  File "/opt/stack/nova/nova/network/api.py", line 88, in wrapped
    return func(self, context, *args, **kwargs)
  File "/opt/stack/nova/nova/network/api.py", line 340, in get_instance_nw_info
    result, conductor_api)
  File "/opt/stack/nova/nova/network/api.py", line 76, in update_instance_cache_with_nw_info
    api.db.instance_info_cache_update(context, instance['uuid'], cache)
  File "/opt/stack/nova/nova/db/api.py", line 735, in instance_info_cache_update
    rv = IMPL.instance_info_cache_update(context, instance_uuid, values)
  File "/opt/stack/nova/bin/nova-compute", line 65, in __call__
    stacktrace = "".join(traceback.format_stack())

2013-02-12 14:19:09.826 ERROR nova.network.api [req-0ca6842b-6caa-495f-ae3a-b043578f4600 admin demo] [instance: 6e272a44-f1ec-4611-9471-59ea96857d1c] Failed storing info cache
2013-02-12 14:19:09.826 TRACE nova.network.api [instance: 6e272a44-f1ec-4611-9471-59ea96857d1c] Traceback (most recent call last):
2013-02-12 14:19:09.826 TRACE nova.network.api [instance: 6e272a44-f1ec-4611-9471-59ea96857d1c] File "/opt/stack/nova/nova/network/api.py", line 76, in update_instance_cache_with_nw_info
2013-02-12 14:19:09.826 TRACE nova.network.api [instance: 6e272a44-f1ec-4611-9471-59ea96857d1c] api.db.instance_info_cache_update(context, instance['uuid'], cache)
2013-02-12 14:19:09.826 TRACE nova.network.api [instance: 6e272a44-f1ec-4611-9471-59ea96857d1c] File "/opt/stack/nova/nova/db/api.py", line 735, in instance_info_cache_update
2013-02-12 14:19:09.826 TRACE nova.network.api [instance: 6e272a44-f1ec-4611-9471-59ea96857d1c] rv = IMPL.instance_info_cache_update(context, instance_uuid, values)
2013-02-12 14:19:09.826 TRACE nova.network.api [instance: 6e272a44-f1ec-4611-9471-59ea96857d1c] File "/opt/stack/nova/bin/nova-compute", line 67, in __call__
2013-02-12 14:19:09.826 TRACE nova.network.api [instance: 6e272a44-f1ec-4611-9471-59ea96857d1c] raise exception.DBNotAllowed('nova-compute')
2013-02-12 14:19:09.826 TRACE nova.network.api [instance: 6e272a44-f1ec-4611-9471-59ea96857d1c] DBNotAllowed: nova-compute
2013-02-12 14:19:09.826 TRACE nova.network.api [instance: 6e272a44-f1ec-4611-9471-59ea96857d1c]
2013-02-12 14:19:09.829 DEBUG nova.virt.configdrive [req-0ca6842b-6caa-495f-ae3a-b043578f4600 admin demo] Added ec2/2009-04-04/meta-data.json to config drive from (pid=9692) add_instance_metadata /opt/stack/nova/nova/virt/configdrive.py:97

The boot still completed successfully.

I'm running with a couple extra patches:
237d78d Make the metadata paths use conductor -- https://review.openstack.org/#/c/21573/
be7a1c4 Fix nova-compute use of missing DBError -- https://review.openstack.org/#/c/21569/

Dan Smith (danms)
Changed in nova:
assignee: nobody → Dan Smith (danms)
importance: Undecided → High
milestone: none → grizzly-3
status: New → In Progress
Brant Knudson (blk-u)
summary: - no-db-compute exception with --config-drive 1 add_instane_metadata
+ no-db-compute exception with --config-drive 1 add_instance_metadata
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/21820
Committed: http://github.com/openstack/nova/commit/a2e4c2c0a4758e1ecf26ca0e6e37e18c65ad2d61
Submitter: Jenkins
Branch: master

commit a2e4c2c0a4758e1ecf26ca0e6e37e18c65ad2d61
Author: Dan Smith <email address hidden>
Date: Tue Feb 12 16:00:55 2013 -0500

    Fix passing conductor to get_instance_nw_info()

    The recent metadata patch missed this one spot, which wasn't caught
    because the network stubs weren't updated for the signature change.

    Fixes bug 1123435

    Change-Id: Iebeb98bba62189476af2c0b85615ea407a8b2ecd

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: grizzly-3 → 2013.1
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.