Skip to content

Commit

Permalink
fix(vd): handle nil importer pod (#649)
Browse files Browse the repository at this point in the history
The check was lost on nil.
The function thinks that there is already an importer under the cdi, but it is not there yet.

Signed-off-by: Isteb4k <[email protected]>
  • Loading branch information
Isteb4k authored Jan 22, 2025
1 parent 38db54e commit 9afb71f
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,10 @@ func (s DiskService) CheckProvisioning(ctx context.Context, pvc *corev1.Persiste
return fmt.Errorf("failed to fetch data volume provisioner %s: %w", podName, err)
}

if pod == nil {
return nil
}

scheduled, _ := conditions.GetPodCondition(corev1.PodScheduled, pod.Status.Conditions)
if scheduled.Status == corev1.ConditionFalse && scheduled.Reason == corev1.PodReasonUnschedulable {
return ErrDataVolumeProvisionerUnschedulable
Expand Down

0 comments on commit 9afb71f

Please sign in to comment.