From 2801f153d200b8e31d41aafa3254fe98ebde6842 Mon Sep 17 00:00:00 2001 From: Niraj Yadav Date: Wed, 27 Nov 2024 15:33:07 +0530 Subject: [PATCH] cephfs: remove extraneous creation of credentials `ControllerExpandVolume` creates the credentials from secrets but never actually uses it for anything. The secrets map is passed on to `NewVolumeOptionsFromVolID` which does the same check again. This patch removes the extraneous step. Signed-off-by: Niraj Yadav --- internal/cephfs/controllerserver.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/internal/cephfs/controllerserver.go b/internal/cephfs/controllerserver.go index f41537b57..1ab1ff4fc 100644 --- a/internal/cephfs/controllerserver.go +++ b/internal/cephfs/controllerserver.go @@ -717,12 +717,6 @@ func (cs *ControllerServer) ControllerExpandVolume( } defer cs.OperationLocks.ReleaseExpandLock(volID) - cr, err := util.NewAdminCredentials(secret) - if err != nil { - return nil, status.Error(codes.InvalidArgument, err.Error()) - } - defer cr.DeleteCredentials() - volOptions, volIdentifier, err := store.NewVolumeOptionsFromVolID(ctx, volID, nil, secret, cs.ClusterName, cs.SetMetadata) if err != nil {