Comment 3 for bug 1018721

Vish Ishaya (vishvananda) wrote :

This patch works around the issue:

diff --git a/nova/network/api.py b/nova/network/api.py
index 96a7a2f..a189a72 100644
--- a/nova/network/api.py
+++ b/nova/network/api.py
@@ -216,9 +216,14 @@ class API(base.Base):

     def get_instance_nw_info(self, context, instance):
         """Returns all network info related to an instance."""
+ try:
+ instance_type = instance['instance_type']
+ except Exception:
+ instance_type = self.db.instance_type_get(
+ context, instance['instance_type_id'])
         args = {'instance_id': instance['id'],
                 'instance_uuid': instance['uuid'],
- 'rxtx_factor': instance['instance_type']['rxtx_factor'],
+ 'rxtx_factor': instance_type['rxtx_factor'],
                 'host': instance['host'],
                 'project_id': instance['project_id']}
         try: