From 992d257530ee9b3d70ad8bd183da26294069fd4c Mon Sep 17 00:00:00 2001 From: Madhu Rajanna Date: Tue, 25 Jan 2022 14:33:37 +0530 Subject: [PATCH] cephfs: fix error logging in filesystem.go fix error message logging in filesystem.go Signed-off-by: Madhu Rajanna --- internal/cephfs/core/filesystem.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/cephfs/core/filesystem.go b/internal/cephfs/core/filesystem.go index 40e5d085f..3e2ae4a7a 100644 --- a/internal/cephfs/core/filesystem.go +++ b/internal/cephfs/core/filesystem.go @@ -52,14 +52,14 @@ func NewFileSystem(conn *util.ClusterConnection) FileSystem { func (f *fileSystem) GetFscID(ctx context.Context, fsName string) (int64, error) { fsa, err := f.conn.GetFSAdmin() if err != nil { - log.ErrorLog(ctx, "could not get FSAdmin, can not fetch filesystem ID for %s:", fsName, err) + log.ErrorLog(ctx, "could not get FSAdmin, can not fetch filesystem ID for %s: %s", fsName, err) return 0, err } volumes, err := fsa.EnumerateVolumes() if err != nil { - log.ErrorLog(ctx, "could not list volumes, can not fetch filesystem ID for %s:", fsName, err) + log.ErrorLog(ctx, "could not list volumes, can not fetch filesystem ID for %s: %s", fsName, err) return 0, err } @@ -79,14 +79,14 @@ func (f *fileSystem) GetFscID(ctx context.Context, fsName string) (int64, error) func (f *fileSystem) GetMetadataPool(ctx context.Context, fsName string) (string, error) { fsa, err := f.conn.GetFSAdmin() if err != nil { - log.ErrorLog(ctx, "could not get FSAdmin, can not fetch metadata pool for %s:", fsName, err) + log.ErrorLog(ctx, "could not get FSAdmin, can not fetch metadata pool for %s: %s", fsName, err) return "", err } fsPoolInfos, err := fsa.ListFileSystems() if err != nil { - log.ErrorLog(ctx, "could not list filesystems, can not fetch metadata pool for %s:", fsName, err) + log.ErrorLog(ctx, "could not list filesystems, can not fetch metadata pool for %s: %s", fsName, err) return "", err } @@ -104,14 +104,14 @@ func (f *fileSystem) GetMetadataPool(ctx context.Context, fsName string) (string func (f *fileSystem) GetFsName(ctx context.Context, fscID int64) (string, error) { fsa, err := f.conn.GetFSAdmin() if err != nil { - log.ErrorLog(ctx, "could not get FSAdmin, can not fetch filesystem name for ID %d:", fscID, err) + log.ErrorLog(ctx, "could not get FSAdmin, can not fetch filesystem name for ID %d: %s", fscID, err) return "", err } volumes, err := fsa.EnumerateVolumes() if err != nil { - log.ErrorLog(ctx, "could not list volumes, can not fetch filesystem name for ID %d:", fscID, err) + log.ErrorLog(ctx, "could not list volumes, can not fetch filesystem name for ID %d: %s", fscID, err) return "", err }