mirror of
https://github.com/minio/minio.git
synced 2025-11-09 13:39:46 -05:00
Handle port as json.Number for DNS records in etcd (#8513)
This commit is contained in:
@@ -103,7 +103,7 @@ func initFederatorBackend(buckets []BucketInfo, objLayer ObjectLayer) {
|
||||
}
|
||||
|
||||
// This is not for our server, so we can continue
|
||||
hostPort := net.JoinHostPort(dnsBuckets[index].Host, dnsBuckets[index].Port)
|
||||
hostPort := net.JoinHostPort(dnsBuckets[index].Host, string(dnsBuckets[index].Port))
|
||||
if globalDomainIPs.Intersection(set.CreateStringSet(hostPort)).IsEmpty() {
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -328,7 +328,7 @@ func isMinioReservedBucket(bucketName string) bool {
|
||||
func getHostsSlice(records []dns.SrvRecord) []string {
|
||||
var hosts []string
|
||||
for _, r := range records {
|
||||
hosts = append(hosts, net.JoinHostPort(r.Host, r.Port))
|
||||
hosts = append(hosts, net.JoinHostPort(r.Host, string(r.Port)))
|
||||
}
|
||||
return hosts
|
||||
}
|
||||
@@ -337,7 +337,7 @@ func getHostsSlice(records []dns.SrvRecord) []string {
|
||||
func getHostFromSrv(records []dns.SrvRecord) string {
|
||||
rand.Seed(time.Now().Unix())
|
||||
srvRecord := records[rand.Intn(len(records))]
|
||||
return net.JoinHostPort(srvRecord.Host, srvRecord.Port)
|
||||
return net.JoinHostPort(srvRecord.Host, string(srvRecord.Port))
|
||||
}
|
||||
|
||||
// IsCompressed returns true if the object is marked as compressed.
|
||||
|
||||
Reference in New Issue
Block a user