cephfs: drop credentials from createVolume()

The credentials are not used anymore, the volume object is already
connected to the cluster when createVolume() is called.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
Niels de Vos 2020-10-01 09:08:09 +02:00 committed by mergify[bot]
parent 8cba08189d
commit 66046e4312
2 changed files with 3 additions and 3 deletions

View File

@ -86,7 +86,7 @@ func (cs *ControllerServer) createBackingVolume(
return nil
}
if err = createVolume(ctx, volOptions, cr, volumeID(vID.FsSubvolName), volOptions.Size); err != nil {
if err = createVolume(ctx, volOptions, volumeID(vID.FsSubvolName), volOptions.Size); err != nil {
util.ErrorLog(ctx, "failed to create volume %s: %v", volOptions.RequestName, err)
return status.Error(codes.Internal, err.Error())
}

View File

@ -130,7 +130,7 @@ type localClusterState struct {
subVolumeGroupCreated bool
}
func createVolume(ctx context.Context, volOptions *volumeOptions, cr *util.Credentials, volID volumeID, bytesQuota int64) error {
func createVolume(ctx context.Context, volOptions *volumeOptions, volID volumeID, bytesQuota int64) error {
// verify if corresponding ClusterID key is present in the map,
// and if not, initialize with default values(false).
if _, keyPresent := clusterAdditionalInfo[volOptions.ClusterID]; !keyPresent {
@ -218,7 +218,7 @@ func resizeVolume(ctx context.Context, volOptions *volumeOptions, cr *util.Crede
}
}
clusterAdditionalInfo[volOptions.ClusterID].resizeSupported = false
return createVolume(ctx, volOptions, cr, volID, bytesQuota)
return createVolume(ctx, volOptions, volID, bytesQuota)
}
func purgeVolume(ctx context.Context, volID volumeID, cr *util.Credentials, volOptions *volumeOptions, force bool) error {