change swarm.heartbeat to swarm.discovery.heartbeat

Signed-off-by: Victor Vieux <victorvieux@gmail.com>
This commit is contained in:
Victor Vieux 2015-05-13 15:48:07 -07:00
parent 5db3a9cd0e
commit 59cd11b946
3 changed files with 3 additions and 3 deletions

View File

@ -26,7 +26,7 @@ ARGUMENTS:
OPTIONS:
{{range .Flags}}{{.}}
{{end}}{{if (eq .Name "manage")}}{{printf "\t * swarm.overcommit=0.05\tovercommit to apply on resources"}}
{{printf "\t * swarm.heartbeat=25\ttime in second between each heartbeat"}}{{end}}{{ end }}
{{printf "\t * swarm.discovery.heartbeat=25\ttime in second between each heartbeat"}}{{end}}{{ end }}
`
}

View File

@ -52,7 +52,7 @@ func NewCluster(scheduler *scheduler.Scheduler, store *state.Store, TLSConfig *t
cluster.overcommitRatio = val
}
if cluster.heartbeat, _ = options.Uint("swarm.heartbeat"); cluster.heartbeat < 1 {
if cluster.heartbeat, _ = options.Uint("swarm.discovery.heartbeat"); cluster.heartbeat < 1 {
return nil, errors.New("heartbeat should be an unsigned integer and greater than 0")
}

View File

@ -99,7 +99,7 @@ function swarm_manage() {
discovery="$@"
fi
"$SWARM_BINARY" manage -H "$SWARM_HOST" --cluster-opt "swarm.heartbeat=1" "$discovery" &
"$SWARM_BINARY" manage -H "$SWARM_HOST" --cluster-opt "swarm.discovery.heartbeat=1" "$discovery" &
SWARM_PID=$!
wait_until_reachable "$SWARM_HOST"
retry 10 1 check_swarm_nodes