mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-10 00:10:20 +00:00
rbd: copyEncryptionConfig in doSnapshotClone()
Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
parent
fd5f4dbafd
commit
bea9d56117
@ -928,6 +928,16 @@ func (cs *ControllerServer) doSnapshotClone(ctx context.Context, parentVol *rbdV
|
|||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
if parentVol.isEncrypted() {
|
||||||
|
cryptErr := parentVol.copyEncryptionConfig(&cloneRbd.rbdImage)
|
||||||
|
if cryptErr != nil {
|
||||||
|
util.WarningLog(ctx, "failed copy encryption "+
|
||||||
|
"config for %q: %v", cloneRbd.String(), cryptErr)
|
||||||
|
return ready, nil, status.Errorf(codes.Internal,
|
||||||
|
err.Error())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
err = cloneRbd.createSnapshot(ctx, rbdSnap)
|
err = cloneRbd.createSnapshot(ctx, rbdSnap)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// update rbd image name for logging
|
// update rbd image name for logging
|
||||||
|
Loading…
Reference in New Issue
Block a user