修复域名解析--DNS服务商--同步域名时无法解析集群额外附加的CNAME的问题

This commit is contained in:
刘祥超
2022-11-05 19:25:35 +08:00
parent b2a0204f6b
commit 6c3d24d895
2 changed files with 2 additions and 3 deletions

View File

@@ -437,7 +437,7 @@ func (this *NodeClusterDAO) FindAllEnabledClustersWithDNSDomainId(tx *dbs.Tx, dn
_, err = this.Query(tx).
State(NodeClusterStateEnabled).
Attr("dnsDomainId", dnsDomainId).
Result("id", "name", "dnsName", "dnsDomainId", "isOn").
Result("id", "name", "dnsName", "dnsDomainId", "isOn", "dns").
Slice(&result).
FindAll()
return

View File

@@ -351,7 +351,7 @@ func (this *DNSDomainService) ExistAvailableDomains(ctx context.Context, req *pb
// 转换域名信息
func (this *DNSDomainService) convertDomainToPB(tx *dbs.Tx, domain *dns.DNSDomain) (*pb.DNSDomain, error) {
domainId := int64(domain.Id)
var domainId = int64(domain.Id)
defaultRoute, err := dnsutils.FindDefaultDomainRoute(tx, domain)
if err != nil {
@@ -383,7 +383,6 @@ func (this *DNSDomainService) convertDomainToPB(tx *dbs.Tx, domain *dns.DNSDomai
countAllNodes1 := int64(0)
countAllServers1 := int64(0)
for _, cluster := range clusters {
_, nodeRecords, serverRecords, countAllNodes, countAllServers, nodesChanged2, serversChanged2, err := this.findClusterDNSChanges(cluster, records, domain.Name, defaultRoute)
if err != nil {
return nil, err