mirror of
https://git.vectorsigma.ru/public/k3s.git
synced 2026-07-28 21:09:26 +00:00
Fix etcd join timeout handling
Error is deadline exceeded, not cancelled Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
This commit is contained in:
committed by
Brad Davidson
parent
795091a809
commit
f1c82392d0
@@ -626,7 +626,7 @@ func (e *ETCD) join(ctx context.Context, clientAccessInfo *clientaccess.Info) er
|
||||
if add {
|
||||
logrus.Infof("Adding member %s=%s to etcd cluster %v", e.name, e.peerURL(), cluster)
|
||||
if _, err = client.MemberAddAsLearner(clientCtx, []string{e.peerURL()}); err != nil {
|
||||
if errors.Is(err, context.Canceled) {
|
||||
if errors.Is(err, context.DeadlineExceeded) {
|
||||
return ErrJoinTimeout
|
||||
}
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user