]> git.openstreetmap.org Git - chef.git/commitdiff
chrony: online sources on chef runs
authorGrant Slater <git@firefishy.com>
Fri, 19 Jun 2020 00:44:29 +0000 (01:44 +0100)
committerGrant Slater <git@firefishy.com>
Fri, 19 Jun 2020 00:44:29 +0000 (01:44 +0100)
cookbooks/ntp/recipes/default.rb
cookbooks/ntp/templates/default/chrony.conf.erb

index 1f875cdcc83e6a41af8ce0516a42c27c4ab6bf5c..1a762f6d1adaa81f2e8cccd2928eff0bf4c3cf7f 100644 (file)
@@ -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
index 1752c4fa8b61424f5f3b219a744b49531835bc96..9fc9393bc9953eabcecf45cf3d58eea957f52d41 100644 (file)
@@ -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(" ") %>