← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1184641] Re: metadata service throws error 500 when compute_driver is not set

 

** Changed in: nova/grizzly
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1184641

Title:
  metadata service throws error 500 when compute_driver is not set

Status in OpenStack Compute (Nova):
  Fix Released
Status in OpenStack Compute (nova) grizzly series:
  Fix Released

Bug description:
  How to reproduce:
  - 1 (controller) node running all required services except nova-compute, compute_driver parameter not defined in nova.conf
  - 1 (compute) node running nova-compte with compute_driver = libvirt.LibvirtDriver and libvirt_type = lxc
  - Boot an instance

  On the instance:
  checking http://169.254.169.254/20090404/instanceid
  failed 1/20: up 10299.50. iid had '<html>
   <head>
    <title>500 Internal Server Error</title>
   </head>
   <body>
    <h1>500 Internal Server Error</h1>
    Remote metadata server experienced an internal server error.<br /><br />


   </body>
  </html>'
  failed 2/20: up 10301.92. iid had '<html>
   <head>
    <title>500 Internal Server Error</title>
   </head>
   <body>
    <h1>500 Internal Server Error</h1>
    Remote metadata server experienced an internal server error.<br /><br />


   </body>
  </html>'

  
  In the nova-api logs:

  2013-05-27 15:02:10.760 ERROR nova.api.metadata.handler [req-b6588700-4d5a-4ee3-84ad-c4be03cf0e62 None None] Failed to get metadata for instance id: 8d64ef04-8161-4e93-a387-93f519cadd65
  2013-05-27 15:02:10.760 TRACE nova.api.metadata.handler Traceback (most recent call last):
  2013-05-27 15:02:10.760 TRACE nova.api.metadata.handler   File "/opt/stack/nova/nova/api/metadata/handler.py", line 183, in _handle_instance_id_request
  2013-05-27 15:02:10.760 TRACE nova.api.metadata.handler     remote_address)
  2013-05-27 15:02:10.760 TRACE nova.api.metadata.handler   File "/opt/stack/nova/nova/api/metadata/handler.py", line 90, in get_metadata_by_instance_id
  2013-05-27 15:02:10.760 TRACE nova.api.metadata.handler     instance_id, address)
  2013-05-27 15:02:10.760 TRACE nova.api.metadata.handler   File "/opt/stack/nova/nova/api/metadata/base.py", line 417, in get_metadata_by_instance_id
  2013-05-27 15:02:10.760 TRACE nova.api.metadata.handler     return InstanceMetadata(instance, address)
  2013-05-27 15:02:10.760 TRACE nova.api.metadata.handler   File "/opt/stack/nova/nova/api/metadata/base.py", line 118, in __init__
  2013-05-27 15:02:10.760 TRACE nova.api.metadata.handler     self.mappings = _format_instance_mapping(capi, ctxt, instance)
  2013-05-27 15:02:10.760 TRACE nova.api.metadata.handler   File "/opt/stack/nova/nova/api/metadata/base.py", line 423, in _format_instance_mapping
  2013-05-27 15:02:10.760 TRACE nova.api.metadata.handler     return block_device.instance_block_mapping(instance, bdms)
  2013-05-27 15:02:10.760 TRACE nova.api.metadata.handler   File "/opt/stack/nova/nova/block_device.py", line 98, in instance_block_mapping
  2013-05-27 15:02:10.760 TRACE nova.api.metadata.handler     if driver.compute_driver_matches('xenapi.XenAPIDriver'):
  2013-05-27 15:02:10.760 TRACE nova.api.metadata.handler   File "/opt/stack/nova/nova/virt/driver.py", line 967, in compute_driver_matches
  2013-05-27 15:02:10.760 TRACE nova.api.metadata.handler     return CONF.compute_driver.endswith(match)
  2013-05-27 15:02:10.760 TRACE nova.api.metadata.handler AttributeError: 'NoneType' object has no attribute 'endswith'
  2013-05-27 15:02:10.760 TRACE nova.api.metadata.handler

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1184641/+subscriptions