Skip to content

[v2.3.0-rc.0] containerd socket is not created with old config.toml #13316

@berkayoz

Description

@berkayoz

Description

Hey folks,
I'm observing this issue/behavior where the /run/containerd/containerd.sock grpc socket is not created by default when a old(e.g. version 2) config.toml is used. This regression seems to be introduced in rc.0, testing with beta.2 I can observe the socket is created as expected.

I suspect this is related to the version = 4 config migration flow where after migration the empty values are used in merge which ends up overriding default values.

Here is the example old configuration I utilize;

# test.toml
imports = ["/etc/containerd/conf.d/*.toml"]
oom_score = 0
version = 2

[cgroup]
  path = ""

[debug]
  address = ""
  gid = 0
  level = ""
  uid = 0

[grpc]
  gid = 0
  max_recv_message_size = 16777216
  max_send_message_size = 16777216
  uid = 0

[metrics]
  address = ""
  grpc_histogram = false

[plugins]

  [plugins."io.containerd.grpc.v1.cri"]
    enable_selinux = false
    enable_tls_streaming = false
    max_container_log_line_size = 16384
    sandbox_image = "registry:5000/pause:3.10.2"
    stats_collect_period = 10
    stream_server_address = "127.0.0.1"
    stream_server_port = "0"

    [plugins."io.containerd.grpc.v1.cri".cni]
      bin_dir = "/opt/cni/bin"
      conf_dir = "/etc/cni/net.d"

    [plugins."io.containerd.grpc.v1.cri".containerd]
      default_runtime_name = "runc"
      no_pivot = false

      [plugins."io.containerd.grpc.v1.cri".containerd.runtimes]

        [plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc]
          runtime_type = "io.containerd.runc.v2"

          [plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options]
            SystemdCgroup = true

    [plugins."io.containerd.grpc.v1.cri".registry]
      config_path = "/etc/containerd/hosts.d"

As for testing if we run containerd --config ./test.toml config dump , it returns the following;

  [plugins.'io.containerd.server.v1.grpc']
    address = ''
    uid = 0
    gid = 0
    max_recv_message_size = 16777216
    max_send_message_size = 16777216

We can observe the address is evaluated as empty.

containerd config default verifies that the default value is set normally;

  [plugins.'io.containerd.server.v1.grpc']
    address = '/run/containerd/containerd.sock'
    uid = 0
    gid = 0
    max_recv_message_size = 16777216
    max_send_message_size = 16777216

Additionally in the containerd logs following is observed;

WARN[2026-04-29T09:26:17.358618012Z] failed to load plugin                         error="grpc address cannot be empty: invalid argument" id=io.containerd.server.v1.grpc type=io.containerd.server.v1

Steps to reproduce the issue

  1. Run containerd with the given example old configuration
  2. Check under /run/containerd to verify socket is not created
  3. Check the logs to verify grpc plugin fails with the above error message

Describe the results you received and expected

The config migration should not end up overriding the default socket address if the old configuration has not specificed the address field.

What version of containerd are you using?

containerd github.com/containerd/containerd/v2 v2.3.0-rc.0 135a671

Any other relevant information

No response

Show configuration if it is related to CRI plugin.

No response

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

Status
Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions