{"record":{"id":"08c286070ca53c29","repo":"containerd/containerd","slug":"errskipplugin","errorCode":"ErrSkipPlugin","errorMessage":"failed to check mkfs.erofs availability: %v: %w","messagePattern":"failed to check mkfs\\.erofs availability: (.+?): %w","errorType":"exception","errorClass":"plugin.ErrSkipPlugin","httpStatus":null,"severity":"warning","filePath":"plugins/diff/erofs/plugin/plugin.go","lineNumber":58,"sourceCode":"\tEnableTarIndex bool `toml:\"enable_tar_index\"`\n\n\t// EnableDmverity enables dm-verity formatting for EROFS layers\n\t// Linux only\n\tEnableDmverity bool `toml:\"enable_dmverity\"`\n}\n\nfunc init() {\n\tregistry.Register(&plugin.Registration{\n\t\tType: plugins.DiffPlugin,\n\t\tID:   \"erofs\",\n\t\tRequires: []plugin.Type{\n\t\t\tplugins.MetadataPlugin,\n\t\t},\n\t\tConfig: &Config{},\n\t\tInitFn: func(ic *plugin.InitContext) (any, error) {\n\t\t\ttarModeSupported, err := erofsutils.SupportGenerateFromTar()\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"failed to check mkfs.erofs availability: %v: %w\", err, plugin.ErrSkipPlugin)\n\t\t\t}\n\t\t\tif !tarModeSupported {\n\t\t\t\treturn nil, fmt.Errorf(\"mkfs.erofs does not support tar mode (--tar option), disabling erofs differ: %w\", plugin.ErrSkipPlugin)\n\t\t\t}\n\n\t\t\tmd, err := ic.GetSingle(plugins.MetadataPlugin)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\tp := platforms.DefaultSpec()\n\t\t\tp.OS = \"linux\"\n\t\t\tic.Meta.Platforms = append(ic.Meta.Platforms, p)\n\t\t\t// Select this differ for EROFS native images by default\n\t\t\tp.OSFeatures = []string{\"erofs\"}\n\t\t\tic.Meta.Platforms = append(ic.Meta.Platforms, p)\n\t\t\tcs := md.(*metadata.DB).ContentStore()\n\t\t\tconfig := ic.Config.(*Config)","sourceCodeStart":40,"sourceCodeEnd":76,"githubUrl":"https://github.com/containerd/containerd/blob/4246446a2bf7d03837b0244118d858799393bd80/plugins/diff/erofs/plugin/plugin.go#L40-L76","documentation":"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.","triggerScenarios":"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).","commonSituations":"Containerd hosts without the erofs-utils package installed; a broken or non-executable mkfs.erofs in PATH; containers/images missing the required binary.","solutions":["Install erofs-utils (provides mkfs.erofs) and ensure it is in PATH","Verify mkfs.erofs runs and supports the --tar option (recent enough version)","If erofs differ is not needed, ignore the skip — the framework continues without this plugin"],"exampleFix":"// before: plugin skipped at init\n// after: ensure binary is present\n# apt-get install -y erofs-utils\n$ mkfs.erofs --help | grep -- --tar","handlingStrategy":"validation","validationCode":"if _, err := exec.LookPath(\"mkfs.erofs\"); err != nil {\n    // erofs differ will be skipped at init\n}","typeGuard":null,"tryCatchPattern":"err := plugin.Init(...)\nvar skipErr plugin.ErrSkipPlugin\nif errors.As(err, &skipErr) {\n    log.Info(\"erofs differ skipped\", \"reason\", err)\n} else if err != nil {\n    return err\n}","preventionTips":["Install erofs-utils on all hosts running containerd","Verify mkfs.erofs presence in health checks/startup scripts","Treat ErrSkipPlugin-wrapped init errors as degraded, not fatal"],"tags":["plugin-init","erofs","external-binary","plugin-skip"],"backgroundTag":"missing-dependency","analyzedSha":"4246446a2bf7d03837b0244118d858799393bd80","analyzedAt":"2026-09-02T00:14:43.053Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T06:17:21.866Z"}