Skip to content

Commit 0d1599f

Browse files
add srl connectivity test (#3056)
* add srl connectivity test * Update test/e2e/kube-ovn/switch_lb_rule/switch_lb_rule.go --------- Co-authored-by: 张祖建 <zhangzujian.7@gmail.com>
1 parent 42f35a3 commit 0d1599f

File tree

4 files changed

+205
-143
lines changed

4 files changed

+205
-143
lines changed

pkg/controller/endpoint.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -194,16 +194,18 @@ func (c *Controller) handleUpdateEndpoint(key string) error {
194194

195195
// for performance reason delete lb with no backends
196196
if len(backends) != 0 {
197+
klog.V(3).Infof("update vip %s with backends %s to LB %s", vip, backends, lb)
197198
if err = c.ovnClient.LoadBalancerAddVip(lb, vip, backends...); err != nil {
198199
klog.Errorf("failed to add vip %s with backends %s to LB %s: %v", vip, backends, lb, err)
199200
return err
200201
}
201202
} else {
203+
klog.V(3).Infof("delete vip %s from LB %s", vip, lb)
202204
if err := c.ovnClient.LoadBalancerDeleteVip(lb, vip); err != nil {
203205
klog.Errorf("failed to delete vip %s from LB %s: %v", vip, lb, err)
204206
return err
205207
}
206-
208+
klog.V(3).Infof("delete vip %s from old LB %s", vip, lb)
207209
if err := c.ovnClient.LoadBalancerDeleteVip(oldLb, vip); err != nil {
208210
klog.Errorf("failed to delete vip %s from LB %s: %v", vip, lb, err)
209211
return err

pkg/controller/service.go

-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ func (c *Controller) enqueueAddService(obj interface{}) {
5656

5757
func (c *Controller) enqueueDeleteService(obj interface{}) {
5858
svc := obj.(*v1.Service)
59-
//klog.V(3).Infof("enqueue delete service %s/%s", svc.Namespace, svc.Name)
6059
klog.Infof("enqueue delete service %s/%s", svc.Namespace, svc.Name)
6160

6261
vip, ok := svc.Annotations[util.SwitchLBRuleVipsAnnotation]

pkg/ipam/ipam.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ func (ipam *IPAM) GetRandomAddress(podName, nicName string, mac *string, subnetN
6161
func (ipam *IPAM) GetStaticAddress(podName, nicName, ip string, mac *string, subnetName string, checkConflict bool) (string, string, string, error) {
6262
ipam.mutex.RLock()
6363
defer ipam.mutex.RUnlock()
64-
64+
klog.Infof("allocating static ip %s from subnet %s", ip, subnetName)
6565
if subnet, ok := ipam.Subnets[subnetName]; !ok {
6666
return "", "", "", ErrNoAvailable
6767
} else {

0 commit comments

Comments
 (0)