mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-19 02:37:24 +08:00
替换有远端安全组的规则,避免网络不通
This commit is contained in:
@@ -312,6 +312,10 @@ func (region *SRegion) syncSecgroupRules(secgroupId string, rules []secrules.Sec
|
||||
ruleStr := rules[i].String()
|
||||
cmp := strings.Compare(_ruleStr, ruleStr)
|
||||
if cmp == 0 {
|
||||
if len(secgroup.Rules[j].RemoteSecurityGroupUUID) > 0 {
|
||||
delRuleIds = append(delRuleIds, secgroup.Rules[j].UUID)
|
||||
addRules = append(addRules, rules[i])
|
||||
}
|
||||
i++
|
||||
j++
|
||||
} else if cmp > 0 {
|
||||
|
||||
Reference in New Issue
Block a user