remove waitMemberReadyTimeout and use constants.DefaultDialTimeout
This commit is contained in:
Родитель
7843c1b7d3
Коммит
ea2a4387a9
|
@ -3,7 +3,6 @@ package cluster
|
|||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
log "github.com/Sirupsen/logrus"
|
||||
"github.com/coreos/etcd/clientv3"
|
||||
|
@ -13,8 +12,6 @@ import (
|
|||
"golang.org/x/net/context"
|
||||
)
|
||||
|
||||
const waitMemberReadyTimeout = 10 * time.Second
|
||||
|
||||
// reconcile reconciles
|
||||
// - the members in the cluster view with running pods in Kubernetes.
|
||||
// - the members and expect size of cluster.
|
||||
|
@ -43,7 +40,7 @@ func (c *Cluster) reconcile(running etcdutil.MemberSet) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := etcdutil.WaitMemberReady(etcdcli, waitMemberReadyTimeout); err != nil {
|
||||
if err := etcdutil.WaitMemberReady(etcdcli, constants.DefaultDialTimeout); err != nil {
|
||||
return err
|
||||
}
|
||||
c.updateMembers(etcdcli)
|
||||
|
|
Загрузка…
Ссылка в новой задаче