← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1455000] [NEW] Ironic: "nova delete" doesn't work when instance is spawming

 

Public bug reported:

The "nova delete" command can be issued while the instance is spawning
and even Ironic support aborting a deployment mid-operation (when node
is in WAITDEPLOY state).

But if you issue a "nova delete" while the instance is spawming with the
Ironic driver the instance will be stuck there and nothing will happen.
That's because of a lock[1], basically the Ironic driver won't return
from spawn() until the node have been successfully deployed or error out
and that's holding the lock.

WORKAROUND:

As a work around, you can issue "nova delete" to the instance and that
will mark the task_state as "deleting". And then you can delete the
instance directly via the Ironic API as well by doing:

$ ironic node-set-provision-state <node uuid> deleted

That will realease the instance.

[1]
https://github.com/openstack/nova/blob/3841b8254e0dd820d26377312b6c004f4bd9b58e/nova/compute/manager.py#L2431

** Affects: nova
     Importance: Undecided
     Assignee: Lucas Alvares Gomes (lucasagomes)
         Status: New


** Tags: ironic

** Changed in: nova
     Assignee: (unassigned) => Lucas Alvares Gomes (lucasagomes)

** Tags added: ironic

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

Title:
  Ironic: "nova delete" doesn't work when instance is spawming

Status in OpenStack Compute (Nova):
  New

Bug description:
  The "nova delete" command can be issued while the instance is spawning
  and even Ironic support aborting a deployment mid-operation (when node
  is in WAITDEPLOY state).

  But if you issue a "nova delete" while the instance is spawming with
  the Ironic driver the instance will be stuck there and nothing will
  happen. That's because of a lock[1], basically the Ironic driver won't
  return from spawn() until the node have been successfully deployed or
  error out and that's holding the lock.

  WORKAROUND:

  As a work around, you can issue "nova delete" to the instance and that
  will mark the task_state as "deleting". And then you can delete the
  instance directly via the Ironic API as well by doing:

  $ ironic node-set-provision-state <node uuid> deleted

  That will realease the instance.

  [1]
  https://github.com/openstack/nova/blob/3841b8254e0dd820d26377312b6c004f4bd9b58e/nova/compute/manager.py#L2431

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


Follow ups

References