Skip to content

Commit

Permalink
cephfs: remove extraneous creation of credentials
Browse files Browse the repository at this point in the history
`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 <[email protected]>
  • Loading branch information
black-dragon74 committed Nov 27, 2024
1 parent b6031da commit 8df87af
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions internal/cephfs/controllerserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 8df87af

Please sign in to comment.