Skip to content

Commit f3b96fe

Browse files
committed
Add draft for VM clock synchronisation recommendations
Signed-off-by: Konrad Gube <konrad.gube@cloudandheat.com>
1 parent 2a52e2d commit f3b96fe

1 file changed

Lines changed: 57 additions & 0 deletions

File tree

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
title: Recommendations on VM clock synchronization
3+
type: Decision Record
4+
status: Draft
5+
track: IaaS
6+
---
7+
8+
## Abstract
9+
10+
The system clocks of virtual machines may drift over time, and will also be affected by pausing or migrating the VM.
11+
Ensuring a correct system time usually requires synchronization with an external time source.
12+
There are multiple options for VM clock synchronization which this document will explore and evaluate for use in SCS clouds.
13+
14+
## Terminology
15+
16+
Example (abbr. Ex)
17+
This is the description for an example terminology.
18+
19+
## Context
20+
21+
Correct system time is important for the validation of TLS certificates and corelation of log entries across multiple systems.
22+
It is common practice to syncronise the system clock of VMs with a public time server via the NTP protocol.
23+
However, using public NTP servers may reduce the clock precision of the synchronized system due to network latency.
24+
It will also expose small bits of information (mainly the existence of the system) to the operator of the NTP server, and it excludes systems that are not connected to the internet.
25+
26+
There are multiple options available to synchronize clocks with a time source local to the CSP:
27+
* The CSP may provide a local static NTP service that is reachable from VMs via a provider entwork.
28+
* The CSP may inject an NTP server into project subnets, like OpenStack injects DHCP servers and the metadata service IP.
29+
* Some hypervisors support synchronisation of the guest clock with the clock of the host. CSPs could support this feature.
30+
31+
If the CSP chooses to provide an NTP server, there are also multiple ways in which VMs can be configured to use this feature.
32+
* DHCP
33+
* OpenStack Vendordata
34+
* Modification of cloiud images
35+
36+
## Decision
37+
38+
Independently of the choosen method of clock synchronization, CSPs should make sure that they are available to VMs with as little user interaction as possible.
39+
This is of course somewhat dependent on the guest operating system, and CSPs should validate that the provided methods of clock synchronization cloud are compatible with the provided cloud images.
40+
41+
The great benefit of Hypervisor-based clock synchronisation is that it works independent of network connectivity.
42+
If this feature is well supported by the used hypervisor, it should be enabled by the CSP, though CSPs must take care that the clock source of the hypervisor is itself synchronized to a precise clock source.
43+
44+
CSPs should also provide a local static NTP server that is reachable via a default external network, and should be provided to VMs as vendordata via metadata service or config drive, as this is supported by cloud-init, which is the de facto standard for VM configuration.
45+
The NTP server can optionally also be provided via DHCP, but not all standard cloud images enable NTP configuration via DHCP.
46+
Generally, the CSPs should not modify third-party cloud images to hard-code local NTP servers, as there are a lot of benefits to supporting unmodified standard images.
47+
48+
Injecting NTP servers into subnets is not something that is currently supported by OpenStack, but should be possible to implement in a similar fashion to subnet-DHCP, or the metadata service.
49+
If this feature becomes available at a later date, CSPs should prefer it to a static local NTP server, as it also supports isolated subnets.
50+
51+
## Consequences
52+
53+
What becomes easier or more difficult to do because of this change?
54+
55+
## Related Documents
56+
57+
Related Documents, OPTIONAL

0 commit comments

Comments
 (0)