Bug 1317458 - heat-manage purge_deleted deletes only some data
heat-manage purge_deleted deletes only some data
Status: CLOSED NOTABUG
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-heat (Show other bugs)
7.0 (Kilo)
Unspecified Unspecified
unspecified Severity medium
: ---
: 8.0 (Liberty)
Assigned To: Thomas Hervé
Amit Ugol
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-03-14 06:03 EDT by Ondrej
Modified: 2016-04-26 15:35 EDT (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-03-17 09:13:12 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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
Red Hat Knowledge Base (Solution) 2215131 None None None 2016-04-05 17:13 EDT

  None (edit)
Description Ondrej 2016-03-14 06:03:23 EDT
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 09:50:02 EDT
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 09:51:34 EDT
better component
Comment 4 Zane Bitter 2016-03-14 11:49:35 EDT
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 06:28:31 EDT
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.