Bug 1041107

Summary: [RFE][nova]: Compare DB time with local to ensure that there is no mistiming
Product: Red Hat OpenStack Reporter: RHOS Integration <rhos-integ>
Component: RFEsAssignee: RHOS Maint <rhos-maint>
Status: CLOSED UPSTREAM QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: markmc, yeylon
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: https://blueprints.launchpad.net/nova/+spec/use-db-time
Whiteboard: upstream_milestone_none upstream_status_not-started upstream_definition_drafting
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-19 17:36:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description RHOS Integration 2013-12-12 13:39:04 UTC
Cloned from launchpad blueprint https://blueprints.launchpad.net/nova/+spec/use-db-time.

Description:

All tables in nova DB have 3 columns (deleted_at, updated_at, created_at) that have type datetime.

There are a lot of places where they are used. For example when we are checking is service available we are comparing local time with value in updated_at column.

So if our nodes become mistiming  we will get a lot of different problems (for example unavailable servieses). And for administrators there could be not so clear why services are unavailable or something else is not working..

So to reduce problems with time we should implement 2 next things:

1. When nova starts, during init, compare local time to db time, and raise exception if the difference is too large

2. In periodic task, compare local time to db time, and if difference is to large do one of the next thing (it should be specified in conf):

a) nothing - do nothing
b) log - log warning
c) sync - sync time using ntpdate
d) die - kill nova process

Specification URL (additional information):

None