mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 02:43:36 +00:00
rbd: set SnapshotGroupID on each Snapshot of a VolumeGroupSnapshot
Without the SnapshotGroupID in the Snapshot object, Kubernetes CSI does not know that the Snapshot belongs to a group. In that case, it allows the deletion of the Snapshot, which should be denied. Signed-off-by: Niels de Vos <ndevos@ibm.com>
This commit is contained in:
committed by
mergify[bot]
parent
ec1e7a4ee0
commit
cea8bf8110
@ -212,11 +212,6 @@ func (mgr *rbdManager) GetSnapshotByID(ctx context.Context, id string) (types.Sn
|
||||
}
|
||||
}
|
||||
|
||||
// FIXME: The snapshot will have RbdImageName set to the image that was
|
||||
// used as source. This is not correct for group snapshots images, and
|
||||
// need to be fixed. See rbdVolume.NewSnapshotByID() for more details.
|
||||
snapshot.RbdImageName = snapshot.RbdSnapName
|
||||
|
||||
return snapshot, nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user