-
Notifications
You must be signed in to change notification settings - Fork 254
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
Annotate PVC with host-assisted clone fallback reason; add missing events #2814
Annotate PVC with host-assisted clone fallback reason; add missing events #2814
Conversation
pkg/controller/clone/planner.go
Outdated
Log logr.Logger | ||
TargetClaim *corev1.PersistentVolumeClaim | ||
DataSource *cdiv1.VolumeCloneSource | ||
FallbackReason string |
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 think it would be better to have ChooseStrategy
return a struct that contains the strategy and fallbackreason
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.
Something like
type ChooseStrategyResult struct{
Strategy cdiv1.CDICloneStrategy
FallbackReason *string
}
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.
yep, smells better
e17452b
to
c76b32c
Compare
c76b32c
to
df5cf66
Compare
@@ -48,6 +48,9 @@ const ( | |||
// AnnCloneError has the error string for error phase | |||
AnnCloneError = "cdi.kubevirt.io/cloneError" | |||
|
|||
// AnnCloneFallbackReason has the host-assisted clone fallback reason | |||
AnnCloneFallbackReason = "cdi.kubevirt.io/cloneFallbackReason" |
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.
DataVolume controller should add this annotation when using non-csi clone path
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.
no functional test possible?
// NoPopulator reports CDI populator is not used so we fallback to host-assisted cloning (reason) | ||
NoPopulator = "NoPopulator" | ||
// NoPopulatorMessage reports CDI populator is not used so we fallback to host-assisted cloning (message) | ||
NoPopulatorMessage = "CDI populator is not used" |
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 think something like "in tree storage class does not support snapshot/clone" would be better
5dad228
to
25f2fad
Compare
and add missing events Signed-off-by: Arnon Gilboa <agilboa@redhat.com>
when DV controller is using the non-CSI clone path Signed-off-by: Arnon Gilboa <agilboa@redhat.com>
Signed-off-by: Arnon Gilboa <agilboa@redhat.com>
25f2fad
to
99640a1
Compare
added |
@arnongilboa: The following test failed, say
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. I understand the commands that are listed here. |
/lgtm |
[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 |
@arnongilboa: #2814 failed to apply on top of branch "release-v1.56":
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. |
/cherrypick release-v1.57 |
@arnongilboa: new pull request created: #2824 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. |
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:
Release note: