mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-17 20:00:23 +00:00
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:
parent
8cba08189d
commit
66046e4312
@ -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())
|
||||
}
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user