Skip to content

[24.0 backport] containerd: add c8d version and storage-driver to User-Agent#45684

Merged
thaJeztah merged 5 commits intomoby:24.0from
thaJeztah:24.0_backport_c8d_useragent_more_details
Jun 2, 2023
Merged

[24.0 backport] containerd: add c8d version and storage-driver to User-Agent#45684
thaJeztah merged 5 commits intomoby:24.0from
thaJeztah:24.0_backport_c8d_useragent_more_details

Conversation

@thaJeztah
Copy link
Member

dockerversion: add a basic unit-test

dockerversion: simplify escapeStr()

Use a const for the characters to escape, instead of implementing
this as a generic escaping function.

dockerversion: remove insertUpstreamUserAgent()

It was not really "inserting" anything, just formatting and appending.
Simplify this by changing this in to a getUpstreamUserAgent() function
which returns the upstream User-Agent (if any) into a UpstreamClient().

dockerversion: DockerUserAgent(): allow custom versions to be passed

Allow additional metadata to be passed as part of the generated User-Agent.

containerd: add c8d version and storage-driver to User-Agent

With this patch, the user-agent has information about the containerd-client
version and the storage-driver that's used when using the containerd-integration;

time="2023-06-01T11:27:07.959822887Z" level=info msg="listening on [::]:5000" go.version=go1.19.9 instance.id=53590f34-096a-4fd1-9c58-d3b8eb7e5092 service=registry version=2.8.2
...
172.18.0.1 - - [01/Jun/2023:11:30:12 +0000] "HEAD /v2/multifoo/blobs/sha256:c7ec7661263e5e597156f2281d97b160b91af56fa1fd2cc045061c7adac4babd HTTP/1.1" 404 157 "" "docker/dev go/go1.20.4 git-commit/8d67d0c1a8 kernel/5.15.49-linuxkit-pr os/linux arch/arm64 containerd-client/1.6.21+unknown storage-driver/overlayfs UpstreamClient(Docker-Client/24.0.2 \\(linux\\))"

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

thaJeztah added 5 commits June 2, 2023 11:41
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit eb9a539)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Use a const for the characters to escape, instead of implementing
this as a generic escaping function.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit ff40d2d)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
It was not really "inserting" anything, just formatting and appending.
Simplify this by changing this in to a `getUpstreamUserAgent()` function
which returns the upstream User-Agent (if any) into a `UpstreamClient()`.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 9a1f2e6)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Allow additional metadata to be passed as part of the generated User-Agent.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit a6da148)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
With this patch, the user-agent has information about the containerd-client
version and the storage-driver that's used when using the containerd-integration;

    time="2023-06-01T11:27:07.959822887Z" level=info msg="listening on [::]:5000" go.version=go1.19.9 instance.id=53590f34-096a-4fd1-9c58-d3b8eb7e5092 service=registry version=2.8.2
    ...
    172.18.0.1 - - [01/Jun/2023:11:30:12 +0000] "HEAD /v2/multifoo/blobs/sha256:c7ec7661263e5e597156f2281d97b160b91af56fa1fd2cc045061c7adac4babd HTTP/1.1" 404 157 "" "docker/dev go/go1.20.4 git-commit/8d67d0c1a8 kernel/5.15.49-linuxkit-pr os/linux arch/arm64 containerd-client/1.6.21+unknown storage-driver/overlayfs UpstreamClient(Docker-Client/24.0.2 \\(linux\\))"

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit d099e47)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah added area/distribution Image Distribution status/2-code-review kind/enhancement Enhancements are not bugs or new features but can improve usability or performance. containerd-integration Issues and PRs related to containerd integration labels Jun 2, 2023
@thaJeztah thaJeztah added this to the 24.0.3 milestone Jun 2, 2023
@thaJeztah thaJeztah requested review from rumpl and vvoland June 2, 2023 09:43
@thaJeztah
Copy link
Member Author

sigh.. devicemapper. Well at least it's gone from master

=== FAIL: daemon/graphdriver/devmapper TestDevmapperIncreaseLoopBackSize (0.25s)
time="2023-06-02T09:48:21Z" level=error msg="Udev sync is not supported, which will lead to data loss and unexpected behavior. Make sure you have a recent version of libdevmapper installed and are running a dynamic binary, or select a different storage driver. For more information, see https://docs.docker.com/go/storage-driver/" storage-driver=devicemapper
time="2023-06-02T09:48:21Z" level=warning msg="Usage of loopback devices is strongly discouraged for production use. Please use `--storage-opt dm.thinpooldev` or use `man dockerd` to refer to dm.thinpooldev section." storage-driver=devicemapper
time="2023-06-02T09:48:21Z" level=info msg="Creating filesystem xfs on device docker-0:74-17691-base, mkfs args: [/dev/mapper/docker-0:74-17691-base]" storage-driver=devicemapper
time="2023-06-02T09:48:21Z" level=info msg="Successfully created filesystem xfs on device docker-0:74-17691-base" storage-driver=devicemapper
time="2023-06-02T09:48:21Z" level=warning msg="unmountAndDeactivate: open /tmp/docker-graphtest-3464597164/devicemapper/mnt: no such file or directory" storage-driver=devicemapper
time="2023-06-02T09:48:21Z" level=error msg="Udev sync is not supported, which will lead to data loss and unexpected behavior. Make sure you have a recent version of libdevmapper installed and are running a dynamic binary, or select a different storage driver. For more information, see https://docs.docker.com/go/storage-driver/" storage-driver=devicemapper
time="2023-06-02T09:48:21Z" level=warning msg="Usage of loopback devices is strongly discouraged for production use. Please use `--storage-opt dm.thinpooldev` or use `man dockerd` to refer to dm.thinpooldev section." storage-driver=devicemapper
time="2023-06-02T09:48:21Z" level=warning msg="Base device already exists and has filesystem xfs on it. User specified filesystem  will be ignored." storage-driver=devicemapper
    devmapper_test.go:125: data or metadata loop back size is incorrect
time="2023-06-02T09:48:21Z" level=warning msg="unmountAndDeactivate: open /tmp/docker-graphtest-3464597164/devicemapper/mnt: no such file or directory" storage-driver=devicemapper

@thaJeztah thaJeztah merged commit 18278d3 into moby:24.0 Jun 2, 2023
@thaJeztah thaJeztah deleted the 24.0_backport_c8d_useragent_more_details branch June 2, 2023 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/distribution Image Distribution containerd-integration Issues and PRs related to containerd integration kind/enhancement Enhancements are not bugs or new features but can improve usability or performance. status/4-merge

Projects

Development

Successfully merging this pull request may close these issues.

4 participants