-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
failed to restore volume with StorageClass, claim Selector is not supported #7946
Comments
Sounds like a faulty NFS driver if it can't handle user (or velero) added labelSelector. |
It seems very unlikely to me that something as large and common as csi nfs would be "faulty". |
This is done purposefully as/expected by Velero data mover restore workflow. If you don't see the binding happens, it means the data mover restore doesn't complete. |
@soostdijck can you link docs that indicate label selector cannot be added? |
Hi @Lyndon-Li and @kaovilai Thanks for the quick replies! I think there's one confusion about how we use the NFS driver. We do not back up the PV's, as we use a storage class that dynamically creates them when a PVC is added. This is where it goes wrong. The dynamic PV's cannot be created due to the selector added by Velero, resulting in the error "failed to restore volume with StorageClass, claim Selector is not supported". Here's an example of how we did it:
I hope this makes the issue a bit more clear? Regards, |
As I mentioned here, this is expected if you are running data mover restore. |
Velero automatically select PVC and PV to back up. Varying from backup methods, sometimes PV object is backed up, sometimes it is not. And for data mover backup you are using, PV object is NOT backed up, and PVC object is backed up. |
Velero does by default select everything. But we only include the PVC in the backup. I'm not sure what the impact will be if we try to restore a dynamically created PV. But what I would prefer to see is that a new PV is created by the NFS driver once a PVC is restored by Velero. |
This will happen if the Velero after data mover restore completes. During the restore process, a PV will be created by the NFS driver and finally bind to the restored PVC after the data is restored to the PV. Therefore, just check if you get any problem that the PVC is not restored successfully, just check if the DataDownload has completed successfully. |
That's exactly what I also expected to happen, but I get the "claim Selector is not supported" error instead. The DataDownload step is not even reached. I see a similar issue here, which is the next driver we needed to test with Velero :) |
This (only backing up/restoring the PVC, without the pod) doesn't relate to the provision method (dynamically or statically), but relates to the PVC's This is for PVC-only restore only, normal restores (PVCs with pod) doesn't have the problem. |
That makes perfect sense. We have the |
OK, then as the expected behavior, the PVC should be restored successfully. If it is not for your case, just share us the velero log bundle by running |
We have same issue using vSphere CSI driver csi.vsphere.vmware.com. |
@edhunter665 This doesn't look like the origin problem, so please open another issue and attach more details and the velero log bundle. |
We have faced a similar issue, Binding mode is set to Immediate too. apiVersion: storage.k8s.io/v1 Events: Normal ExternalProvisioning 10s (x6 over 70s) persistentvolume-controller waiting for a volume to be created, either by external provisioner "io.openebs.csi-mayastor" or manually created by system administrator |
I'm encountering the same issue as @datacore-tilangovan , with the difference being that we're using the HSPC CSI driver. Otherwise, the log output is the same and the volumes are never created. Our PVCs are created using I'm going to try creating an additional StorageClass for restores that sets volumeBindingMode to |
I was able to make this flow work, with the help of a small script. After switching from
Using this flow, I was able to successfully restore a backup that contained only PVCs, created using the CSI Snapshotter + data movement functionality. |
Though I don't have enough information to confirm, I think the failures mentioned in this issue are most likely caused by issue #7898.
The For the volume-only restore, Velero data mover restore at present only supports |
Thanks for the thorough explanation @Lyndon-Li ! Do you have a rough ETA on the v1.14.1 release with the fix? |
A tentative ETA is by the end of Aug. |
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days. If a Velero team member has requested log or more information, please provide the output of the shared commands. |
This issue was closed because it has been stalled for 14 days with no activity. |
What steps did you take and what happened:
We have a setup where the NFS CSI driver creates the PV's dynamically once the PVC's are created/restored. This is done by specifying the correct storage classes.
However, when Velero backs up the PVC's, it adds a selector that breaks the PV creation by the NFS driver:
What did you expect to happen:
We expect the restore to happen without Velero adding extra selectors that break the dynamic PV creation.
The output of the following commands will help us better understand what's going on:
Environment:
Velero helm chart 6.4.x, Velero version 1.13.2
Kubernetes version 1.27
Note, this is a duplicate of this issue on the helm chart, but I think it belongs here
The text was updated successfully, but these errors were encountered: