Bug 979825
Summary: | Log collector engine sos plugin should collect DB schema | ||
---|---|---|---|
Product: | Red Hat Enterprise Virtualization Manager | Reporter: | Eli Mesika <emesika> |
Component: | ovirt-engine-log-collector | Assignee: | Sandro Bonazzola <sbonazzo> |
Status: | CLOSED WONTFIX | QA Contact: | Pavel Stehlik <pstehlik> |
Severity: | low | Docs Contact: | |
Priority: | medium | ||
Version: | 3.2.0 | CC: | acathrow, emesika, iheim, jkt, knesenko, kroberts, oschreib, Rhev-m-bugs, sbonazzo |
Target Milestone: | --- | Keywords: | Improvement, Triaged |
Target Release: | 3.3.0 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | integration | ||
Fixed In Version: | Doc Type: | Enhancement | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2013-10-28 12:13:42 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: | 1019461 |
Description
Eli Mesika
2013-06-30 21:57:11 UTC
(In reply to Eli Mesika from comment #0) > Description of problem: > > We have lot of cases when an upgraded database ahs some problems. > Collecting the database schema will enable us to take the generated file, > create a local database with the same last version as we will find in the > given schema and compare both to find the problems. Just to be sure I've understood correctly the request here: you need the version of the schema stored in a file right? Because the dump of the database is already done by postgresql sos plugin, it's in log-collector-data/postgresql-sosreport-*.tar.xz stored in tar format. (In reply to Sandro Bonazzola from comment #1) > (In reply to Eli Mesika from comment #0) > > Description of problem: > > > > We have lot of cases when an upgraded database ahs some problems. > > Collecting the database schema will enable us to take the generated file, > > create a local database with the same last version as we will find in the > > given schema and compare both to find the problems. > > Just to be sure I've understood correctly the request here: > you need the version of the schema stored in a file right? > No, I need the schema itself to be able to compare it with a database having the same version and compare the differences easily > Because the dump of the database is already done by postgresql sos plugin, > it's in log-collector-data/postgresql-sosreport-*.tar.xz stored in tar > format. (In reply to Eli Mesika from comment #0) > Actual results: > Log collector does not collect db schema > > Expected results: > Log collector should collect db schema Eli, the bug description asks to add db schema collection to engine sos plugin. But the expected results just require the schema to be collected by log-collector, not also by 'sos -o engine'. Is it desired to have the schema collected by sos? If not, I can just change log-collector without touching the sos plugin. Keith, maybe this can be useful also for GSS plugin. (In reply to Sandro Bonazzola from comment #3) > (In reply to Eli Mesika from comment #0) > > > Actual results: > > Log collector does not collect db schema > > > > Expected results: > > Log collector should collect db schema > > Eli, the bug description asks to add db schema collection to engine sos > plugin. > But the expected results just require the schema to be collected by > log-collector, not also by 'sos -o engine'. > > Is it desired to have the schema collected by sos? If not, I can just change > log-collector without touching the sos plugin. > > Keith, maybe this can be useful also for GSS plugin. AFAIK, when you dump a DB via psql it will include the schema (it must). My question here is why can't you... 1) Load the dumped DB supplied via the LC via pg_restore 2) Inspect the newly loaded DB's schema via pgadmin3, or export it and diff the text with a previous version (In reply to Keith Robertson from comment #4) > (In reply to Sandro Bonazzola from comment #3) > > (In reply to Eli Mesika from comment #0) > > > > > Actual results: > > > Log collector does not collect db schema > > > > > > Expected results: > > > Log collector should collect db schema > > > > Eli, the bug description asks to add db schema collection to engine sos > > plugin. > > But the expected results just require the schema to be collected by > > log-collector, not also by 'sos -o engine'. > > > > Is it desired to have the schema collected by sos? If not, I can just change > > log-collector without touching the sos plugin. > > > > Keith, maybe this can be useful also for GSS plugin. > > AFAIK, when you dump a DB via psql it will include the schema (it must). My > question here is why can't you... > > 1) Load the dumped DB supplied via the LC via pg_restore > 2) Inspect the newly loaded DB's schema via pgadmin3, or export it and diff > the text with a previous version Because restore can be a heavy process on large installtions that will require storage allocations and time to complete while this simple scheam generation will cost us nothing and will always be there for our usage (In reply to Eli Mesika from comment #5) > (In reply to Keith Robertson from comment #4) > > (In reply to Sandro Bonazzola from comment #3) snip > > AFAIK, when you dump a DB via psql it will include the schema (it must). My > > question here is why can't you... > > > > 1) Load the dumped DB supplied via the LC via pg_restore > > 2) Inspect the newly loaded DB's schema via pgadmin3, or export it and diff > > the text with a previous version > > Because restore can be a heavy process on large installtions that will > require storage allocations and time to complete while this simple scheam > generation will cost us nothing and will always be there for our usage I have no problem adding this but you should know that pg_restore has a "--schema-only" option[1] which allows reconstitution of the db without data. Would this work? [1] http://www.postgresql.org/docs/9.2/static/app-pgrestore.html (In reply to Keith Robertson from comment #6) > (In reply to Eli Mesika from comment #5) > > (In reply to Keith Robertson from comment #4) > > > (In reply to Sandro Bonazzola from comment #3) > > snip > > > > AFAIK, when you dump a DB via psql it will include the schema (it must). My > > > question here is why can't you... > > > > > > 1) Load the dumped DB supplied via the LC via pg_restore > > > 2) Inspect the newly loaded DB's schema via pgadmin3, or export it and diff > > > the text with a previous version > > > > Because restore can be a heavy process on large installtions that will > > require storage allocations and time to complete while this simple scheam > > generation will cost us nothing and will always be there for our usage > > I have no problem adding this but you should know that pg_restore has a > "--schema-only" option[1] which allows reconstitution of the db without > data. Would this work? Yes , it will work , I still think that having that ready in plain-text will save us time and I will be happy to skip the step of creating an empty DB and use pg_restore jsut to know what scripts were installed on the database > > [1] http://www.postgresql.org/docs/9.2/static/app-pgrestore.html So, is the execution of exportDbSchema inside the sos plugin still needed? May it be done by log-collector instead of the sos plugin? Should we just close this as wontfix since pgrestore is able to do what needed with the db dump already provided by postgres sos plugin? (In reply to Sandro Bonazzola from comment #8) > So, is the execution of exportDbSchema inside the sos plugin still needed? > May it be done by log-collector instead of the sos plugin? > Should we just close this as wontfix since pgrestore is able to do what > needed with the db dump already provided by postgres sos plugin? You may close as WONTFIX (In reply to Eli Mesika from comment #9) > (In reply to Sandro Bonazzola from comment #8) > > So, is the execution of exportDbSchema inside the sos plugin still needed? > > May it be done by log-collector instead of the sos plugin? > > Should we just close this as wontfix since pgrestore is able to do what > > needed with the db dump already provided by postgres sos plugin? > > You may close as WONTFIX Done |