kube-ovn ecmp 集中式路由 重复添加定位以及修改

image.png

可以看到ecmp路由出现重复添加的情况

  1. 触发更新的点
    目前设计上,每隔一段时间都会触发一次关于node的更新,这个更新会触发ecmp 类型的集中式网关的更新
I1125 08:00:23.957327       7 node.go:67] enqueue update node pc-node-2
I1125 08:00:23.972186       7 subnet.go:1253] subnet default-ecmp-subnet configure gateway node, nodeIPs [100.64.0.4 100.64.0.3 100.64.0.2]


# 但是这里的log始终都是全量node,所以不是这里

                klog.Infof("subnet %s configure gateway node, nodeIPs %v", subnet.Name, nodeIPs)

                if err = c.addPolicyRouteForCentralizedSubnet(subnet, "", ipNameMap, nodeIPs); err != nil {
                    klog.Errorf("failed to add ecmp policy route for centralized subnet %s: %v", subnet.Name, err)
                    return err
                }


#  k logs -f -n kube-system     kube-ovn-controller-65fdcb5454-nmhfn  | grep  " configure gateway node, nodeIPs "
I1125 07:52:56.342146       7 subnet.go:1253] subnet default-ecmp-subnet configure gateway node, nodeIPs [100.64.0.4 100.64.0.3 100.64.0.2]
I1125 07:53:09.405984       7 subnet.go:1253] subnet default-ecmp-subnet configure gateway node, nodeIPs [100.64.0.4 100.64.0.3 100.64.0.2]
I1125 07:54:05.756501       7 subnet.go:1253] subnet default-ecmp-subnet configure gateway node, nodeIPs [100.64.0.4 100.64.0.3 100.64.0.2]
I1125 07:54:15.100669       7 subnet.go:1253] subnet default-ecmp-subnet configure gateway node, nodeIPs [100.64.0.4 100.64.0.3 100.64.0.2]
I1125 07:55:00.430403       7 subnet.go:1253] subnet default-ecmp-subnet configure gateway node, nodeIPs [100.64.0.4 100.64.0.3 100.64.0.2]
I1125 07:55:56.781605       7 subnet.go:1253] subnet default-ecmp-subnet configure gateway node, nodeIPs [100.64.0.4 100.64.0.3 100.64.0.2]
I1125 07:56:06.128764       7 subnet.go:1253] subnet default-ecmp-subnet configure gateway node, nodeIPs [100.64.0.4 100.64.0.3 100.64.0.2]
I1125 07:56:46.553279       7 subnet.go:1253] subnet default-ecmp-subnet configure gateway node, nodeIPs [100.64.0.4 100.64.0.3 100.64.0.2]


你可能感兴趣的:(kube-ovn ecmp 集中式路由 重复添加定位以及修改)