-
Notifications
You must be signed in to change notification settings - Fork 267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow ImmediateBinding annotation when using populators #2765
Allow ImmediateBinding annotation when using populators #2765
Conversation
} | ||
if !globalHonorWaitForFirstConsumer { | ||
cc.AddAnnotation(pvc, cc.AnnImmediateBinding, "") | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe put this code in a function that can be shared all the other controllers?
4a30a96
to
88f1bda
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks good to me, do you plan to add more functional tests?
expectedPVCPhase = v1.ClaimPending | ||
} | ||
By(fmt.Sprintf("waiting for pvc to match phase %s", string(expectedPVCPhase))) | ||
err = utils.WaitForPersistentVolumeClaimPhase(f.K8sClient, pvc.Namespace, expectedPVCPhase, pvc.Name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get that these existing DataVolume tests are implicitly testing "immediate bind on populators". May be helpful to have a couple explicit tests as well
/hold |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mhenriks The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest-required |
/hold |
In case of using PVC with populators if the PVC has this annotation we prevent from waiting for it to be schedueled and we proceed with the process. When using datavolumes with populators in case the dv has the annotation it will be passed to the PVC. we prevent from being in pendingPopulation in case the created pvc has the annotaion. Plus when having honorWaitForFirstConsumer feature gate disabled we will put on the target PVC the immediateBind annotation. Now we allow to use populators when having the annotation the the feature gate disabled. Signed-off-by: Shelly Kagan <skagan@redhat.com>
Signed-off-by: Shelly Kagan <skagan@redhat.com>
8fde694
to
1d4d715
Compare
/unhold |
/retest |
pkg/controller/clone/planner.go
Outdated
if targetStorageClass.VolumeBindingMode != nil && | ||
*targetStorageClass.VolumeBindingMode == storagev1.VolumeBindingWaitForFirstConsumer && | ||
cc.ImmediateBindingRequested(args.TargetClaim) { | ||
args.Log.V(3).Info("Immediate binding requested, need to fall back to host assisted") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should not be necessary. The prep phase can bind pvc' to a random node.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you mean leave without the fallback and create the pvc' without waiting for selected node and it will just get bound with the pod of the clone? or need to implement something for that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah shouldn't have to make any changes to the planner
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Signed-off-by: Shelly Kagan <skagan@redhat.com>
/test pull-containerized-data-importer-e2e-istio |
/lgtm |
/test pull-cdi-apidocs |
/lgtm |
/test pull-containerized-data-importer-e2e-istio |
1 similar comment
/test pull-containerized-data-importer-e2e-istio |
I think this might be a real failure, if you look at the 1_dv logs file, you will see the DV in state |
Yeah I think this is the same one I am handling in #2784 |
Note the istio failure is exclusive to this PR: |
This annotations are used for the import/upload/clone pods to define netork configurations. Signed-off-by: Shelly Kagan <skagan@redhat.com>
/lgtm |
/hold |
/cherrypick release-v1.57 |
@ShellyKa13: new pull request created: #2793 In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
oh I was too slow with the hold, I thought there were some questions remaining |
@awels yeah :) never mind, I did the cherry pick so if we decide that its ok we can get the backport in faster and do the release. |
I find myself going back a lot to this function and I noticed some of the fallback reasons are outdated following: kubevirt#2765 kubevirt#2873 Signed-off-by: Alex Kalenyuk <akalenyu@redhat.com>
I find myself going back a lot to this function and I noticed some of the fallback reasons are outdated following: kubevirt#2765 kubevirt#2873 Signed-off-by: Alex Kalenyuk <akalenyu@redhat.com>
In case of using PVC with populators if the PVC has this annotation we prevent from waiting for it to be schedueled and we proceed with the process.
When using datavolumes with populators in case the dv has the annotation it will be passed to the PVC. we prevent from being in pendingPopulation in case the created pvc has the annotaion.
Plus when having honorWaitForFirstConsumer feature gate disabled we will put on the target PVC the immediateBinding annotation. Now we allow to use populators when having the annotation the the feature gate disabled.
What this PR does / why we need it:
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #
Special notes for your reviewer:
Integration of clone datavolumes with populators is in a PR: #2750
once merged will need to add to the datavolume clone controller the ImmediateBinding annotation in case of honorWaitForFirstConsumer feature gate disabled
Release note: