Red Hat Bugzilla – Bug 1266755
[RFE] Provide a script testing integrity of records in DB
Last modified: 2016-10-04 16:38:04 EDT
Description of problem:
There is often a case DB integrity is corrupted. Thats why repo-repair, clean_backend_objects rake scripts exist. There can be other ways how to get a corruption, see e.g. bz1263730.
It is requested to have an integrity check script, that can be run when there is a suspicion to an unknown DB data corruption. Such script *may* identify it, telling what relationship is missing or what orphaned record is missing.
- each Content View (published version?) must have its puppet class. This can be verified by a simple SELECT
The more such dependency-among-tables checks there will be, the better.
Such a script can help:
- GSS in identifying particular issues in postgres DB for a customer having a problem
- developers in checking if their fix or a new feature does not introduce a regression (during self-made testing/playing)
- QE in identifying regressions or incomplete fixes (when script is run as a sanity check after reproducer)
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. How to check data integrity in postgres DBs (mainly foreman one)?
No tool exists
A tool for data integrity to exist
An example integrity test:
- check that every katello repo has its pulp repo (and vice versa). This is something that repair_repos.rake script wont detect but happened in support case 01462756 (katello had composite content view with a repo with pulp_id missing in pulp).
Per 6.3 planning, moving out non acked bugs to the backlog