Use ntp pool not single server for AWS

Some of the servers are off by a lot, eg 7s in one case I saw.

SHould help with #1186

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
Justin Cormack 2017-02-14 13:20:18 +00:00
parent 304fb1bc27
commit 97b5b71224
2 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,4 @@
server pool.ntp.org iburst minpoll 2 pool pool.ntp.org iburst minpoll 2
makestep 0.5 -1 makestep 0.5 -1
keyfile /etc/chrony/chrony.keys keyfile /etc/chrony/chrony.keys
driftfile /var/lib/chrony/chrony.drift driftfile /var/lib/chrony/chrony.drift

View File

@ -51,13 +51,13 @@ start() {
exit 0 exit 0
;; ;;
"mac") "mac")
sed -i '/server pool.ntp.org/d' /etc/chrony/chrony.conf sed -i '/pool pool.ntp.org/d' /etc/chrony/chrony.conf
;; ;;
"aws") "aws")
sed -i -e "s/^server [^ ]\+/server 0.amazon.pool.ntp.org/g" /etc/chrony/chrony.conf sed -i -e "s/^pool [^ ]\+/pool 0.amazon.pool.ntp.org/g" /etc/chrony/chrony.conf
;; ;;
"gcp") "gcp")
sed -i -e "s/^server [^ ]\+/server metadata.google.internal/g" /etc/chrony/chrony.conf sed -i -e "s/^pool [^ ]\+/server metadata.google.internal/g" /etc/chrony/chrony.conf
;; ;;
"azure") "azure")
# TODO needs an ntp solution # TODO needs an ntp solution