Bug 1510484
Summary: | vmdb size constantly increasing 1+gb a day | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat CloudForms Management Engine | Reporter: | Felix Dewaleyne <fdewaley> | ||||
Component: | Appliance | Assignee: | Nick Carboni <ncarboni> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Tasos Papaioannou <tpapaioa> | ||||
Severity: | urgent | Docs Contact: | |||||
Priority: | urgent | ||||||
Version: | 5.8.0 | CC: | abellott, dajohnso, fdewaley, gtanzill, jhardy, ncarboni, niroy, obarenbo, tpapaioa | ||||
Target Milestone: | GA | Keywords: | TestOnly | ||||
Target Release: | 5.10.0 | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Whiteboard: | |||||||
Fixed In Version: | 5.10.0.0 | Doc Type: | If docs needed, set a value | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | |||||||
: | 1512705 1512706 (view as bug list) | Environment: | |||||
Last Closed: | 2019-02-11 13:54:39 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: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 1512705, 1512706 | ||||||
Attachments: |
|
Comment 4
Nick Carboni
2017-11-07 17:24:46 UTC
New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/e04a60eb67c81f39944b417c450290ee74deea68 commit e04a60eb67c81f39944b417c450290ee74deea68 Author: Nick Carboni <ncarboni> AuthorDate: Wed Nov 8 17:28:58 2017 -0500 Commit: Nick Carboni <ncarboni> CommitDate: Wed Nov 8 17:28:58 2017 -0500 Add purging for vim_performance_tag_values with disabled tags When a user stops collecting C&U data for a particular tag category, the records hang around in vim_performance_tag_values until they are purged by date. This commit adds an option to the purge_orphaned_tag_values.rb tool to remove such values immediately. https://bugzilla.redhat.com/show_bug.cgi?id=1510484 tools/purge_orphaned_tag_values.rb | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) Created attachment 1349998 [details]
vim_performance_tag_values purge tool
This is a replacement for the current file at /var/www/miq/vmdb/tools/purge_orphaned_tag_values.rb
Running this file with no options will purge rows from the vim_performance_tag_values table which no longer have a corresponding metric.
This new version adds an option to remove rows which map to a tag category which is no longer set to collect data from metrics. These rows could still be used in reports (as their metrics likely still exist), but if the C&U collection was enabled for many tags by mistake, this is how you can remove some of the data which would accumulate in this table.
To delete both types of rows you can run the following from the vmdb directory:
`tools/purge_orphaned_tag_values.rb --purge-disabled-tag-values`
Please provide script and instructions in comment #9 to customer New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/d0bc3369c04d7196e97a54176505299109fb2107 commit d0bc3369c04d7196e97a54176505299109fb2107 Author: Gregg Tanzillo <gtanzill> AuthorDate: Tue Dec 19 15:36:36 2017 -0500 Commit: Gregg Tanzillo <gtanzill> CommitDate: Tue Jan 2 14:17:14 2018 -0500 Stop generating `vim_performance_tag_values` rows Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1510484 Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1514505 app/models/metric/ci_mixin/rollup.rb | 1 - app/models/storage.rb | 2 -- .../connection_adapters/miq_postgres_adapter.rb | 4 ---- .../connection_adapters/miq_postgres_legacy_adapter.rb | 4 ---- spec/models/vim_performance_tag_spec.rb | 2 -- tools/metrics_populate_retro_tags.rb | 13 ------------- 6 files changed, 26 deletions(-) New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/d0bc3369c04d7196e97a54176505299109fb2107 commit d0bc3369c04d7196e97a54176505299109fb2107 Author: Gregg Tanzillo <gtanzill> AuthorDate: Tue Dec 19 15:36:36 2017 -0500 Commit: Gregg Tanzillo <gtanzill> CommitDate: Tue Jan 2 14:17:14 2018 -0500 Stop generating `vim_performance_tag_values` rows Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1510484 Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1514505 app/models/metric/ci_mixin/rollup.rb | 1 - app/models/storage.rb | 2 -- .../connection_adapters/miq_postgres_adapter.rb | 4 ---- .../connection_adapters/miq_postgres_legacy_adapter.rb | 4 ---- spec/models/vim_performance_tag_spec.rb | 2 -- tools/metrics_populate_retro_tags.rb | 13 ------------- 6 files changed, 26 deletions(-) Verified on 5.10.0.3. |