From: Grant Slater Date: Fri, 19 Jun 2020 00:44:29 +0000 (+0100) Subject: chrony: online sources on chef runs X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/a8f13843566b5a52e7fd5eeff54c1939229483ac?ds=sidebyside;hp=a2d428ab723b899ad865307c57f6dabb9c0b78af chrony: online sources on chef runs --- diff --git a/cookbooks/ntp/recipes/default.rb b/cookbooks/ntp/recipes/default.rb index 1f875cdcc..1a762f6d1 100644 --- a/cookbooks/ntp/recipes/default.rb +++ b/cookbooks/ntp/recipes/default.rb @@ -62,3 +62,11 @@ service "chrony" do end munin_plugin "chrony" + +# chrony occasionally marks all servers offline during a network outage. +# force online all sources during a chef run +execute "chronyc-online" do + command "/usr/bin/chronyc online" + user "root" + group "root" +end diff --git a/cookbooks/ntp/templates/default/chrony.conf.erb b/cookbooks/ntp/templates/default/chrony.conf.erb index 1752c4fa8..9fc9393bc 100644 --- a/cookbooks/ntp/templates/default/chrony.conf.erb +++ b/cookbooks/ntp/templates/default/chrony.conf.erb @@ -6,8 +6,8 @@ pool <%= server %> iburst <% end -%> # Add additional non-pool NTP servers # pool.ntp.org can sometimes be aggressive with KoD -pool time.cloudflare.com iburst maxsources 2 -pool time.google.com iburst maxsources 2 +pool time.cloudflare.com iburst +pool time.google.com iburst # Run an initial NTP sync on daemon startup initstepslew 30 time.cloudflare.com time.google.com <%= node[:ntp][:servers].join(" ") %>