Skip to content

Commit

Permalink
expand upon kubevirt#2721
Browse files Browse the repository at this point in the history
Need to replace requeue bool with requeue duration

Signed-off-by: Michael Henriksen <mhenriks@redhat.com>
  • Loading branch information
mhenriks committed May 28, 2023
1 parent fae6535 commit 45c830a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/controller/datavolume/pvc-clone-controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const (
CsiClone
)

const sourceInUseRequeueSeconds = time.Duration(5 * time.Second)
const sourceInUseRequeueDuration = time.Duration(5 * time.Second)

const pvcCloneControllerName = "datavolume-pvc-clone-controller"

Expand Down Expand Up @@ -320,7 +320,7 @@ func (r *PvcCloneReconciler) syncClone(log logr.Logger, req reconcile.Request) (
if syncRes.result == nil {
syncRes.result = &reconcile.Result{}
}
syncRes.result.RequeueAfter = sourceInUseRequeueSeconds
syncRes.result.RequeueAfter = sourceInUseRequeueDuration
return syncRes,
r.syncCloneStatusPhase(&syncRes, cdiv1.CloneScheduled, nil)
}
Expand Down Expand Up @@ -524,7 +524,7 @@ func (r *PvcCloneReconciler) reconcileCsiClonePvc(log logr.Logger,
if readyToClone, err := r.isSourceReadyToClone(datavolume, CsiClone); err != nil {
return reconcile.Result{}, err
} else if !readyToClone {
return reconcile.Result{Requeue: true},
return reconcile.Result{RequeueAfter: sourceInUseRequeueDuration},
r.syncCloneStatusPhase(syncRes, cdiv1.CloneScheduled, nil)
}

Expand Down Expand Up @@ -625,7 +625,7 @@ func (r *PvcCloneReconciler) reconcileSmartClonePvc(log logr.Logger,
if readyToClone, err := r.isSourceReadyToClone(datavolume, SmartClone); err != nil {
return reconcile.Result{}, err
} else if !readyToClone {
return reconcile.Result{Requeue: true},
return reconcile.Result{RequeueAfter: sourceInUseRequeueDuration},
r.syncCloneStatusPhase(syncState, cdiv1.CloneScheduled, nil)
}

Expand Down

0 comments on commit 45c830a

Please sign in to comment.