Skip to content

Commit 884094b

Browse files
cpuguy83dmcgowan
authored andcommitted
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 <[email protected]> (cherry picked from commit c56f54a) Signed-off-by: Derek McGowan <[email protected]>
1 parent 40012b6 commit 884094b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

snapshots/devmapper/plugin/plugin.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ package plugin
2020

2121
import (
2222
"errors"
23+
"fmt"
2324

2425
"github.com/containerd/containerd/platforms"
2526
"github.com/containerd/containerd/plugin"
@@ -40,7 +41,7 @@ func init() {
4041
}
4142

4243
if config.PoolName == "" {
43-
return nil, errors.New("devmapper not configured")
44+
return nil, fmt.Errorf("devmapper not configured: %w", plugin.ErrSkipPlugin)
4445
}
4546

4647
if config.RootPath == "" {

0 commit comments

Comments
 (0)