From c56f54aa1ea89f3207e3effe1b5d50ed4e6f1908 Mon Sep 17 00:00:00 2001 From: Brian Goff Date: Mon, 27 Mar 2023 23:57:03 +0000 Subject: [PATCH] devmapper plugin: skip plugin when not configured This is not really an error in most cases as most people do not use devmapper, however this shows up as an error in the logs and in the plugin service when querying the plugins. Signed-off-by: Brian Goff --- snapshots/devmapper/plugin/plugin.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/snapshots/devmapper/plugin/plugin.go b/snapshots/devmapper/plugin/plugin.go index dec4b37f8..ae2aa7676 100644 --- a/snapshots/devmapper/plugin/plugin.go +++ b/snapshots/devmapper/plugin/plugin.go @@ -20,6 +20,7 @@ package plugin import ( "errors" + "fmt" "github.com/containerd/containerd/platforms" "github.com/containerd/containerd/plugin" @@ -40,7 +41,7 @@ func init() { } if config.PoolName == "" { - return nil, errors.New("devmapper not configured") + return nil, fmt.Errorf("devmapper not configured: %w", plugin.ErrSkipPlugin) } if config.RootPath == "" {