mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 02:50:30 +00:00
rbd: fix vol.VolID in cloneFromSnapshot()
Volume generated from snap using genrateVolFromSnap already copies volume ID correctly, therefore removing `vol.VolID = rbdVol.VolID` which wrongly copies parent Volume ID instead leading to error from copyEncryption() on parent and clone volume ID being equal. Signed-off-by: Rakshith R <rar@redhat.com>
This commit is contained in:
parent
bb60173a98
commit
08728b631b
@ -1034,8 +1034,6 @@ func cloneFromSnapshot(
|
|||||||
defer vol.Destroy()
|
defer vol.Destroy()
|
||||||
|
|
||||||
if rbdVol.isEncrypted() {
|
if rbdVol.isEncrypted() {
|
||||||
// FIXME: vol.VolID should be different from rbdVol.VolID
|
|
||||||
vol.VolID = rbdVol.VolID
|
|
||||||
err = rbdVol.copyEncryptionConfig(&vol.rbdImage)
|
err = rbdVol.copyEncryptionConfig(&vol.rbdImage)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, status.Error(codes.Internal, err.Error())
|
return nil, status.Error(codes.Internal, err.Error())
|
||||||
|
Loading…
Reference in New Issue
Block a user