← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1187422] Re: sometimes instances stay in DELETE vm_state but are not marked as deleted

 

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

** Changed in: nova
    Milestone: None => havana-2

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

Title:
  sometimes instances stay in DELETE vm_state but are not marked as
  deleted

Status in OpenStack Compute (Nova):
  Fix Released

Bug description:
  This is not a common case, but I verified that we can have a kind of partial deletion of instances.
  What I saw is that instances have vm_state = DELETED but are not marked (in the DB) as deleted.

  Looking at the code it's clear that the combination of vm_sate=DELETED and deleted=0 is a valid combination even if it should be a short lived one.
  I think that if we find instances in that state during the _init_instance method we have to complete the deletion calling the self.conductor_api.instance_destroy(context, instance).
  At this moment in the _init_instance method we are ignoring instances in that state:

  def _init_instance(self, context, instance):
          '''Initialize this instance during service init.'''
          closing_vm_states = (vm_states.DELETED,
                               vm_states.SOFT_DELETED)

          # instance was supposed to shut down - don't attempt
          # recovery in any case
          if instance['vm_state'] in closing_vm_states:
              return

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