mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
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:
commit
9b33edfa7e
1 changed files with 2 additions and 8 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue