mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 11:00:25 +00:00
journal: replace klog with util logger in omap.go
replace klog with util logger in omap.go Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
parent
7c9fee17af
commit
1a9cd23f64
@ -23,7 +23,6 @@ import (
|
|||||||
"github.com/ceph/ceph-csi/internal/util"
|
"github.com/ceph/ceph-csi/internal/util"
|
||||||
|
|
||||||
"github.com/ceph/go-ceph/rados"
|
"github.com/ceph/go-ceph/rados"
|
||||||
klog "k8s.io/klog/v2"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// listExcess is the number of false-positive key-value pairs we will
|
// listExcess is the number of false-positive key-value pairs we will
|
||||||
@ -63,8 +62,7 @@ func getOMapValues(
|
|||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if errors.Is(err, rados.ErrNotFound) {
|
if errors.Is(err, rados.ErrNotFound) {
|
||||||
klog.Errorf(
|
util.ErrorLog(ctx, "omap not found (pool=%q, namespace=%q, name=%q): %v",
|
||||||
util.Log(ctx, "omap not found (pool=%q, namespace=%q, name=%q): %v"),
|
|
||||||
poolName, namespace, oid, err)
|
poolName, namespace, oid, err)
|
||||||
return nil, util.JoinErrors(util.ErrKeyNotFound, err)
|
return nil, util.JoinErrors(util.ErrKeyNotFound, err)
|
||||||
}
|
}
|
||||||
@ -100,8 +98,7 @@ func removeMapKeys(
|
|||||||
util.DebugLog(ctx, "when removing omap keys, omap not found (pool=%q, namespace=%q, name=%q): %+v",
|
util.DebugLog(ctx, "when removing omap keys, omap not found (pool=%q, namespace=%q, name=%q): %+v",
|
||||||
poolName, namespace, oid, keys)
|
poolName, namespace, oid, keys)
|
||||||
} else {
|
} else {
|
||||||
klog.Errorf(
|
util.ErrorLog(ctx, "failed removing omap keys (pool=%q, namespace=%q, name=%q): %v",
|
||||||
util.Log(ctx, "failed removing omap keys (pool=%q, namespace=%q, name=%q): %v"),
|
|
||||||
poolName, namespace, oid, err)
|
poolName, namespace, oid, err)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@ -132,8 +129,7 @@ func setOMapKeys(
|
|||||||
}
|
}
|
||||||
err = ioctx.SetOmap(oid, bpairs)
|
err = ioctx.SetOmap(oid, bpairs)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
klog.Errorf(
|
util.ErrorLog(ctx, "failed setting omap keys (pool=%q, namespace=%q, name=%q, pairs=%+v): %v",
|
||||||
util.Log(ctx, "failed setting omap keys (pool=%q, namespace=%q, name=%q, pairs=%+v): %v"),
|
|
||||||
poolName, namespace, oid, pairs, err)
|
poolName, namespace, oid, pairs, err)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user