-
Notifications
You must be signed in to change notification settings - Fork 374
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
VolumeGroupSnapshots - how to rebuild/restore a VolumeGroupSnapshot? #969
Comments
Some more context - I was testing with the CSI HostPath driver and the information is also not present in the individual snapshots, as Example volumesnapshot that was created by the volumegroupsnapshot:
|
This works as designed as we don't want each individual snapshot to be dynamically created. |
Makes sense, thanks - I think it does mean I don't currently have any reliable way of determining which snapshot goes with which original pvc when I'm trying to restore? |
Can you check VolumeGroupSnapshotContent?
cc @leonardoce |
We're using the same workaround @xing-yang is referring to in cloudnative-pg/cloudnative-pg#3345, the PR adding VolumeGroupSnapshot support in CloudNative-PG. We assume that |
Thanks for this info @leonardoce and @xing-yang . In my case I'm not developing a CSI driver, but looking at it from an end-user perspective. I think this is workable, assuming every CSI driver implementation is going to keep the A user currently would do this:
The end user has created the volumegroupsnapshot only working at the PVC level (as this is what they label). I think somewhere in the volumegroupsnapshot spec the information about which pvc is backed up to which volumesnapshot is needed since there will be no way of restoring the entire volumegroupsnapshot at once. |
- RS does all sorts of lookups to create PVS from the vol group snapshot that will hopefully not be necessary - see issue: kubernetes-csi/external-snapshotter#969 Signed-off-by: Tesshu Flower <tflower@redhat.com>
- RS does all sorts of lookups to create PVS from the vol group snapshot that will hopefully not be necessary - see issue: kubernetes-csi/external-snapshotter#969 Signed-off-by: Tesshu Flower <tflower@redhat.com>
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
/remove-lifecycle rotten |
@xing-yang we cannot assume the order unless it's enforced in the CSI SPEC, isn't it? because the csi driver is developed by someone and backup software's are developed by some others, adding a PVC identifier to the volume snapshot could also help maintain clarity and avoid any ambiguity. Should we add the PVC name as the annotation when creating the volumesnapshots? (we need to list all the PV and check the volumeHandle and add it, its a heavy operation where we need to list the PV and loop through each) |
That's a temporary workaround. I'm thinking about making a change in the VolumeGroupSnapshot APIs. |
Thank you @xing-yang |
This use the update API to set `persistentVolumeClaimRef` in `VolumeGroupSnapshot` and `persistentVolumeName` in `VolumeGroupSnapshotContent` to the corresponding objects. This makes restoring volumes from a VolumeGroupSnapshot easier. Related: kubernetes-csi#969
This use the update API to set `persistentVolumeClaimRef` in `VolumeGroupSnapshot` and `persistentVolumeName` in `VolumeGroupSnapshotContent` to the corresponding objects. This makes restoring volumes from a VolumeGroupSnapshot easier. Related: kubernetes-csi#969
This use the update API to set `persistentVolumeClaimRef` in `VolumeGroupSnapshot` and `persistentVolumeName` in `VolumeGroupSnapshotContent` to the corresponding objects. This makes restoring volumes from a VolumeGroupSnapshot easier. Related: kubernetes-csi#969
This use the update API to set `persistentVolumeClaimRef` in `VolumeGroupSnapshot` and `persistentVolumeName` in `VolumeGroupSnapshotContent` to the corresponding objects. This makes restoring volumes from a VolumeGroupSnapshot easier. Related: kubernetes-csi#969
This use the update API to set `persistentVolumeClaimRef` in `VolumeGroupSnapshot` and `persistentVolumeName` in `VolumeGroupSnapshotContent` to the corresponding objects. This makes restoring volumes from a VolumeGroupSnapshot easier. Related: kubernetes-csi#969
This use the update API to set `persistentVolumeClaimRef` in `VolumeGroupSnapshot` and `persistentVolumeName` in `VolumeGroupSnapshotContent` to the corresponding objects. This makes restoring volumes from a VolumeGroupSnapshot easier. Related: kubernetes-csi#969
This use the update API to set `persistentVolumeClaimRef` in `VolumeGroupSnapshot` and `persistentVolumeName` in `VolumeGroupSnapshotContent` to the corresponding objects. This makes restoring volumes from a VolumeGroupSnapshot easier. Related: kubernetes-csi#969
This use the update API to set `persistentVolumeClaimRef` in `VolumeGroupSnapshot` and `persistentVolumeName` in `VolumeGroupSnapshotContent` to the corresponding objects. This makes restoring volumes from a VolumeGroupSnapshot easier. Related: kubernetes-csi#969
@xing-yang both the PRs seems to have merged, shall we close this issue if resolved? |
I think this issue is addressed now, thanks @xing-yang and @leonardoce for your attention to this, it will make it much more usable! Using v8.0.1 of the external-snapshotter (and latest csi-driver-host-path, v1.13.0) the volumegroupsnapshot has the information to rebuild PVCs from snapshots. Here's the example volumegroupsnapshot I was able to create:
|
- RS does all sorts of lookups to create PVS from the vol group snapshot that will hopefully not be necessary - see issue: kubernetes-csi/external-snapshotter#969 Signed-off-by: Tesshu Flower <tflower@redhat.com>
What happened:
When creating a VolumeGroupSnapshot from multiple PVCs, it's a bit unclear how to do a restore.
It looks like you are required to individually restore each volumesnapshot in the group into a PVC - but is there an easy way to map each volumesnapshot back to the original PVC it was taken from?
The volumegroupsnapshot has status that lists
volumesnapshots
but doesn't provide information (as far as I can tell) linking them back to the original PVC.Example
volumegroupsnapshot
status:There is some information about the PVs in the volumegroupsnapshotcontent object, but again I'm not sure how to map this to the individual snapshots.
What you expected to happen:
In order to restore a volumegroupsnapshot I need to be able to restore each snapshot to the proper PVC.
How to reproduce it:
Anything else we need to know?:
Environment:
kubectl version
):uname -a
):The text was updated successfully, but these errors were encountered: