mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 11:00:25 +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>
This commit is contained in:
parent
b471cac6bd
commit
ded75eb099
@ -603,6 +603,10 @@ func (cs *ControllerServer) createVolumeFromSnapshot(
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return status.Errorf(codes.Internal, "failed to mark %q thick-provisioned: %s", rbdVol, err)
|
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 {
|
} else {
|
||||||
// create clone image and delete snapshot
|
// create clone image and delete snapshot
|
||||||
err = rbdVol.cloneRbdImageFromSnapshot(ctx, rbdSnap, parentVol)
|
err = rbdVol.cloneRbdImageFromSnapshot(ctx, rbdSnap, parentVol)
|
||||||
|
Loading…
Reference in New Issue
Block a user