mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-30 10:10:21 +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>
(cherry picked from commit 08728b631b
)
This commit is contained in:
parent
1470af8316
commit
33509ca90a
@ -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