Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1133608

Summary: Change runTime to be set according to Engine DB date and time.
Product: Red Hat Enterprise Virtualization Manager Reporter: Shirly Radco <sradco>
Component: ovirt-engine-dwhAssignee: Shirly Radco <sradco>
Status: CLOSED ERRATA QA Contact: Petr Matyáš <pmatyas>
Severity: high Docs Contact:
Priority: high    
Version: 3.5.0CC: bazulay, didi, ecohen, gklein, iheim, rbalakri, Rhev-m-bugs, sherold, sradco, yeylon, ylavi
Target Milestone: ---   
Target Release: 3.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: infra
Fixed In Version: vt10 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1133613 (view as bug list) Environment:
Last Closed: 2015-02-11 18:16:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1152557    
Bug Blocks: 1142923, 1156165    

Description Shirly Radco 2014-08-25 14:45:04 UTC
Description of problem:
If DWH and Engine are on seperate hosts we must check engine db and history db time is synced.
Otherwise the timestamp of the update date and delete date of the records will be incorect after deletion because they are taken from the current history db time.

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


How reproducible:


Steps to Reproduce:
1.Setup DWH and Engine on seperate hosts
2.Set different time for each host
3.Delete an entity and check the changes in the history db

Actual results:
Incurrect timstamp. Create Date is accurding to Engine DB time and Update/Delete Date are accurding to history db time.

Expected results:
Time of Engine and Histiry DBs should be synced.

Additional info:

Comment 1 Shirly Radco 2014-08-25 14:59:46 UTC
I think we should add an hourly check in the etl to test this and send an error if there is a time difference larger than a minute.

Comment 2 Shirly Radco 2014-08-25 15:01:28 UTC
Didi, How can I check that the DWH is on a seperate host?

Comment 3 Yedidyah Bar David 2014-08-26 05:44:15 UTC
(In reply to Shirly Radco from comment #2)
> Didi, How can I check that the DWH is on a seperate host?

In setup code that's easy to check. Not sure that's currently easy to check in dwhd. We can add a config var for that if needed.

Not sure you should check that. There is no harm in checking even if on same host. Adding such a check might needlessly complicate the code. We do that in the setup code only in places where we must - e.g., the minimal etl version check is done only when not on same host, because if on same host, engine and dwh might be upgraded to a newer version by setup, and we do the check prior to this potential upgrade.

Not sure what's the exact behavior, btw - is the "time" we discuss the client's time or the db server time? If db server, then
1. if db servers are different you have the same problem even if apps are on same host
2. therefore, 3.4 is affected too.

Comment 4 Yaniv Lavi 2014-08-26 05:51:44 UTC
Do this test in the service start.
Select from db and compare and fail if they don't match.



Yaniv

Comment 5 Shirly Radco 2014-08-26 07:44:53 UTC
Yaniv,This should be tested hourly in the etl in my opinion and also when we start the etl process. All inside the talend script.
Do you agree?

Comment 6 Yaniv Lavi 2014-08-26 11:10:48 UTC
(In reply to Shirly Radco from comment #5)
> Yaniv,This should be tested hourly in the etl in my opinion and also when we
> start the etl process. All inside the talend script.
> Do you agree?

Why hourly the clock doesn't really change once set.

Comment 7 Barak 2014-08-26 11:43:01 UTC
I agree with Shirly here,
Someone can chenge the time while DWH is running.
And we need to fail the collection with appropriate erreor message.

Comment 8 Barak 2014-08-26 11:43:56 UTC
the check should not be milisecond accurate ....

Comment 9 Shirly Radco 2014-08-31 08:03:48 UTC
We will change so the runTime will be set according to the engine db time.
That way all updates will be according to the same db time.

Comment 12 errata-xmlrpc 2015-02-11 18:16:09 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-2015-0177.html