mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-22 14:20:19 +00:00
cephfs: replace Errorf with ErrorLog in purgeVolume
replace Errorf with ErrorLog in purgeVolume for context based logging Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
parent
5a1652e5e8
commit
fbe090065d
@ -23,8 +23,6 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/ceph/ceph-csi/internal/util"
|
||||
|
||||
klog "k8s.io/klog/v2"
|
||||
)
|
||||
|
||||
var (
|
||||
@ -253,7 +251,7 @@ func purgeVolume(ctx context.Context, volID volumeID, cr *util.Credentials, volO
|
||||
|
||||
err := execCommandErr(ctx, "ceph", arg...)
|
||||
if err != nil {
|
||||
klog.Errorf(util.Log(ctx, "failed to purge subvolume %s(%s) in fs %s"), string(volID), err, volOptions.FsName)
|
||||
util.ErrorLog(ctx, "failed to purge subvolume %s(%s) in fs %s", string(volID), err, volOptions.FsName)
|
||||
if strings.HasPrefix(err.Error(), ErrVolumeNotFound.Error()) {
|
||||
return util.JoinErrors(ErrVolumeNotFound, err)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user