Skip to content

Using abstract unix socket makes namespace length short #3032

@linxiulei

Description

@linxiulei

Description

Current codes

l, err := net.Listen("unix", "\x00"+address)
are using abstract unix socket to connect shim and shim would generate its socket path as format of "/containerd-shim/$namespace/$container_id/shim.sock", $container_id regularly is length of 64 bytes, therefore the namespace is limited to 14 bytes, which is awfully short.

The limitation is due to one of socket apis handling only 106 bytes at most (buf 128). Should we consider to use regular unix socket and try to connect it with relative paths, even though abstract unix socket has a few advantages

Steps to reproduce the issue:

  1. bin/ctr -n veryllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll run -t docker.io/library/busybox:latest test3 /bin/sh

Describe the results you received:

ctr: "/containerd-shim/veryllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll/test3/shim.sock": unix socket path too long (> 106): unknown

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