Skip to content

Commit

Permalink
fix(dbm-services): dbha切换域名指向CLB失败 #6884
Browse files Browse the repository at this point in the history
  • Loading branch information
xiepaup authored and zhangzhw8 committed Sep 12, 2024
1 parent eda7906 commit 07007b9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,9 @@ func (ins *RedisProxySwitchInfo) ShowSwitchInstanceInfo() string {

// KickOffDns kick instance from dns
func (ins *RedisProxySwitchInfo) KickOffDns() error {
if !ins.ApiGw.DNSFlag {
log.Logger.Infof("no need kickDNS,info:%s",
ins.ShowSwitchInstanceInfo())
if !ins.ApiGw.DNSFlag || ins.ApiGw.DNSForword {
log.Logger.Infof("switch proxy ignore dns , 4 {WithDNS:%+v, DNSForword:%+v}; info:%s",
ins.ApiGw.DNSFlag, ins.ApiGw.DNSForword, ins.ShowSwitchInstanceInfo())
return nil
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ func RedisClusterNewIns(instances []interface{}, conf *config.Config) ([]dbutil.
return nil, err
}

var predixyIns, redisIns []dbutil.DataBaseDetect
var predixyIns []dbutil.DataBaseDetect
for _, uIns := range unmarshalIns {
// check the cluster_type should be PredixyRedisCluster
if uIns.ClusterType != constvar.PredixyRedisCluster {
redisIns = append(redisIns, NewRedisClusterDetectInstance(uIns, conf))
continue
}

// create detect instance by machine_type
Expand All @@ -41,7 +41,6 @@ func RedisClusterNewIns(instances []interface{}, conf *config.Config) ([]dbutil.
// get pass from config system.
GetInstancePass(predixyIns, conf)

ret = append(ret, redisIns...)
ret = append(ret, predixyIns...)
return ret, err
}
Expand Down

0 comments on commit 07007b9

Please sign in to comment.