Skip to content

Commit

Permalink
Merge pull request #208 from Nordix/reconciler-race
Browse files Browse the repository at this point in the history
ip-reconciler: fix for duplicate IP allocation due
  • Loading branch information
maiqueb authored May 19, 2022
2 parents 06d3340 + 47e5b17 commit 1c2cd40
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/reconciler/iploop.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ func NewReconcileLooper(ctx context.Context, timeout int) (*ReconcileLooper, err
}

func newReconcileLooper(ctx context.Context, k8sClient *kubernetes.Client, timeout int) (*ReconcileLooper, error) {
pods, err := k8sClient.ListPods(ctx)
ipPools, err := k8sClient.ListIPPools(ctx)
if err != nil {
return nil, err
return nil, logging.Errorf("failed to retrieve all IP pools: %v", err)
}

ipPools, err := k8sClient.ListIPPools(ctx)
pods, err := k8sClient.ListPods(ctx)
if err != nil {
return nil, logging.Errorf("failed to retrieve all IP pools: %v", err)
return nil, err
}

whereaboutsPodRefs := getPodRefsServedByWhereabouts(ipPools)
Expand Down

0 comments on commit 1c2cd40

Please sign in to comment.