节点如果没有设置DNS线路就使用默认线路

This commit is contained in:
刘祥超
2021-08-25 17:16:24 +08:00
parent cf476f79d6
commit 8b40634e74
6 changed files with 282 additions and 124 deletions

View File

@@ -3,6 +3,7 @@ package services
import (
"context"
"github.com/TeaOSLab/EdgeAPI/internal/db/models"
"github.com/TeaOSLab/EdgeAPI/internal/db/models/dns/dnsutils"
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
)
@@ -39,7 +40,7 @@ func (this *DNSService) FindAllDNSIssues(ctx context.Context, req *pb.FindAllDNS
clusters = []*models.NodeCluster{cluster}
}
for _, cluster := range clusters {
issues, err := models.SharedNodeClusterDAO.CheckClusterDNS(tx, cluster)
issues, err := dnsutils.CheckClusterDNS(tx, cluster)
if err != nil {
return nil, err
}