Skip to content

Commit df57ab4

Browse files
committed
fix(loadbalancers): ip_port_mapping is overwritten by new vips
Signed-off-by: SkalaNetworks <contact@skala.network>
1 parent 7c0812d commit df57ab4

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

pkg/ovs/ovn-nb-load_balancer.go

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -625,24 +625,7 @@ func (c *OVNNbClient) LoadBalancerUpdateIPPortMapping(lbName, vipEndpoint string
625625
ops, err := c.LoadBalancerOp(
626626
lbName,
627627
func(lb *ovnnb.LoadBalancer) []model.Mutation {
628-
// Delete from the IPPortMappings any outdated mapping
629-
mappingToDelete := make(map[string]string)
630-
for portIP, portMapVip := range lb.IPPortMappings {
631-
if _, ok := ipPortMappings[portIP]; !ok {
632-
mappingToDelete[portIP] = portMapVip
633-
}
634-
}
635-
636-
if len(mappingToDelete) > 0 {
637-
klog.Infof("deleting outdated entry from ipportmapping %v", mappingToDelete)
638-
}
639-
640628
return []model.Mutation{
641-
{
642-
Field: &lb.IPPortMappings,
643-
Value: mappingToDelete,
644-
Mutator: ovsdb.MutateOperationDelete,
645-
},
646629
{
647630
Field: &lb.IPPortMappings,
648631
Value: ipPortMappings,

0 commit comments

Comments
 (0)