Bug 1317458 - heat-manage purge_deleted deletes only some data
Summary: heat-manage purge_deleted deletes only some data
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-heat
Version: 7.0 (Kilo)
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 8.0 (Liberty)
Assignee: Thomas Hervé
QA Contact: Amit Ugol
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-14 10:03 UTC by Ondrej
Modified: 2022-08-10 15:40 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-03-17 13:13:12 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker OSP-7723 0 None None None 2022-08-10 09:59:37 UTC
Red Hat Knowledge Base (Solution) 2215131 0 None None None 2016-04-05 21:13:00 UTC

Description Ondrej 2016-03-14 10:03:23 UTC
Description of problem:
Running heat-manage purge_deleted deletes only part of the data,
keeping a lot of useless data (heat.raw_template).

MariaDB [heat]> SELECT      table_name AS `Table`, round(((data_length + index_length) / 1024 / 1024), 2) `Size in MB` FROM information_schema.TABLES  WHERE table_schema = "heat"     AND table_name = "raw_template";
+--------------+------------+
| Table        | Size in MB |
+--------------+------------+
| raw_template |    3240.69 |
+--------------+------------+

#heat-manage purge_deleted

MariaDB [heat]> SELECT      table_name AS `Table`, round(((data_length + index_length) / 1024 / 1024), 2) `Size in MB` FROM information_schema.TABLES  WHERE table_schema = "heat"     AND table_name = "raw_template";
+--------------+------------+
| Table        | Size in MB |
+--------------+------------+
| raw_template |    1816.08 |
+--------------+------------+


Version-Release number of selected component (if applicable):
openstack-heat-api.noarch 2015.1.2-9.el7ost                                
openstack-heat-api-cfn.noarch 2015.1.2-9.el7ost                               
openstack-heat-api-cloudwatch.noarch 2015.1.2-9.el7ost                                
openstack-heat-common.noarch 2015.1.2-9.el7ost                                
openstack-heat-engine.noarch 2015.1.2-9.el7ost                                
openstack-heat-templates.noarch 0-0.8.20150605git.el7ost

How reproducible:


Steps to Reproduce:
1. heat-manage purge_deleted
2.
3.

Actual results:
keeps some data

Expected results:
purge all, raw_template keeps thousands of entries

Additional info:

Comment 2 Michael Bayer 2016-03-14 13:50:02 UTC
this issue would be within the heat application itself, which is responsible for emitting the appropriate SQL to the database in order to delete the items.  Only if it could be shown that this issue reproduces *only* when galera is in play, and not when plain mariadb is in use, would that even suggest the possibility of the issue being part of mariadb-galera and even then it still would likely be an issue in heat.    If the purge_deleted command has issues there's likely an upstream issue for heat in launchpad already.

Comment 3 Michael Bayer 2016-03-14 13:51:34 UTC
better component

Comment 4 Zane Bitter 2016-03-14 15:49:35 UTC
By default (i.e. with no arguments passed to heat-manage, as indicated in the description) only stacks that were deleted more than 90 days ago are purged. Are you certain that every stack was deleted more than 90 days ago? If not then completely clearing the table is definitely not the expected result. Have you tried with a shorter horizon to see if that removes more data?

Comment 5 Ondrej 2016-03-17 10:28:31 UTC
Hi,
thx Zane, that did the trick, my bad i must have overlooked the flag, sorry.


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