Skip to content

Commit

Permalink
fix: pod crashed when creating init pod, new pod always fail because …
Browse files Browse the repository at this point in the history
…the init pod already exists

Signed-off-by: styshoo <[email protected]>
  • Loading branch information
styshoo committed Jan 21, 2025
1 parent 4d50d46 commit e30731e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/provisioner-localpv/app/helper_hostpath.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,8 @@ func (p *Provisioner) launchPod(ctx context.Context, config podConfig) (*corev1.
return nil, err
}
if podList.Items != nil && len(podList.Items) != 0 {
klog.Infof("existing helper podList length: %d", len(podList.Items))
klog.Infof("existing helper pod: %v", podList.Items[0])
klog.V(2).Infof("existing helper podList length: %d", len(podList.Items))
klog.V(2).Infof("existing helper pod: %s/%s", podList.Items[0].Namespace, podList.Items[0].Name)
return &podList.Items[0], nil
}

Expand Down

0 comments on commit e30731e

Please sign in to comment.