Description of problem: When deleting a node Ironic will check two things: 1) Whether a node is associated with an instance and if so it will prevent the deletion. 2) If a node is powred on and if so it will prevent the deletion. For 1) this only makes sense when used with Nova because nova will update the instance_uuid field in Ironic to create between the instance and nova and the node in Ironic. For the standalone version that's not a requirement to deploy a node. So we need to make Ironic look at the provision states of the node instead of the instance association. Say the node is ACTIVE we should prevent it from being deleted from the db so that we make sure the user goes through the state machine flow and get the node to a safe state prior to deletion (so that he won't leave the node in a whacky state or with data from the tenant in the local disk) For 2) it doesn't matter whether the node is powered on or off. Ironic will issue REBOOT when start the deployment, so it will reboot the node if powered on, or start the node if it's powered off. I think this check is a historical thing. Version-Release number of selected component (if applicable): How reproducible: 100% of the time Steps to Reproduce: 1. Power on a machine $ ironic node-set-power-state 267e42c8-df07-49f5-bc7f-48b566acb109 on 2. Try to delete the node $ ironic node-delete 267e42c8-df07-49f5-bc7f-48b566acb109 Node 267e42c8-df07-49f5-bc7f-48b566acb109 can't be deleted because it's not powered off Actual results: Node doesn't get delete if it's powered on Expected results: Node deleted Additional info:
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2016:1234