← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1111213] Re: Instance can not be deleted after soft reboot

 

** Changed in: nova/folsom
       Status: In Progress => Won't Fix

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

Title:
  Instance can not be deleted after soft reboot

Status in OpenStack Compute (Nova):
  Fix Released
Status in OpenStack Compute (nova) folsom series:
  Won't Fix

Bug description:
  Reproduce steps in devstack:
  1. create an instance(a instance doesn't support acpi is better)
  2. soft reboot it
  3. wait a minute and delete it
  this is a race condition issue, so it is probabilistic to reproduce it, but you can add a time.sleep(10) to nova/virt/libvirt/driver.py:_destroy(), just like this:
          LOG.info(_("Instance destroyed successfully."),
                           instance=instance)
                  raise utils.LoopingCallDone()

          LOG.debug(_("-----------------------sleep 10 start-------------------------"))
          time.sleep(10)
          timer = utils.FixedIntervalLoopingCall(_wait_for_destroy)
  then the instance can not be deleted even when we delete it several times.

  The reason may be that:
  1. soft reboot will wait for instance become to 'shutdown', and then start it
  2. delete operation also wait for this, and then clean up the instance
  3. if soft reboot found the instance become to 'shutdown' firstly, it will start it immediately
  4. then the delete operation will go to the _wait_for_destroy loop, and the loop may be endless
  5. when we delete the instance again, because the lock was hold by the delete operation before, this one will wait the lock and don't implement actually.

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