Skip to content

Commit

Permalink
delete String() function (#3488)
Browse files Browse the repository at this point in the history
Signed-off-by: pengbinbin1 <pengbiny@163.com>
  • Loading branch information
pengbinbin1 authored and zbb88888 committed Dec 6, 2023
1 parent d4addde commit 6096614
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/ipam/ipam.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,14 +235,14 @@ func (ipam *IPAM) AddOrUpdateSubnet(name, cidrStr, gw string, excludeIps []strin
for nicName, ip := range subnet.V4NicToIP {
if !ips.Contains(ip) {
podName := subnet.V4IPToPod[ip.String()]
klog.Errorf("%s address %s not in subnet %s new cidr %s", podName, ip.String(), name, cidrStr)
klog.Errorf("%s address %s not in subnet %s new cidr %s", podName, ip, name, cidrStr)
delete(subnet.V4NicToIP, nicName)
delete(subnet.V4IPToPod, ip.String())
}
}

for nicName, ip := range subnet.V4NicToIP {
klog.Infof("already assigned ip %s to nic %s in subnet %s", ip.String(), nicName, name)
klog.Infof("already assigned ip %s to nic %s in subnet %s", ip, nicName, name)
}
}
if (protocol == kubeovnv1.ProtocolDual || protocol == kubeovnv1.ProtocolIPv6) &&
Expand Down Expand Up @@ -281,14 +281,14 @@ func (ipam *IPAM) AddOrUpdateSubnet(name, cidrStr, gw string, excludeIps []strin
for nicName, ip := range subnet.V6NicToIP {
if !ips.Contains(ip) {
podName := subnet.V6IPToPod[ip.String()]
klog.Errorf("%s address %s not in subnet %s new cidr %s", podName, ip.String(), name, cidrStr)
klog.Errorf("%s address %s not in subnet %s new cidr %s", podName, ip, name, cidrStr)
delete(subnet.V6NicToIP, nicName)
delete(subnet.V6IPToPod, ip.String())
}
}

for nicName, ip := range subnet.V6NicToIP {
klog.Infof("already assigned ip %s to nic %s in subnet %s", ip.String(), nicName, name)
klog.Infof("already assigned ip %s to nic %s in subnet %s", ip, nicName, name)
}
}

Expand Down

0 comments on commit 6096614

Please sign in to comment.