diff --git a/client/consul_template.go b/client/consul_template.go index 4f30b229d954..6861c5159071 100644 --- a/client/consul_template.go +++ b/client/consul_template.go @@ -2,6 +2,7 @@ package client import ( "fmt" + "math/rand" "os" "path/filepath" "strings" @@ -261,8 +262,12 @@ WAIT: if restart || len(signals) != 0 { if splay != 0 { + ns := splay.Nanoseconds() + offset := rand.Int63n(ns) + t := time.Duration(offset) + select { - case <-time.After(time.Duration(splay)): + case <-time.After(t): case <-tm.shutdownCh: return } diff --git a/scripts/install_consul.sh b/scripts/install_consul.sh index 9623e6288a1c..5c4812dba770 100755 --- a/scripts/install_consul.sh +++ b/scripts/install_consul.sh @@ -2,7 +2,7 @@ set -ex -CONSUL_VERSION="0.7.0" +CONSUL_VERSION="0.7.2" CURDIR=`pwd` echo Fetching Consul...