← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1185190] Re: instance_type data cannot be extracted from sys_meta after instance deleted

 

** 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/1185190

Title:
  instance_type data cannot be extracted from sys_meta after instance
  deleted

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

Bug description:
  This commit:

  ---
  commit 17bca438954638d74035d560e826a26a532b3ea3
  Author: Joe Gordon <jogo@xxxxxxxxxxxxxxxx>
  Date:   Wed Mar 13 16:58:13 2013 -0700

      Delete InstanceSystemMetadata on instance deletion

      Thanks to no-db-compute only pre-delete instance data is used in
      notifications. So now we can go back to deleting InstanceSystemMetadata
      when an instance is deleted.

      Fixes bug 1153827

      Change-Id: Ic66b998cde2a15a24f302f08c34753a8b57da73d
  ---

  Changed things so that we delete the instance_system_metadata entries
  for an instance when instance_destroy() is called.  However, the
  commit message turns out to be wrong, from what I can tell.  There's 2
  cases that need access to instance_type data that's stored in sys_meta
  AFTER an instance is deleted:

  1) The API.  If you specify 'changes-since', the API will return deleted instances.  The instance_type data needs to be extracted in order to form the API response
  2) _usage_audit_log() task in compute manager.  This task potentially queries for deleted instances in the past day to send audit information for them nightly.

  I don't have a traceback for #1 handy, but:

  Traceback for #2:

  Traceback (most recent call last):
    File "/meow/nova/compute/manager.py", line 3813, in _instance_usage_audit
          include_bandwidth=True
    File "/meow/nova/conductor/api.py", line 308, in notify_usage_exists
      system_metadata, extra_usage_info, include_bandwidth)
    File "/meow/nova/utils.py", line 1089, in wrapper
      return func(*args, **kwargs)
    File "/meow/nova/conductor/manager.py", line 405, in notify_usage_exists
          include_bandwidth)  File "/meow/nova/compute/utils.py", line 224, in notify_usage_exists
      system_metadata=system_metadata, extra_usage_info=extra_info)
    File "/meow/nova/compute/utils.py", line 250, in notify_about_instance_usage
      network_info, system_metadata, **extra_usage_info)
    File "/meow/nova/notifications.py", line 287, in info_from_instance
          instance_type = flavors.extract_instance_type(instance_ref)
    File "/meow/nova/compute/flavors.py", line 247, in extract_instance_type
      instance_type[key] = type_fn(sys_meta[type_key])
  KeyError: 'instance_type_memory_mb'

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