fix: inter-vm traffic limited by eip bandwidth limit

This commit is contained in:
Qiu Jian
2021-08-10 00:13:03 +08:00
parent caa15ce0f8
commit 93bceeafdd
+2 -2
View File
@@ -551,7 +551,7 @@ func (keeper *OVNNorthboundKeeper) ClaimGuestnetwork(ctx context.Context, guestn
qosEipOut = &ovn_nb.QoS{
Priority: 3000,
Direction: "from-lport",
Match: fmt.Sprintf("inport == %q", lportName),
Match: fmt.Sprintf("inport == %q && ip4 && ip4.src == %s", vpcErpName(vpc.Id), guestnetwork.IpAddr),
Bandwidth: map[string]int64{
"rate": kbps,
"burst": kbur,
@@ -635,7 +635,7 @@ func (keeper *OVNNorthboundKeeper) ClaimGuestnetwork(ctx context.Context, guestn
args = append(args, ovnCreateArgs(qosEipIn, "qosEipIn")...)
args = append(args, "--", "add", "Logical_Switch", vpcEipLsName(vpc.Id), "qos_rules", "@qosEipIn")
args = append(args, ovnCreateArgs(qosEipOut, "qosEipOut")...)
args = append(args, "--", "add", "Logical_Switch", netLsName(guestnetwork.NetworkId), "qos_rules", "@qosEipOut")
args = append(args, "--", "add", "Logical_Switch", vpcEipLsName(vpc.Id), "qos_rules", "@qosEipOut")
}
return keeper.cli.Must(ctx, "ClaimGuestnetwork", args)
}