Skip to content

Commit

Permalink
add err log to help find conflict ip owner (#2939)
Browse files Browse the repository at this point in the history
  • Loading branch information
bobz965 committed Jun 13, 2023
1 parent 1f27076 commit c1c716f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/ipam/subnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 %v", ip.String(), pods)
return ip, macStr, ErrConflict
}
if !force {
Expand Down Expand Up @@ -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 %v", ip.String(), pods)
return ip, macStr, ErrConflict
}
if !force {
Expand Down

0 comments on commit c1c716f

Please sign in to comment.