Skip non-bucket dns entry in federated bucket list (#7339)

master
Aditya Manthramurthy 6 years ago committed by kannappanr
parent 0b96ad4fdc
commit b296b3cf8b
  1. 9
      pkg/dns/etcd_dns.go

@ -101,6 +101,15 @@ func (c *coreDNS) list(key string) ([]SrvRecord, error) {
} }
srvRecord.Key = strings.TrimPrefix(string(n.Key), key) srvRecord.Key = strings.TrimPrefix(string(n.Key), key)
srvRecord.Key = strings.TrimSuffix(srvRecord.Key, srvRecord.Host) srvRecord.Key = strings.TrimSuffix(srvRecord.Key, srvRecord.Host)
// Skip non-bucket entry like for a key
// /skydns/net/miniocloud/10.0.0.1 that may exist as
// dns entry for the server (rather than the bucket
// itself).
if srvRecord.Key == "" {
continue
}
// SRV records are stored in the following form // SRV records are stored in the following form
// /skydns/net/miniocloud/bucket1, so this function serves multiple // /skydns/net/miniocloud/bucket1, so this function serves multiple
// purposes basically when we do a Get(bucketName) this function // purposes basically when we do a Get(bucketName) this function

Loading…
Cancel
Save