[system-tests]Review the approach of time syncronization in system tests
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Fuel for OpenStack |
Fix Released
|
High
|
Dennis Dmitriev | ||
5.1.x |
In Progress
|
High
|
Dennis Dmitriev | ||
6.0.x |
In Progress
|
High
|
Dennis Dmitriev |
Bug Description
Our system tests use 'snapshot' and 'revert' for virtual machines to save deployment time when the same configuration is tested on several different test cases.
After each revert, time on all virtual machines left in the past and must be corrected before test run.
We synchronize time with the command 'ntpd -gq' , which has the following issues:
- if the server with time source doesn't run 'ntpd' service, the command 'ntpd -gq' on a slave hungs forever;
- if 'ntpd' service on the server with time source has recently restarted, it reject all incoming requests from it's slaves 'ntpd -gq' for some time. It leads to 'no servers were found' error after 'ntpd -gq' on a slave, and the time on the slave remains in the past;
- new approach to providing time for cluster requires to detect how exactly 'ntpd' is started on a node, because on the controllers 'ntpd' is started inside the 'vrouter' namespace. If 'ntpd' is restarted by 'init' script, it will be non-functional on controller for the rest nodes on cluster.
These reasons make the time synchronization is very challenging.
There is an obvious way how we can get all environment nodes synchronized quickly and without most of these issues.
If we use host clock as the hardware time source instead of vm clock, then we will have the same time on the same nodes just with 'hwclock -s' command, even if 'ntpd' on slaves still not working.
========== Example of using host clock source:
# Host server:
(devops-
Wed Mar 18 04:56:21 EDT 2015
# Fuel admin node:
[root@nailgun ~]# hwclock -r
Wed 18 Mar 2015 08:56:56 AM UTC -0.494653 seconds
# Controller
root@node-2:~# hwclock -r
Wed 18 Mar 2015 01:57:25 AM PDT -0.986577 seconds
# Compute
root@node-3:~# hwclock -r
Wed 18 Mar 2015 01:57:45 AM PDT -0.903103 seconds
To do this, in 'fuel-devops' repository the following option should be changed:
track='guest' to track='wall' for 'rtc' clock source: https:/
* Important!
This change requires from the hardware clock on the host to be synchronized, to avoid time differences when slaves on environment get their 'ntpd' synchronized with external time source.
description: | updated |
Changed in fuel: | |
status: | New → Confirmed |
Changed in fuel: | |
assignee: | Fuel QA Team (fuel-qa) → Dennis Dmitriev (ddmitriev) |
status: | Confirmed → In Progress |
summary: |
- Review the approach of time syncronization in system tests + [system-tests]Review the approach of time syncronization in system tests |
Changed in fuel: | |
status: | Fix Committed → Fix Released |
Related fix proposed to branch: master /review. openstack. org/168782
Review: https:/