Merge pull request #31631 from aaronlehmann/swarm-failure-on-startup

cluster: Proceed with startup if cluster component can't be created
This commit is contained in:
Aaron Lehmann 2017-03-22 16:40:49 -07:00 committed by GitHub
commit 9b33edfa7e
1 changed files with 2 additions and 8 deletions

View File

@ -39,7 +39,6 @@ package cluster
//
import (
"crypto/x509"
"fmt"
"net"
"os"
@ -171,13 +170,8 @@ func New(config Config) (*Cluster, error) {
logrus.Error("swarm component could not be started before timeout was reached")
case err := <-nr.Ready():
if err != nil {
if errors.Cause(err) == errSwarmLocked {
return c, nil
}
if err, ok := errors.Cause(c.nr.err).(x509.CertificateInvalidError); ok && err.Reason == x509.Expired {
return c, nil
}
return nil, errors.Wrap(err, "swarm component could not be started")
logrus.WithError(err).Error("swarm component could not be started")
return c, nil
}
}
return c, nil