mirror of
https://github.com/minio/minio.git
synced 2024-12-24 22:25:54 -05:00
Disallow creating buckets even with different domains (#8716)
If two distinct clusters are started with different domains along with single common domain, this situation was leading to conflicting buckets getting created on different clusters To avoid this do not prematurely error out if the key has no entries, let the caller decide on which entry matches and which entry is valid. This allows support for MINIO_DOMAIN with one common domain, but each cluster may have their own domains. Fixes #8705
This commit is contained in:
parent
8eba97da74
commit
3af70b36fd
@ -117,9 +117,6 @@ func (c *CoreDNS) list(key string) ([]SrvRecord, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if r.Count == 0 {
|
||||
return nil, ErrNoEntriesFound
|
||||
}
|
||||
}
|
||||
|
||||
var srvRecords []SrvRecord
|
||||
@ -143,9 +140,6 @@ func (c *CoreDNS) list(key string) ([]SrvRecord, error) {
|
||||
srvRecords = append(srvRecords, srvRecord)
|
||||
|
||||
}
|
||||
if len(srvRecords) == 0 {
|
||||
return nil, ErrNoEntriesFound
|
||||
}
|
||||
sort.Slice(srvRecords, func(i int, j int) bool {
|
||||
return srvRecords[i].Key < srvRecords[j].Key
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user