Skip to content

Allow ProxyPlugins to declare capabilities #10313

@Kern--

Description

@Kern--

What is the problem you're trying to solve

When running containers with user namespaces, containerd uses os.Lchown to apply ID mapping to the container rootfs by default:

return os.Lchown(path, u, g)

For fuse-based remote snapshotters like the SOCI snapshotter, the chown is extremely expensive. In my experience it's 10x more expensive than chown with the native overlay snapshotter (even with metacopy=on on the overlay mounts returned from the SOCI snapshotter).

There is an escape hatch here if the snapshotter has the capability to handle id mapping itself:

for _, capab := range capabs {
if capab == capaRemapIDs {
// Snapshotter supports ID remapping, we don't need to do anything.
return parent, nil
}
}

The problem is that there is no way to advertise capabilities on proxy plugins, so the SOCI snapshotter cannot handle ID mapping itself.

// ProxyPlugin provides a proxy plugin configuration
type ProxyPlugin struct {
Type string `toml:"type"`
Address string `toml:"address"`
Platform string `toml:"platform"`
Exports map[string]string `toml:"exports"`
}

Describe the solution you'd like

I would like the ProxyPlugin config to support capabilities that get passed to the plugin registration.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions