From 8b1a8b45748a8a314aa9ac228783ec825cfd870a Mon Sep 17 00:00:00 2001 From: bobz965 Date: Tue, 13 Jun 2023 15:02:51 +0800 Subject: [PATCH] add err log to help find conflict ip owner --- pkg/ipam/subnet.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/ipam/subnet.go b/pkg/ipam/subnet.go index e9dcc5bd8a52..6ddaf7236000 100644 --- a/pkg/ipam/subnet.go +++ b/pkg/ipam/subnet.go @@ -321,6 +321,7 @@ func (subnet *Subnet) GetStaticAddress(podName, nicName string, ip IP, mac *stri subnet.V4IPToPod[ip.String()] = fmt.Sprintf("%s,%s", subnet.V4IPToPod[ip.String()], podName) return ip, macStr, nil } + klog.Errorf("ip %s has been allocated to %s", ip.String(), pods) return ip, macStr, ErrConflict } if !force { @@ -354,6 +355,7 @@ func (subnet *Subnet) GetStaticAddress(podName, nicName string, ip IP, mac *stri subnet.V6IPToPod[ip.String()] = fmt.Sprintf("%s,%s", subnet.V6IPToPod[ip.String()], podName) return ip, macStr, nil } + klog.Errorf("ip %s has been allocated to %s", ip.String(), pods) return ip, macStr, ErrConflict } if !force {