Skip to content

Commit 01273c5

Browse files
committed
Omit configuration for a local clock as time source if running on a VM.
Quoting http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1006427 'It is also important not to use the local clock as a time source, often referred to as the Undisciplined Local Clock.'
1 parent fd064cb commit 01273c5

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

templates/ntp.conf.el.erb

+2
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,13 @@ server <%= server %>
3535
#manycastserver 239.255.254.254 # manycast server
3636
#manycastclient 239.255.254.254 key 42 # manycast client
3737

38+
<% if @is_virtual == "false" -%>
3839
# Undisciplined Local Clock. This is a fake driver intended for backup
3940
# and when no outside source of synchronized time is available.
4041
server 127.127.1.0 # local clock
4142
fudge 127.127.1.0 stratum 10
4243

44+
<% end -%>
4345
# Drift file. Put this in a directory which the daemon can write to.
4446
# No symbolic links allowed, either, since the daemon updates the file
4547
# by creating a temporary in the same directory and then rename()'ing

templates/ntp.conf.suse.erb

+2
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,15 @@
2929
##
3030
# server 127.127.8.0 mode 5 prefer
3131

32+
<% if @is_virtual == "false" -%>
3233
##
3334
## Undisciplined Local Clock. This is a fake driver intended for backup
3435
## and when no outside source of synchronized time is available.
3536
##
3637
server 127.127.1.0 # local clock (LCL)
3738
fudge 127.127.1.0 stratum 10 # LCL is unsynchronized
3839

40+
<% end -%>
3941
# Managed by puppet class { "ntp": servers => [ ... ] }
4042
<% [servers_real].flatten.each do |server| -%>
4143
server <%= server %>

0 commit comments

Comments
 (0)