Skip to content

Commit

Permalink
fix: wait for rook ceph migrator pod ready (#4571)
Browse files Browse the repository at this point in the history
  • Loading branch information
emosbaugh authored May 31, 2023
1 parent 16a9e42 commit e39cb05
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions pkg/rook/flexvolume.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,10 +252,13 @@ func waitForFlexMigratorPod(ctx context.Context, clientset kubernetes.Interface)
if len(pods.Items) == 0 {
return nil, errors.New("no pods found for rook-ceph-migrator deployment")
}
pod := pods.Items[0]
for _, pod := range pods.Items {
if k8sutil.IsPodReady(pod) {
return &pod, nil
}
}

err = k8sutil.WaitForPodReady(ctx, clientset, pod.Namespace, pod.Name)
return &pod, errors.Wrap(err, "wait for rook-ceph-migrator pod")
return nil, errors.New("no ready pods found for rook-ceph-migrator deployment")
}

func generateFlexMigratorPatch(fs filesys.FileSystem, opts FlexvolumeToCSIOpts) error {
Expand Down

0 comments on commit e39cb05

Please sign in to comment.