fix(vd): vdsnapshot without size annotation#2458
Open
danilrwx wants to merge 3 commits into
Open
Conversation
Signed-off-by: Daniil Antoshin <daniil.antoshin@flant.com>
Signed-off-by: Daniil Antoshin <daniil.antoshin@flant.com>
Signed-off-by: Daniil Antoshin <daniil.antoshin@flant.com>
f9a247b to
d0725f1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Handle legacy VirtualDiskSnapshot restores for NFS snapshots that do not have the
virtualization.deckhouse.io/vd-original-sizeannotation.When a VirtualDisk is restored from such a snapshot and the source StorageClass provisioner is
nfs.csi.k8s.io, the controller no longer falls back toVolumeSnapshot.status.restoreSizesilently. Instead, it stops provisioning and waits for the user to specifyspec.persistentVolumeClaim.sizeexplicitly.The change adds:
SnapshotSizeFallbackcondition on VirtualDisk;DataSourceImportFallbackwarning event;Why do we need it, and what problem does it solve?
Legacy NFS snapshots may not contain the original requested VirtualDisk size annotation. Falling back to
VolumeSnapshot.status.restoreSizecan create a PVC with an unexpected size.For NFS snapshots without the annotation, the controller now makes the situation explicit and requires the user to provide the desired disk size before provisioning continues.
What is the expected result?
vd-original-sizeannotation.nfs.csi.k8s.ioandspec.persistentVolumeClaim.sizeis not set, verify that:Pending;Ready=FalsewithProvisioningNotStartedreason;SnapshotSizeFallback=TruewithLegacyNFSVolumeSnapshotreason;DataSourceImportFallbackwarning event is emitted.spec.persistentVolumeClaim.sizeand verify that provisioning continues.Checklist
Changelog entries