Cleanup logrus imports

Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
This commit is contained in:
Maksym Pavlenko
2023-05-05 11:54:14 -07:00
parent 6020903f2c
commit 6f34da5f80
54 changed files with 237 additions and 248 deletions

View File

@@ -33,8 +33,6 @@ import (
"github.com/containerd/containerd/plugin"
"github.com/containerd/containerd/snapshots"
"github.com/containerd/containerd/snapshots/storage"
"github.com/sirupsen/logrus"
)
type snapshotter struct {
@@ -364,9 +362,9 @@ func (b *snapshotter) Remove(ctx context.Context, key string) (err error) {
// Attempt to restore source
if err1 := btrfs.SubvolSnapshot(source, removed, readonly); err1 != nil {
log.G(ctx).WithFields(log.Fields{
logrus.ErrorKey: err1,
"subvolume": source,
"renamed": removed,
"error": err1,
"subvolume": source,
"renamed": removed,
}).Error("failed to restore subvolume from renamed")
// Keep removed to allow for manual restore
removed = ""

View File

@@ -26,11 +26,11 @@ import (
"testing"
"time"
"github.com/containerd/containerd/log"
"github.com/containerd/containerd/mount"
"github.com/containerd/containerd/pkg/testutil"
"github.com/containerd/containerd/snapshots/devmapper/dmsetup"
"github.com/docker/go-units"
"github.com/sirupsen/logrus"
"github.com/stretchr/testify/assert"
exec "golang.org/x/sys/execabs"
)
@@ -57,7 +57,7 @@ const (
func TestPoolDevice(t *testing.T) {
testutil.RequiresRoot(t)
logrus.SetLevel(logrus.DebugLevel)
assert.NoError(t, log.SetLevel("debug"))
ctx := context.Background()
tempDir := t.TempDir()