Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix issues identified in etcd-io#11321 (comment)
  • Loading branch information
brandond committed Apr 10, 2020
1 parent 59f5fb2 commit 1b9a76e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions embed/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import (
"go.etcd.io/etcd/pkg/types"

bolt "go.etcd.io/bbolt"
"go.uber.org/multierr"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
"golang.org/x/crypto/bcrypt"
Expand Down Expand Up @@ -603,7 +604,7 @@ func (cfg *Config) PeerURLsMapAndToken(which string) (urlsmap types.URLsMap, tok
case cfg.DNSCluster != "":
clusterStrs, cerr := cfg.GetDNSClusterNames()
lg := cfg.logger
if cerr != nil {
if len(clusterStrs) == 0 && cerr != nil {
lg.Warn("failed to resolve during SRV discovery", zap.Error(cerr))
return nil, "", cerr
}
Expand Down Expand Up @@ -675,7 +676,7 @@ func (cfg *Config) GetDNSClusterNames() ([]string, error) {
zap.Error(httpCerr),
)

return clusterStrs, cerr
return clusterStrs, multierr.Combine(cerr, httpCerr)
}

func (cfg Config) InitialClusterFromName(name string) (ret string) {
Expand Down

0 comments on commit 1b9a76e

Please sign in to comment.