From 08728b631b753ef44b7a4bd48d3eba383c497d35 Mon Sep 17 00:00:00 2001 From: Rakshith R Date: Fri, 9 Jul 2021 14:33:40 +0530 Subject: [PATCH] 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 --- internal/rbd/controllerserver.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/internal/rbd/controllerserver.go b/internal/rbd/controllerserver.go index cc3896ec4..6ec71d3c2 100644 --- a/internal/rbd/controllerserver.go +++ b/internal/rbd/controllerserver.go @@ -1034,8 +1034,6 @@ func cloneFromSnapshot( defer vol.Destroy() if rbdVol.isEncrypted() { - // FIXME: vol.VolID should be different from rbdVol.VolID - vol.VolID = rbdVol.VolID err = rbdVol.copyEncryptionConfig(&vol.rbdImage) if err != nil { return nil, status.Error(codes.Internal, err.Error())