containerd/containerd · warning · plugin.ErrSkipPlugin

ErrSkipPlugin

ErrSkipPlugin

Error message

failed to check mkfs.erofs availability: %v: %w

What it means

The erofs differ plugin's InitFn wraps plugin.ErrSkipPlugin with this message when erofsutils.SupportGenerateFromTar() returns an error while probing the mkfs.erofs binary. Returning ErrSkipPlugin tells the plugin framework to silently skip this differ rather than treat it as a fatal failure. It means the plugin could not determine whether mkfs.erofs supports tar input.

Source

Thrown at plugins/diff/erofs/plugin/plugin.go:58

	EnableTarIndex bool `toml:"enable_tar_index"`

	// EnableDmverity enables dm-verity formatting for EROFS layers
	// Linux only
	EnableDmverity bool `toml:"enable_dmverity"`
}

func init() {
	registry.Register(&plugin.Registration{
		Type: plugins.DiffPlugin,
		ID:   "erofs",
		Requires: []plugin.Type{
			plugins.MetadataPlugin,
		},
		Config: &Config{},
		InitFn: func(ic *plugin.InitContext) (any, error) {
			tarModeSupported, err := erofsutils.SupportGenerateFromTar()
			if err != nil {
				return nil, fmt.Errorf("failed to check mkfs.erofs availability: %v: %w", err, plugin.ErrSkipPlugin)
			}
			if !tarModeSupported {
				return nil, fmt.Errorf("mkfs.erofs does not support tar mode (--tar option), disabling erofs differ: %w", plugin.ErrSkipPlugin)
			}

			md, err := ic.GetSingle(plugins.MetadataPlugin)
			if err != nil {
				return nil, err
			}

			p := platforms.DefaultSpec()
			p.OS = "linux"
			ic.Meta.Platforms = append(ic.Meta.Platforms, p)
			// Select this differ for EROFS native images by default
			p.OSFeatures = []string{"erofs"}
			ic.Meta.Platforms = append(ic.Meta.Platforms, p)
			cs := md.(*metadata.DB).ContentStore()
			config := ic.Config.(*Config)

View on GitHub (pinned to 4246446a2b)

Solutions

  1. Install erofs-utils (provides mkfs.erofs) and ensure it is in PATH
  2. Verify mkfs.erofs runs and supports the --tar option (recent enough version)
  3. If erofs differ is not needed, ignore the skip — the framework continues without this plugin

Example fix

// before: plugin skipped at init
// after: ensure binary is present
# apt-get install -y erofs-utils
$ mkfs.erofs --help | grep -- --tar
Defensive patterns

Strategy: validation

Validate before calling

if _, err := exec.LookPath("mkfs.erofs"); err != nil {
    // erofs differ will be skipped at init
}

Try / catch

err := plugin.Init(...)
var skipErr plugin.ErrSkipPlugin
if errors.As(err, &skipErr) {
    log.Info("erofs differ skipped", "reason", err)
} else if err != nil {
    return err
}

Prevention

When it happens

Trigger: Plugin initialization of the erofs differ when the mkfs.erofs availability probe errors — typically because the mkfs.erofs binary is missing or fails to execute (e.g. exec.LookPath or version-probe failure).

Common situations: Containerd hosts without the erofs-utils package installed; a broken or non-executable mkfs.erofs in PATH; containers/images missing the required binary.

Understand the failure class

Background: "not installed", "pip install", "required for": how missing-dependency errors surface across open-source libraries — this error's family across 34 libraries.

Related errors


AI-assisted analysis of containerd/containerd@4246446a2b (2026-09-02). Data as JSON: /api/errors/08c286070ca53c29. Report an issue: GitHub.