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 <niryadav@redhat.com>
This commit is contained in:
Niraj Yadav 2024-11-27 15:33:07 +05:30 committed by mergify[bot]
parent b6031dad48
commit 2801f153d2

View File

@ -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 {