mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 02:50:30 +00:00
cephfs: remove unused Credentials argument from getVolumeRootPathCeph
remove unused Credentials argument from getVolumeRootPathCeph function. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
parent
b6f3ba885e
commit
e4713bc9ed
@ -132,7 +132,7 @@ func checkVolExists(ctx context.Context,
|
|||||||
return nil, fmt.Errorf("clone is not in complete state for %s", vid.FsSubvolName)
|
return nil, fmt.Errorf("clone is not in complete state for %s", vid.FsSubvolName)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
_, err = getVolumeRootPathCeph(ctx, volOptions, cr, volumeID(vid.FsSubvolName))
|
_, err = getVolumeRootPathCeph(ctx, volOptions, volumeID(vid.FsSubvolName))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if errors.Is(err, ErrVolumeNotFound) {
|
if errors.Is(err, ErrVolumeNotFound) {
|
||||||
err = j.UndoReservation(ctx, volOptions.MetadataPool,
|
err = j.UndoReservation(ctx, volOptions.MetadataPool,
|
||||||
|
@ -56,7 +56,7 @@ func getVolumeRootPathCephDeprecated(volID volumeID) string {
|
|||||||
return path.Join("/", "csi-volumes", string(volID))
|
return path.Join("/", "csi-volumes", string(volID))
|
||||||
}
|
}
|
||||||
|
|
||||||
func getVolumeRootPathCeph(ctx context.Context, volOptions *volumeOptions, cr *util.Credentials, volID volumeID) (string, error) {
|
func getVolumeRootPathCeph(ctx context.Context, volOptions *volumeOptions, volID volumeID) (string, error) {
|
||||||
fsa, err := volOptions.conn.GetFSAdmin()
|
fsa, err := volOptions.conn.GetFSAdmin()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
util.ErrorLog(ctx, "could not get FSAdmin err %s", err)
|
util.ErrorLog(ctx, "could not get FSAdmin err %s", err)
|
||||||
|
@ -347,7 +347,7 @@ func newVolumeOptionsFromVolID(ctx context.Context, volID string, volOpt, secret
|
|||||||
}
|
}
|
||||||
|
|
||||||
if errors.Is(err, ErrInvalidCommand) {
|
if errors.Is(err, ErrInvalidCommand) {
|
||||||
volOptions.RootPath, err = getVolumeRootPathCeph(ctx, &volOptions, cr, volumeID(vid.FsSubvolName))
|
volOptions.RootPath, err = getVolumeRootPathCeph(ctx, &volOptions, volumeID(vid.FsSubvolName))
|
||||||
}
|
}
|
||||||
|
|
||||||
return &volOptions, &vid, err
|
return &volOptions, &vid, err
|
||||||
|
Loading…
Reference in New Issue
Block a user