You may get this error “ironic node-delete is associated with instance” while trying to delete an ironic node which has an active instance. This means that your overcloud deployment is either partially complete or successfully complete but still you would like to delete your ironic node. It is very unlikely for someone to delete their ironic node if the overcloud deployment was successful.

I have already written some articles which you may like to fix other issues related to overcloud deployment.

 
But in either condition your undercloud will have information like below

$ openstack baremetal node list
+--------------------------------------+-------------+--------------------------------------+-------------+--------------------+-------------+
| UUID                                 | Name        | Instance UUID                        | Power State | Provisioning State | Maintenance |
+--------------------------------------+-------------+--------------------------------------+-------------+--------------------+-------------+
| e6486069-4e45-4d0b-ac55-180a00de9641 | controller0 | e7ab5425-8a3b-4c79-8e52-4063471f0743 | power on    | active             | False       |
| 7d48b6ac-5df0-46e2-8f23-9e790ab03770 | compute0    | d3852ccb-684e-4b8b-b7e0-89cecf736767 | power on    | active             | False       |
| 0624b196-53f8-4aac-888b-1e25b5a415a0 | ceph0       | 89911a7c-0de3-48eb-af2f-36867d71f461 | power on    | active             | False       |
+--------------------------------------+-------------+--------------------------------------+-------------+--------------------+-------------+

 

How to fix “ironic node-delete is associated with instance”?

To overcome this issue you have two options

  1. Delete the instance before deleting the ironic node
  2. Set the ironic node in maintenance and then attempt the delete

 

How to remove the instance from the ironic node?

Move the ironic node to maintenance mode:

$ ironic node-set-maintenance NODE_UUID on

For example:

$ ironic node-set-maintenance 0624b196-53f8-4aac-888b-1e25b5a415a0 on

Un-assign nova instance from it:

$ironic node-update NODE_UUID remove instance_uuid

For example:

$ironic node-update 0624b196-53f8-4aac-888b-1e25b5a415a0 remove 89911a7c-0de3-48eb-af2f-36867d71f461

Now you can try to delete the ironic node

$ openstack baremetal node delete 0624b196-53f8-4aac-888b-1e25b5a415a0

 

How to put an ironic node in maintenance state?

As also shown in the above example, you can use below command syntax to set an ironic node to maintenance

$ ironic node-set-maintenance NODE_UUID on

For example:

$ ironic node-set-maintenance 0624b196-53f8-4aac-888b-1e25b5a415a0 on

 

Or you can use below command syntax:

$ openstack baremetal node maintenance set <NODE_UUID>

For example:

$ openstack baremetal node maintenance set e6486069-4e45-4d0b-ac55-180a00de9641

 

I hope the steps from the article to overcome the error “ironic node-delete is associated with instance” was helpful. Let me know your suggestions and feedback using the comment section.

 

Leave a Reply

Your email address will not be published. Required fields are marked *