mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
etcd-tester: retry for 'etcdserver: not capable'
Fix https://github.com/coreos/etcd/issues/5573. Currently stresser starts at the same time as cluster start. If the stresser got launched too fast/early, all stressers exit from the error 'etcdserver: not capable', which means the cluster is not ready yet. This adds additional error checking, so stresser can retry.
This commit is contained in:
parent
9a14b796e0
commit
350673f1f8
@ -26,6 +26,7 @@ import (
|
||||
|
||||
clientV2 "github.com/coreos/etcd/client"
|
||||
"github.com/coreos/etcd/etcdserver"
|
||||
"github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
|
||||
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
|
||||
"golang.org/x/net/context"
|
||||
"google.golang.org/grpc"
|
||||
@ -112,6 +113,9 @@ func (s *stresser) Stress() error {
|
||||
case transport.ErrConnClosing.Desc:
|
||||
// server closed the transport (failure injected node)
|
||||
shouldContinue = true
|
||||
case rpctypes.ErrNotCapable.Error():
|
||||
// capability check has not been done (in the beginning)
|
||||
shouldContinue = true
|
||||
|
||||
// default:
|
||||
// errors from stresser.Cancel method:
|
||||
|
Loading…
x
Reference in New Issue
Block a user