From e91a59d2f948a1c81320d61f2e1a2b613a7f8183 Mon Sep 17 00:00:00 2001 From: Madhu Rajanna Date: Tue, 19 Feb 2019 12:17:40 +0530 Subject: [PATCH] RBD: Remove dead code during volume creation we are validating that volume name cannot be empty,removing this check as we are not going to hit this case Fixes: #204 Signed-off-by: Madhu Rajanna --- pkg/rbd/controllerserver.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkg/rbd/controllerserver.go b/pkg/rbd/controllerserver.go index 6b4e2a630..b1eddf29e 100644 --- a/pkg/rbd/controllerserver.go +++ b/pkg/rbd/controllerserver.go @@ -99,9 +99,6 @@ func parseVolCreateRequest(req *csi.CreateVolumeRequest) (*rbdVolume, error) { // Generating Volume Name and Volume ID, as according to CSI spec they MUST be different volName := req.GetName() uniqueID := uuid.NewUUID().String() - if len(volName) == 0 { - volName = rbdVol.Pool + "-dynamic-pvc-" + uniqueID - } rbdVol.VolName = volName volumeID := "csi-rbd-vol-" + uniqueID rbdVol.VolID = volumeID