Skip to content

runc worker does not always report the correct list of platforms #5740

@fiam

Description

@fiam

Contributing guidelines and issue reporting guide

Well-formed report checklist

  • I have found a bug that the documentation does not mention anything about my problem
  • I have found a bug that there are no open or closed issues that are related to my problem
  • I have provided version/information about my environment and done my best to provide a reproducer

Description of bug

Bug description

In architectures that support multiple platforms, runc worker might report only the default one. For example, on an arm64 host where the arm checks passes, it reports:

$ ./hacks/grpccurl.sh localhost:443 moby.buildkit.v1.Control.ListWorkers
{
  "record": [
    {
      "ID": "vao24g7dghf8k72gi74ljmarv",
      "Labels": {
        "org.mobyproject.buildkit.worker.executor": "oci",
        "org.mobyproject.buildkit.worker.hostname": "ip-10-130-30-112",
        "org.mobyproject.buildkit.worker.network": "host",
        "org.mobyproject.buildkit.worker.oci.process-mode": "sandbox",
        "org.mobyproject.buildkit.worker.selinux.enabled": "false",
        "org.mobyproject.buildkit.worker.snapshotter": "overlayfs"
      },
      "platforms": [
        {
          "Architecture": "arm64",
          "OS": "linux"
        }
      ],
      "GCPolicy": [
        {
          "all": true,
          "reservedSpace": "20000000000"
        }
      ],
      "BuildkitVersion": {
        "package": "github.com/moby/buildkit",
        "version": "v0.19.0",
        "revision": "49628b9df9b196db3371d745c64ac3d75283c4b4.m"
      }
    }
  ]
}

This should also include arm and arm/v6.

Reproduction

  1. Use an arm64 host
  2. Enable runc worker
  3. Launch BuildKit
  4. Call ListWorkers

Version information

v0.19.0

Additional information

This seems to happen because the runc worker initializes the list of supported platforms with just the default one. Later, when we call Worker.Platforms, the matcher for arm64 reports that it also includes arm and arm/v6 (which is not necessarily true), preventing them from being added to the list of platforms.

Metadata

Metadata

Assignees

Labels

Type

Projects

Status

Todo

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions