cephfs: replace Errorf with ErrorLog in createVolume

replace Errorf with ErrorLog in createVolume
for context based logging.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna 2020-08-11 17:55:49 +05:30 committed by mergify[bot]
parent f3d9b8933b
commit a882c1194b

View File

@ -146,7 +146,7 @@ func createVolume(ctx context.Context, volOptions *volumeOptions, cr *util.Crede
"-n", cephEntityClientPrefix+cr.ID,
"--keyfile="+cr.KeyFile)
if err != nil {
klog.Errorf(util.Log(ctx, "failed to create subvolume group %s, for the vol %s(%s)"), volOptions.SubvolumeGroup, string(volID), err)
util.ErrorLog(ctx, "failed to create subvolume group %s, for the vol %s(%s)", volOptions.SubvolumeGroup, string(volID), err)
return err
}
util.DebugLog(ctx, "cephfs: created subvolume group %s", volOptions.SubvolumeGroup)
@ -178,7 +178,7 @@ func createVolume(ctx context.Context, volOptions *volumeOptions, cr *util.Crede
"ceph",
args[:]...)
if err != nil {
klog.Errorf(util.Log(ctx, "failed to create subvolume %s(%s) in fs %s"), string(volID), err, volOptions.FsName)
util.ErrorLog(ctx, "failed to create subvolume %s(%s) in fs %s", string(volID), err, volOptions.FsName)
return err
}