Skip to content

Commit

Permalink
Merge pull request #283 from SataQiu/fix-20210427
Browse files Browse the repository at this point in the history
bugfix: fix the bug that dns controller updates dns records incorrectly
  • Loading branch information
rambohe-ch authored Apr 27, 2021
2 parents 39f1bac + f04bc93 commit 08da18d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/yurttunnel/dns/dns.go
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ func (dnsctl *coreDNSRecordController) syncDNSRecordAsWhole() {
dnsctl.lock.Lock()
defer dnsctl.lock.Unlock()

ip, err := dnsctl.getTunnelServerIP(false)
tunnelServerIP, err := dnsctl.getTunnelServerIP(false)
if err != nil {
klog.Errorf("failed to sync dns record as whole, %v", err)
return
Expand All @@ -348,7 +348,7 @@ func (dnsctl *coreDNSRecordController) syncDNSRecordAsWhole() {

records := make([]string, 0, len(nodes))
for i := range nodes {
node := nodes[i]
ip, node := tunnelServerIP, nodes[i]
if !isEdgeNode(node) {
ip, err = getNodeHostIP(node)
if err != nil {
Expand Down

0 comments on commit 08da18d

Please sign in to comment.