Skip to content

containerd-integration: set correct user-agent #44828

@thaJeztah

Description

@thaJeztah

Description

The containerd-integration currently uses containerd's user-agent (containerd/$VERSION) as user-agent. We should change the user-agent to match the pre-containerd integration user-agent;

  • include "upstream" user-agents
  • include information about the engine
  • TBD: is the containerd version relevant? It's the containerd client version that's currently included, not the containerd daemon version. Perhaps the client version should be considered an implementation detail (it's a build-time dependency / module used by the engine).
  • We should have something indicating that it's an engine with the containerd-integration enabled (to distinguish from "non-snapshotter" / "non-containerd-integration"

From a slack thread;

user-agent can be customised when using the containerd client code; https://github.com/containerd/containerd/blob/cf13b64bcb833ab5b5bbaa8b4ce75c6fd9556eed/remotes/docker/resolver.go#L144-L146

PRs and code related to "upstream" client (used for non-containerd integration);

For the non-containerd daemon, the user-agent looks like;

docker/23.0.0-rc.2 go/go1.19.4 git-commit/9fd3a43 kernel/5.15.0-50-generic os/linux arch/amd64 UpstreamClient(Docker-Client/23.0.0-rc.2 \x5C(linux\x5C))

Which includes;

  • version of the daemon,
  • go version
  • kernel version
  • platform

Version of the CLI (Client) is included in that as UpstreamClient;

UpstreamClient(Docker-Client/23.0.0-rc.2 \x5C(linux\x5C))

We can continue using the same approach, either;

  • include the docker daemon as an “UpstreamClient”, and containerd as client
  • although as containerd in this case is effectively the containerd client compiled into the docker engine, we could consider using just the docker engine version (but perhaps with an addition to the string to indicate “with containerd integration”)

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/distributionImage Distributionarea/imagesImage Distributioncontainerd-integrationIssues and PRs related to containerd integrationkind/enhancementEnhancements are not bugs or new features but can improve usability or performance.

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions