ceph / ceph-csi

CSI driver for Ceph
Apache License 2.0
1.2k stars 528 forks source link

Remove code for Protect/Unprotect snapshot in CephFS #4169

Closed Madhu-1 closed 8 months ago

Madhu-1 commented 9 months ago

Based on the supported ceph version, check the feasibility of removing the protect/unprotect code https://github.com/ceph/ceph-csi/blob/cba5402ac27eb0e732d09743bf3480d0ad5a9e1b/internal/cephfs/core/snapshot.go#L177-L244

Madhu-1 commented 9 months ago

https://github.com/ceph/ceph-csi/blob/cba5402ac27eb0e732d09743bf3480d0ad5a9e1b/internal/cephfs/controllerserver.go#L838-L843 This comment and its relavent code can also be removed

iPraveenParihar commented 9 months ago

I'll take a look at this.

iPraveenParihar commented 9 months ago

/assign

iPraveenParihar commented 9 months ago

From docs - https://docs.ceph.com/en/latest/cephfs/fs-volumes/#cloning-snapshots

Protecting snapshots prior to cloning was a prerequisite in the Nautilus release, and the commands to protect/unprotect snapshots were introduced for this purpose. This prerequisite, and hence the commands to protect/unprotect, is being deprecated and may be removed from a future release.

The commands being deprecated are:

ceph fs subvolume snapshot protect <vol_name> <subvol_name> <snap_name> [--group_name <subvol_group_name>]
ceph fs subvolume snapshot unprotect <vol_name> <subvol_name> <snap_name> [--group_name <subvol_group_name>]

Since, we have support >=Octopus we can remove the protect/unprotect code. @Madhu-1

Madhu-1 commented 9 months ago

Even Octopus is EOL, IMO we can remove the above code.