mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-01 11:26:41 +00:00
rbd: copyEncryptionConfig for thickProvisioned snap restore too
This commit adds bugfix to copy encryption passphrase for thick provisioned PVC restored from snapshot. Signed-off-by: Rakshith R <rar@redhat.com> (cherry picked from commit ded75eb09954c2a04b9fb45993d5ff3d23b1c457)
This commit is contained in:
parent
15c2df0c39
commit
711fbbfdcc
@ -602,6 +602,10 @@ func (cs *ControllerServer) createVolumeFromSnapshot(
|
||||
if err != nil {
|
||||
return status.Errorf(codes.Internal, "failed to mark %q thick-provisioned: %s", rbdVol, err)
|
||||
}
|
||||
err = parentVol.copyEncryptionConfig(&rbdVol.rbdImage, true)
|
||||
if err != nil {
|
||||
return status.Errorf(codes.Internal, err.Error())
|
||||
}
|
||||
} else {
|
||||
// create clone image and delete snapshot
|
||||
err = rbdVol.cloneRbdImageFromSnapshot(ctx, rbdSnap, parentVol)
|
||||
|
Loading…
x
Reference in New Issue
Block a user