Merge pull request #12960 from ioito/automated-cherry-pick-of-#12958-upstream-release-3.7

Automated cherry pick of #12958: fix(region): qcloud secgroup rule sync
This commit is contained in:
Zexi Li
2021-12-22 10:36:34 +08:00
committed by GitHub
+1 -1
View File
@@ -369,7 +369,7 @@ func (self *SRegion) syncSecgroupRules(secgroupId string, rules []cloudprovider.
params[fmt.Sprintf("SecurityGroupPolicySet.Ingress.%d.PolicyIndex", idx)] = fmt.Sprintf("%d", rule.PolicyIndex)
}
}
if len(ruleSet.Egress)+len(ruleSet.Ingress) > 0 {
if len(params) > 1 {
_, err = self.vpcRequest("DeleteSecurityGroupPolicies", params)
if err != nil {
return errors.Wrapf(err, "DeleteSecurityGroupPolicies")