Bug 1266755 - [RFE] Provide a script testing integrity of records in DB
[RFE] Provide a script testing integrity of records in DB
Status: NEW
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Other (Show other bugs)
6.1.1
x86_64 Linux
medium Severity medium (vote)
: Unspecified
: --
Assigned To: satellite6-bugs
Katello QA List
: FutureFeature, Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-27 08:33 EDT by Pavel Moravec
Modified: 2016-10-04 16:38 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
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)

  None (edit)
Description Pavel Moravec 2015-09-27 08:33:36 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.

An example:
- 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):
foreman-1.7.2.34-1


How reproducible:
100%

Steps to Reproduce:
1. How to check data integrity in postgres DBs (mainly foreman one)?


Actual results:
No tool exists


Expected results:
A tool for data integrity to exist


Additional info:
Comment 2 Pavel Moravec 2015-10-01 04:04:30 EDT
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).
Comment 3 Bryan Kearney 2016-07-08 16:36:46 EDT
Per 6.3 planning, moving out non acked bugs to the backlog

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