Skip to content

Commit

Permalink
fix(pool): panic when detect conflict failed
Browse files Browse the repository at this point in the history
  • Loading branch information
fioncat committed Jun 11, 2024
1 parent 343f21a commit 0f0c0af
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/ipamd/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ func (s *ipamServer) getPodIp(r *rpc.AddPodNetworkRequest) (*rpc.PodNetwork, err
err = s.checkIPConflict(pn.VPCIP)
if err != nil {
ulog.Errorf("Detect ip conflict for %s error: %v, we will release it", pn.VPCIP, err)
err = s.uapiDeleteSecondaryIp(pn.VPCIP)
if err != nil {
ulog.Errorf("Release ip %s after conflict error: %v", pn.VPCIP, err)
delErr := s.uapiDeleteSecondaryIp(pn.VPCIP)
if delErr != nil {
ulog.Errorf("Release ip %s after conflict error: %v", pn.VPCIP, delErr)
return nil, err
}
return nil, err
Expand Down

0 comments on commit 0f0c0af

Please sign in to comment.