heat-manage purge_deleted doesn't work

Bug #1723875 reported by Alli Ellis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Invalid
Undecided
Unassigned

Bug Description

heat-manage purge_deleted doesn't seem to work.
After running purge_deleted an entry is still kept in the database and shown with list --deleted:

root@server1:~# openstack stack create s1 -t s1.yaml
+---------------------+--------------------------------------+
| Field | Value |
+---------------------+--------------------------------------+
| id | a3d43d3d-dd0a-44b2-9fcd-2bc58a3eca58 |
| stack_name | s1 |
| description | Template 1 |
| creation_time | 2017-10-16T07:25:59Z |
| updated_time | None |
| stack_status | CREATE_IN_PROGRESS |
| stack_status_reason | Stack CREATE started |
+---------------------+--------------------------------------+
root@server1:~# openstack stack list --deleted
+--------------------------------------+------------+----------------------------------+-----------------+----------------------+--------------+---------------+
| ID | Stack Name | Project | Stack Status | Creation Time | Updated Time | Deletion Time |
+--------------------------------------+------------+----------------------------------+-----------------+----------------------+--------------+---------------+
| a3d43d3d-dd0a-44b2-9fcd-2bc58a3eca58 | s1 | d3c6b047fe4a4477ab81489bd1612c38 | CREATE_COMPLETE | 2017-10-16T07:25:59Z | None | None |
+--------------------------------------+------------+----------------------------------+-----------------+----------------------+--------------+---------------+
root@server1:~# openstack stack delete s1 -y
root@server1:~#
root@server1:~# sudo -u heat heat-manage purge_deleted
root@server1:~# echo $?
0
root@server1:~# heat-manage purge_deleted
root@server1:~# echo $?
0
root@server1:~# openstack stack list --deleted
+--------------------------------------+------------+----------------------------------+-----------------+----------------------+----------------------+----------------------+
| ID | Stack Name | Project | Stack Status | Creation Time | Updated Time | Deletion Time |
+--------------------------------------+------------+----------------------------------+-----------------+----------------------+----------------------+----------------------+
| a3d43d3d-dd0a-44b2-9fcd-2bc58a3eca58 | s1 | d3c6b047fe4a4477ab81489bd1612c38 | DELETE_COMPLETE | 2017-10-16T07:25:59Z | 2017-10-16T07:26:40Z | 2017-10-16T07:26:41Z |
+--------------------------------------+------------+----------------------------------+-----------------+----------------------+----------------------+----------------------+
root@server1:~#
root@server1:~#

Environment:
Single machine with Keystone and Heat installed.

root@server1:~# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.3 LTS"

root@server1:~# apt show heat-api
Package: heat-api
Version: 1:9.0.0-0ubuntu1~cloud0
APT-Sources: http://ubuntu-cloud.archive.canonical.com/ubuntu xenial-updates/pike/main amd64 Packages
...

Revision history for this message
Thomas Herve (therve) wrote :

purge_deleted takes an "age" argument, it default to 90 days. Pass "0" to remove just deleted stacks.

Changed in heat:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.