mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-26 00:00:23 +00:00
cephfs: fix error logging in filesystem.go
fix error message logging in filesystem.go Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
parent
14c008c419
commit
992d257530
@ -52,14 +52,14 @@ func NewFileSystem(conn *util.ClusterConnection) FileSystem {
|
|||||||
func (f *fileSystem) GetFscID(ctx context.Context, fsName string) (int64, error) {
|
func (f *fileSystem) GetFscID(ctx context.Context, fsName string) (int64, error) {
|
||||||
fsa, err := f.conn.GetFSAdmin()
|
fsa, err := f.conn.GetFSAdmin()
|
||||||
if err != nil {
|
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
|
return 0, err
|
||||||
}
|
}
|
||||||
|
|
||||||
volumes, err := fsa.EnumerateVolumes()
|
volumes, err := fsa.EnumerateVolumes()
|
||||||
if err != nil {
|
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
|
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) {
|
func (f *fileSystem) GetMetadataPool(ctx context.Context, fsName string) (string, error) {
|
||||||
fsa, err := f.conn.GetFSAdmin()
|
fsa, err := f.conn.GetFSAdmin()
|
||||||
if err != nil {
|
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
|
return "", err
|
||||||
}
|
}
|
||||||
|
|
||||||
fsPoolInfos, err := fsa.ListFileSystems()
|
fsPoolInfos, err := fsa.ListFileSystems()
|
||||||
if err != nil {
|
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
|
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) {
|
func (f *fileSystem) GetFsName(ctx context.Context, fscID int64) (string, error) {
|
||||||
fsa, err := f.conn.GetFSAdmin()
|
fsa, err := f.conn.GetFSAdmin()
|
||||||
if err != nil {
|
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
|
return "", err
|
||||||
}
|
}
|
||||||
|
|
||||||
volumes, err := fsa.EnumerateVolumes()
|
volumes, err := fsa.EnumerateVolumes()
|
||||||
if err != nil {
|
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
|
return "", err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user