← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1371535] [NEW] 'FlavorNotFound' when create an instance with cells

 

Public bug reported:

I create a new flavor, and create an instance with the new flavor. It failed with "raise exception.FlavorNotFound(flavor_id=id)\n\nFlavorNotFound: Flavor 12 could not be found".
Because when creates a new flavor, it will update the db on apicell only, but not update it on childcell. When the spwan instance on host, it will access the db on childcell.

The trace back sa following:

File " sr/lib/python2.7/site-packages ova/compute/manager.py", line 1316, in _build_instance
 set_access_ip=set_access_ip)
 File " sr/lib/python2.7/site-packages ova/compute/manager.py", line 401, in decorated_function 
 return function(self, context, *args, **kwargs)  
 File " sr/lib/python2.7/site-packages ova/compute/manager.py", line 1729, in _spawn    
 LOG.exception(_(\'Instance failed to spawn\'), instance=instance)  
 File " sr/lib/python2.7/site-packages ova/openstack/common/excutils.py", line 68, in __exit__    
 six.reraise(self.type_, self.value, self.tb)  
 File " sr/lib/python2.7/site-packages ova/compute/manager.py", line 1726, in _spawn    
 block_device_info)  
 File " sr/lib/python2.7/site-packages ova/virt/libvirt/driver.py", line 2323, in spawn    
 write_to_disk=True)  
 File " sr/lib/python2.7/site-packages ova/virt/libvirt/driver.py", line 3508, in to_xml    
 disk_info, rescue, block_device_info)  
 File " sr/lib/python2.7/site-packages ova/virt/libvirt/driver.py", line 3157, in get_guest_config    
 instance[\'instance_type_id\']) 
 File " sr/lib/python2.7/site-packages ova/objects/base.py", line 110, in wrapper    args, kwargs)  
 File " sr/lib/python2.7/site-packages ova/conductor/rpcapi.py", line 425, in object_class_action    
 objver=objver, args=args, kwargs=kwargs) 
 File " sr/lib/python2.7/site-packages/oslo/messaging/rpc/client.py", line 150, in call    
 wait_for_reply=True, timeout=timeout) 
 File " sr/lib/python2.7/site-packages/oslo/messaging/transport.py", line 90, in _send   
 timeout=timeout)  
 File " sr/lib/python2.7/site-packages/oslo/messaging/_drivers/amqpdriver.py", line 412, in send    
 return self._send(target, ctxt, message, wait_for_reply, timeout)
 File " sr/lib/python2.7/site-packages/oslo/messaging/_drivers/amqpdriver.py", line 405, in _send    
 raise result\n', u'FlavorNotFound_Remote: Flavor 12 could not be found.\nTraceback (most recent call last):
 File " sr/lib/python2.7/site-packages ova/conductor/manager.py", line 597, in _object_dispatch   
 return getattr(target, method)(context, *args, **kwargs)  
 File " sr/lib/python2.7/site-packages ova/objects/base.py", line 112, in wrapper   
 result = fn(cls, context, *args, **kwargs)  File " sr/lib/python2.7/site-packages ova/objects/flavor.py", line 83, in get_by_id    
 db_flavor = db.flavor_get(context, id)
 File " sr/lib/python2.7/site-packages ova/db/api.py", line 1454, in flavor_get    
 return IMPL.flavor_get(context, id) 
 File " sr/lib/python2.7/site-packages ova/db/sqlalchemy/api.py", line 164, in wrapper    
 return f(*args, **kwargs) 
 File " sr/lib/python2.7/site-packages ova/db/sqlalchemy/api.py", line 4368, in flavor_get    
 raise exception.FlavorNotFound(flavor_id=id)\n\nFlavorNotFound: Flavor 12 could not be found.

** Affects: nova
     Importance: Undecided
         Status: New

-- 
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/1371535

Title:
  'FlavorNotFound' when create an instance with cells

Status in OpenStack Compute (Nova):
  New

Bug description:
  I create a new flavor, and create an instance with the new flavor. It failed with "raise exception.FlavorNotFound(flavor_id=id)\n\nFlavorNotFound: Flavor 12 could not be found".
  Because when creates a new flavor, it will update the db on apicell only, but not update it on childcell. When the spwan instance on host, it will access the db on childcell.

  The trace back sa following:

  File " sr/lib/python2.7/site-packages ova/compute/manager.py", line 1316, in _build_instance
   set_access_ip=set_access_ip)
   File " sr/lib/python2.7/site-packages ova/compute/manager.py", line 401, in decorated_function 
   return function(self, context, *args, **kwargs)  
   File " sr/lib/python2.7/site-packages ova/compute/manager.py", line 1729, in _spawn    
   LOG.exception(_(\'Instance failed to spawn\'), instance=instance)  
   File " sr/lib/python2.7/site-packages ova/openstack/common/excutils.py", line 68, in __exit__    
   six.reraise(self.type_, self.value, self.tb)  
   File " sr/lib/python2.7/site-packages ova/compute/manager.py", line 1726, in _spawn    
   block_device_info)  
   File " sr/lib/python2.7/site-packages ova/virt/libvirt/driver.py", line 2323, in spawn    
   write_to_disk=True)  
   File " sr/lib/python2.7/site-packages ova/virt/libvirt/driver.py", line 3508, in to_xml    
   disk_info, rescue, block_device_info)  
   File " sr/lib/python2.7/site-packages ova/virt/libvirt/driver.py", line 3157, in get_guest_config    
   instance[\'instance_type_id\']) 
   File " sr/lib/python2.7/site-packages ova/objects/base.py", line 110, in wrapper    args, kwargs)  
   File " sr/lib/python2.7/site-packages ova/conductor/rpcapi.py", line 425, in object_class_action    
   objver=objver, args=args, kwargs=kwargs) 
   File " sr/lib/python2.7/site-packages/oslo/messaging/rpc/client.py", line 150, in call    
   wait_for_reply=True, timeout=timeout) 
   File " sr/lib/python2.7/site-packages/oslo/messaging/transport.py", line 90, in _send   
   timeout=timeout)  
   File " sr/lib/python2.7/site-packages/oslo/messaging/_drivers/amqpdriver.py", line 412, in send    
   return self._send(target, ctxt, message, wait_for_reply, timeout)
   File " sr/lib/python2.7/site-packages/oslo/messaging/_drivers/amqpdriver.py", line 405, in _send    
   raise result\n', u'FlavorNotFound_Remote: Flavor 12 could not be found.\nTraceback (most recent call last):
   File " sr/lib/python2.7/site-packages ova/conductor/manager.py", line 597, in _object_dispatch   
   return getattr(target, method)(context, *args, **kwargs)  
   File " sr/lib/python2.7/site-packages ova/objects/base.py", line 112, in wrapper   
   result = fn(cls, context, *args, **kwargs)  File " sr/lib/python2.7/site-packages ova/objects/flavor.py", line 83, in get_by_id    
   db_flavor = db.flavor_get(context, id)
   File " sr/lib/python2.7/site-packages ova/db/api.py", line 1454, in flavor_get    
   return IMPL.flavor_get(context, id) 
   File " sr/lib/python2.7/site-packages ova/db/sqlalchemy/api.py", line 164, in wrapper    
   return f(*args, **kwargs) 
   File " sr/lib/python2.7/site-packages ova/db/sqlalchemy/api.py", line 4368, in flavor_get    
   raise exception.FlavorNotFound(flavor_id=id)\n\nFlavorNotFound: Flavor 12 could not be found.

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


Follow ups

References