Bug 1367460

Summary: heat stack-delete fails to clean UUIDs
Product: Red Hat OpenStack Reporter: Joe Talerico <jtaleric>
Component: openstack-ironicAssignee: Lucas Alvares Gomes <lmartins>
Status: CLOSED DUPLICATE QA Contact: Raviv Bar-Tal <rbartal>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 10.0 (Newton)CC: mburns, rhel-osp-director-maint, sbaker, shardy, srevivo
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-06 15:45:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Joe Talerico 2016-08-16 13:03:36 UTC
Description of problem:
Deleting a stack, does not properly clean all the UUIDs from the Ironic nodes. 

Example:
[stack@c10-h01-r730xd ~]$ ironic node-list
+--------------------------------------+------+--------------------------------------+-------------+--------------------+-------------+
| UUID                                 | Name | Instance UUID                        | Power State | Provisioning State | Maintenance |
+--------------------------------------+------+--------------------------------------+-------------+--------------------+-------------+
| c045fbf3-62f5-4d37-874c-fe63036b3772 | None | None                                 | power off   | available          | False       |
| 61d0d51f-a876-4016-8a26-ea029251b07e | None | None                                 | power off   | available          | False       |
| d2669fed-d095-49c6-bccc-ad018545e650 | None | None                                 | power on    | available          | True        |
| ab99faad-ac08-4840-be94-1388ade14026 | None | None                                 | power off   | available          | False       |
| a3ba6369-d1b9-4525-a1f6-46f185bda94f | None | None                                 | power off   | available          | False       |
| afdedea7-c5f1-42cb-8be5-4773979b3399 | None | 19ac1ca3-a1b4-4d2d-a93e-3245763998fa | power off   | available          | False       |
| ab8d3b26-1335-4919-a7f7-1e974d7a3034 | None | None                                 | power off   | available          | False       |
| c4a03019-c459-49f9-b09e-dd096d8c84ea | None | None                                 | power off   | available          | False       |
| 1a25d311-d019-435f-8956-4eff42a037e6 | None | None                                 | power on    | error              | False       |
| 27d52bc8-6d76-4ff6-8c59-0fccdfebf787 | None | None                                 | power off   | available          | False       |
| e2805fba-fbe0-49ed-ac5b-269e79e0f598 | None | None                                 | power off   | available          | False       |
+--------------------------------------+------+--------------------------------------+-------------+--------------------+-------------+
[stack@c10-h01-r730xd ~]$ heat stack-list
WARNING (shell) "heat stack-list" is deprecated, please use "openstack stack list" instead
+----+------------+--------------+---------------+--------------+
| id | stack_name | stack_status | creation_time | updated_time |
+----+------------+--------------+---------------+--------------+
+----+------------+--------------+---------------+--------------+


Version-Release number of selected component (if applicable):
[stack@c10-h01-r730xd ~]$ rpm -qa | grep heat
python-heatclient-1.3.1-0.20160725020742.d930e33.el7ost.noarch
openstack-heat-engine-7.0.0-0.20160726050915.97a7e96.el7ost.noarch
puppet-heat-9.1.0-0.20160712153506.5b5e0b3.el7ost.noarch
python-heat-tests-7.0.0-0.20160726050915.97a7e96.el7ost.noarch
openstack-heat-api-7.0.0-0.20160726050915.97a7e96.el7ost.noarch
openstack-tripleo-heat-templates-5.0.0-0.20160725225924.77f6c40.1.el7ost.noarch
openstack-heat-common-7.0.0-0.20160726050915.97a7e96.el7ost.noarch
openstack-heat-api-cfn-7.0.0-0.20160726050915.97a7e96.el7ost.noarch
openstack-heat-templates-0.0.1-0.20160719185907.497cf07.el7ost.noarch


How reproducible:
N/A

Steps to Reproduce:
1. Deploy overcloud
2. Delete overcloud

Actual results:
Show in description

Expected results:
UUIDs to be cleaned out.

Additional info:

Comment 2 Zane Bitter 2016-08-16 16:27:56 UTC
Heat just calls delete in Nova and waits until the server cannot be found any more from the Nova API. So unless something is showing up in 'nova list', this is not a bug in Heat. It's likely a bug in either Ironic or Nova.

Comment 3 Joe Talerico 2016-08-16 18:04:35 UTC
Nothing in `nova list`

Comment 4 Joe Talerico 2016-08-16 18:05:19 UTC
Also will note that manually running `ironic node-update uuid remove instance_uuid` cleaned things up.

Comment 5 Lucas Alvares Gomes 2016-09-06 15:45:54 UTC
Hi, 

Thanks for the report Joe, this is a bug in the nova ironic driver it's currently being tracked at https://bugzilla.redhat.com/show_bug.cgi?id=1372392 and there's a backport patch attached to that BZ as well.

*** This bug has been marked as a duplicate of bug 1372392 ***