mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
cleanup: refactor functions to accept a context parameter
Signed-off-by: Praveen M <m.praveen@ibm.com>
This commit is contained in:
@ -77,7 +77,7 @@ func (cs *ControllerServer) createBackingVolume(
|
||||
&volOptions.SubVolume, volOptions.ClusterID, cs.ClusterName, cs.SetMetadata)
|
||||
|
||||
if sID != nil {
|
||||
err = parentVolOpt.CopyEncryptionConfig(volOptions, sID.SnapshotID, vID.VolumeID)
|
||||
err = parentVolOpt.CopyEncryptionConfig(ctx, volOptions, sID.SnapshotID, vID.VolumeID)
|
||||
if err != nil {
|
||||
return status.Error(codes.Internal, err.Error())
|
||||
}
|
||||
@ -86,7 +86,7 @@ func (cs *ControllerServer) createBackingVolume(
|
||||
}
|
||||
|
||||
if parentVolOpt != nil {
|
||||
err = parentVolOpt.CopyEncryptionConfig(volOptions, pvID.VolumeID, vID.VolumeID)
|
||||
err = parentVolOpt.CopyEncryptionConfig(ctx, volOptions, pvID.VolumeID, vID.VolumeID)
|
||||
if err != nil {
|
||||
return status.Error(codes.Internal, err.Error())
|
||||
}
|
||||
@ -596,7 +596,7 @@ func (cs *ControllerServer) cleanUpBackingVolume(
|
||||
// GetSecret enabled KMS the DEKs are stored by
|
||||
// fscrypt on the volume that is going to be deleted anyway.
|
||||
log.DebugLog(ctx, "going to remove DEK for integrated store %q (fscrypt)", volOptions.Encryption.GetID())
|
||||
if err := volOptions.Encryption.RemoveDEK(volID.VolumeID); err != nil {
|
||||
if err := volOptions.Encryption.RemoveDEK(ctx, volID.VolumeID); err != nil {
|
||||
log.WarningLog(ctx, "failed to clean the passphrase for volume %q (file encryption): %s",
|
||||
volOptions.VolID, err)
|
||||
}
|
||||
@ -907,7 +907,7 @@ func (cs *ControllerServer) CreateSnapshot(
|
||||
// Use same encryption KMS than source volume and copy the passphrase. The passphrase becomes
|
||||
// available under the snapshot id for CreateVolume to use this snap as a backing volume
|
||||
snapVolOptions := store.VolumeOptions{}
|
||||
err = parentVolOptions.CopyEncryptionConfig(&snapVolOptions, sourceVolID, sID.SnapshotID)
|
||||
err = parentVolOptions.CopyEncryptionConfig(ctx, &snapVolOptions, sourceVolID, sID.SnapshotID)
|
||||
if err != nil {
|
||||
return nil, status.Error(codes.Internal, err.Error())
|
||||
}
|
||||
|
Reference in New Issue
Block a user