Bug 1189000 - After upgrade from 3.4 to 3.5.0 dwh fails to collect on first minute on "insert or update on table "vm_samples_history" violates foreign key constraint "vm_samples_history_current_user_id_fkey""
Summary: After upgrade from 3.4 to 3.5.0 dwh fails to collect on first minute on "inse...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-dwh
Version: 3.5.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ovirt-3.6.0-rc
: 3.6.0
Assignee: Shirly Radco
QA Contact: Petr Matyáš
URL:
Whiteboard:
Depends On:
Blocks: 1189126 1189127 1190469 1204459
TreeView+ depends on / blocked
 
Reported: 2015-02-04 07:50 UTC by Pavel Stehlik
Modified: 2019-08-15 04:14 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Previously, a 'create date' field was added to the users table in the engine database. When the user's details were synchronized they would only be updated to the history database if the user was created before the runTime. When upgrading the 'create date' on the engine database was populated by default with the current time for all current users and after this the data warehouse was started and attempted to get the users for the history database. However, the current users were filtered and the users table was not populated correctly and caused an error when trying to update the statistics table, which has a foreign key for user_id. Now, the filter has been removed so that the history database populates correctly.
Clone Of:
: 1189126 1190469 (view as bug list)
Environment:
Last Closed: 2016-03-09 21:22:31 UTC
oVirt Team: Infra
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2016:0404 0 normal SHIPPED_LIVE rhevm-dwh bug fix and enhancement update 2016-03-10 01:29:45 UTC
oVirt gerrit 37511 0 None None None Never

Description Pavel Stehlik 2015-02-04 07:50:32 UTC
Description of problem:
 After upgrade 3.4 => 3.5 dwh log is filled by:
2015-02-03 14:48:05|r4oeiB|aJhYDf|Csc3e4|OVIRT_ENGINE_DWH|StatisticsSync|Default|6|Java Exception|tJDBCOutput_5|org.postgresql.util.PSQLException:ERROR: insert or update on table "vm_samples_history" violates foreign key constraint "vm_samples_history_current_user_id_fkey"
 Detail: Key (current_user_id)=(fdfc627c-d875-11e0-90f0-83df133b58cc) is not present in table "users_details_history".|1
Exception in component tRunJob_5
java.lang.RuntimeException: Child job running failed
       at ovirt_engine_dwh.samplerunjobs_3_5.SampleRunJobs.tRunJob_5Process(SampleRunJobs.java:1598)
       at ovirt_engine_dwh.samplerunjobs_3_5.SampleRunJobs.tRunJob_6Process(SampleRunJobs.java:1412)
       at ovirt_engine_dwh.samplerunjobs_3_5.SampleRunJobs.tRunJob_1Process(SampleRunJobs.java:1197)
       at ovirt_engine_dwh.samplerunjobs_3_5.SampleRunJobs.tRunJob_4Process(SampleRunJobs.java:982)
       at ovirt_engine_dwh.samplerunjobs_3_5.SampleRunJobs.tJDBCConnection_2Process(SampleRunJobs.java:762)
       at ovirt_engine_dwh.samplerunjobs_3_5.SampleRunJobs.tJDBCConnection_1Process(SampleRunJobs.java:641)
       at ovirt_engine_dwh.samplerunjobs_3_5.SampleRunJobs$2.run(SampleRunJobs.java:2560)

Version-Release number of selected component (if applicable):
vt13.9

How reproducible:
100%

Steps to Reproduce:
1. have engine, users and dwh installed
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Shirly Radco 2015-02-04 07:59:55 UTC
Please attach engine and history dbs

Comment 3 Yaniv Lavi 2015-02-04 08:34:42 UTC
Also attach logs.

Comment 9 Yaniv Lavi 2015-02-04 11:03:34 UTC
We located the issue, but it should not affect the DWH expect for a minute or two after setup. We will fix this for async release.

Comment 17 errata-xmlrpc 2016-03-09 21:22:31 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHEA-2016-0404.html


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