Bug 1269505 - Deleting a node shouldn't depend on power state
Deleting a node shouldn't depend on power state
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-ironic (Show other bugs)
7.0 (Kilo)
Unspecified Unspecified
medium Severity medium
: z5
: 7.0 (Kilo)
Assigned To: Lucas Alvares Gomes
Toure Dunnon
: Triaged, ZStream
Depends On:
  Show dependency treegraph
Reported: 2015-10-07 08:47 EDT by Lucas Alvares Gomes
Modified: 2016-06-15 14:04 EDT (History)
5 users (show)

See Also:
Fixed In Version: openstack-ironic-2015.1.2-3.el7ost
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-06-15 14:04:48 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
OpenStack gerrit 186361 None None None Never

  None (edit)
Description Lucas Alvares Gomes 2015-10-07 08:47:42 EDT
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:
Comment 6 errata-xmlrpc 2016-06-15 14:04:48 EDT
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.


Note You need to log in before you can comment on or make changes to this bug.