-
Notifications
You must be signed in to change notification settings - Fork 268
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
Random Storage Class Selection During Host-Assisted Snapshot Restore #3530
Comments
Hey, thanks for opening the issue!
We've faced this concern when designing the feature. The issue is the source PVC isn't available when cloning a snapshot, otherwise we would ofc just grab the storage class from that. We've also had a working assumption that the same provisioner is able to restore from snapshot regardless of the storage class permutation, so, basically, that it could handle anything thrown at it just to get through the restore, |
I totally missed that - my bad. What do you think about just using This issue could become common since we don't know what restrictions storage provisioners might have for their cloning/snapshotting. In my case, the storage class must be thin-provisioned. Giving users more control would be beneficial. Perhaps similar to the CDI config status field
Using an annotation like |
I like the annotation solution more. Introducing more APIs for the host assisted fallback side of this is just too much bloat to have users understand. If we go with the annotation, we could take over for our own snapshots and mark them. I really hoped the storage provisioner could just do whatever it takes to restore. The data anyway gets copied later byte for byte over the network to the target PVC. |
Agreed, manual configuration isn't ideal for a user. It's a just bit frustrating to see that while direct PVC snapshot restores work, DataVolume(being a abstaction over PVC) snapshot restores fail. We're constrained by the lack of standardization in how storage provisioners handle snapshot operations. Having a solution where we figure out what is the best storage class configuration and creating it, has many variables involved, and is a overkill for CDI to do. The best workaround IMO, making sure storage class still exists at the point of creation of DataVolume might just be using a annotation on DV. |
I was thinking more of an annotation on the snapshot object, wdyt? |
both are very similar, but dataVolume annotation gives little more control at point of restore , because in case of annotation on volume snapshot, by the time the user try to make a dv the storage class might be deleted and the user would have to reapply the annotation finding a suitable storage class. |
@akalenyu I am happy to make a PR to close this issue if you agree with the approach. Let me know |
Sounds good just want to poke at the use case some more. Why were you falling back to host assisted in your case? |
CDI expects to use populator only when storage class is CSI storage class. For this CDI checks the Smart clone is designed to be a subset of external populator feature . Please correct me if I am wrong on this. openebs mayastor doesn't have a A approach to solve this might be not check external populator annotation but actually listing/creating a |
What happened:
During host-assisted snapshot restore operations, CDI creates intermediate PVCs with randomly selected storage class (matching only the CSI driver), ignoring both the DataVolume's specified storage class and the source PVC's storage class. This leads to restore failures when an incompatible storage class is selected.
Error seen:
in the host-assisted pvc
What you expected to happen:
CDI should follow a predictable storage class selection priority during host-assisted snapshot restore:
How to reproduce it (as minimally and precisely as possible):
Steps to reproduce the behavior.
Create a snapshot from existing PVC:
Create DataVolume to restore from snapshot:
Observe intermediate PVC creation:
Shows storage class ms-ext4-3-replicas-local instead of the specified ms-xfs-snapshot-restore
Additional context:
The current implementation in getStorageClassCorrespondingToSnapClass only matches on CSI driver and takes the first match:
Suggested Changes:
Prioritized Storage Class Selection:
or
Have a way for the user to configure behaviour for intermediate pvc
Environment:
kubectl get deployments cdi-deployment -o yaml
):v1.60.3kubectl version
):Server: v1.22.17
Client: v1.31.0
uname -a
): N/AMultiple storage classes using same CSI driver
io.openebs.csi-mayastor
:The text was updated successfully, but these errors were encountered: