Commit graph

44843 commits

Author SHA1 Message Date
Sebastiaan van Stijn
478f023783
Merge pull request #44675 from thaJeztah/23.0_backport_vendor_containerd_1.6.14
[23.0 backport] vendor: github.com/containerd/containerd v1.6.14
2022-12-20 10:59:36 +01:00
Sebastiaan van Stijn
52c35488a0
Merge pull request #44672 from thaJeztah/23.0__update_containerd_1.6.14
[23.0] update containerd binary to v1.6.14
2022-12-20 10:54:39 +01:00
Sebastiaan van Stijn
9980e64341
vendor: github.com/containerd/containerd v1.6.14
No changes in vendored code, other than the version bump

full diff: https://github.com/containerd/containerd/compare/v1.6.13...v1.6.14

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 83d7ae76e8)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-19 22:46:07 +01:00
Sebastiaan van Stijn
5ebd78d5f8
update containerd binary to v1.6.14
Notable Updates

- Fix `memory.memsw.limit_in_bytes: no such file or directory` error in CRI plugin

full diff: https://github.com/containerd/containerd/compare/v1.6.13...v1.6.14

See the changelog for complete list of changes:
https://github.com/containerd/containerd/releases/tag/v1.6.14

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-19 18:38:04 +01:00
Sebastiaan van Stijn
4b78386a3a
Merge pull request #44655 from thaJeztah/23.0_containerd_binary_1.6.13
[23.0] update containerd binary to v1.6.13
2022-12-16 00:19:03 +01:00
Sebastiaan van Stijn
21c1faed45
Merge pull request #44659 from thaJeztah/23.0_backport_dockerfile_targetplatform
[23.0 backport] Dockerfile: use TARGETPLATFORM
2022-12-16 00:18:27 +01:00
CrazyMax
f6c2f20cee
Dockerfile: delve cross build with TARGETPLATFORM
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
(cherry picked from commit 19f3448c21)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-15 22:59:27 +01:00
CrazyMax
3d6908c79b
Dockerfile: swagger cross build with TARGETPLATFORM
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
(cherry picked from commit ed95e1a9ff)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-15 22:59:27 +01:00
CrazyMax
1dc34e889c
Dockerfile: containerutility cross build with TARGETPLATFORM
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
(cherry picked from commit 879b023706)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-15 22:59:27 +01:00
CrazyMax
effd7661df
Dockerfile: registry cross build with TARGETPLATFORM
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
(cherry picked from commit 8d9a357a67)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-15 22:59:27 +01:00
CrazyMax
f3e3266373
Dockerfile: dockercli cross build with TARGETPLATFORM
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
(cherry picked from commit a4bc2922c2)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-15 22:59:26 +01:00
CrazyMax
fd6316e631
Dockerfile: rootlesskit cross build with TARGETPLATFORM
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
(cherry picked from commit 420591c4a2)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-15 22:59:26 +01:00
CrazyMax
fbe4db5be0
Dockerfile: tini cross build with TARGETPLATFORM
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
(cherry picked from commit f0307892ea)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-15 22:59:26 +01:00
CrazyMax
f9a356c7e9
Dockerfile: runc cross build with TARGETPLATFORM
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
(cherry picked from commit 5e19d7ec54)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-15 22:59:26 +01:00
Kevin Alvarez
6e7cc3b7e3
Dockerfile: containerd cross build with TARGETPLATFORM
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
(cherry picked from commit 81d704d15d)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-15 22:59:19 +01:00
CrazyMax
582b29f587
Dockerfile: DOCKER_STATIC arg
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
(cherry picked from commit b19c11621a)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-15 22:58:23 +01:00
CrazyMax
daa28fcf2d
Dockerfile: add dummy stage
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
(cherry picked from commit 69c9dfd6d5)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-15 22:58:23 +01:00
CrazyMax
4cab584a9c
Dockerfile: add cross compilation helper
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
(cherry picked from commit 6cba7d22e9)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-15 22:58:22 +01:00
Sebastiaan van Stijn
1cc21c1b81
Merge pull request #44658 from thaJeztah/23.0_backport_vendor_containerd_1.6.13
[23.0 backport] vendor: github.com/containerd/containerd v1.6.13
2022-12-15 22:36:15 +01:00
Sebastiaan van Stijn
0b12468116
vendor: github.com/containerd/containerd v1.6.13
full diff: https://github.com/containerd/containerd/compare/v1.6.12...v1.6.13

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 35cbdc9661)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-15 19:36:58 +01:00
Sebastiaan van Stijn
6570b654f4
vendor: github.com/Microsoft/hcsshim v0.9.6
full diff: https://github.com/Microsoft/hcsshim/compare/v0.9.5...v0.9.6

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 9300aca2a6)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-15 19:36:57 +01:00
Sebastiaan van Stijn
d8d11bca37
update containerd binary to v1.6.13
Notable Updates

- Update overlay snapshotter to check for tmpfs when evaluating usage of userxattr
- Update hcsschim to v0.9.6 to fix resource leak on exec
- Make swapping disabled with memory limit in CRI plugin
- Allow clients to remove created tasks with PID 0
- Fix concurrent map iteration and map write in CRI port forwarding
- Check for nil HugepageLimits to avoid panic in CRI plugin

See the changelog for complete list of changes:
https://github.com/containerd/containerd/releases/tag/v1.6.13

full diff: https://github.com/containerd/containerd/compare/v1.6.12...v1.6.13

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-15 19:26:40 +01:00
Sebastiaan van Stijn
0593c0600a
Merge pull request #44652 from thaJeztah/23.0_backport_bump_swarmkit
[23.0 backport] vendor: github.com/moby/swarmkit/v2 v2.0.0-20221215132206-0da442b2780f
2022-12-15 18:07:13 +01:00
Sebastiaan van Stijn
a72fb70eb0
vendor: github.com/moby/swarmkit/v2 v2.0.0-20221215132206-0da442b2780f
No changes in vendored code, but removes some indirect dependencies.

full diff: b17f02f0a0...0da442b278

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 0007490b21)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-15 14:29:03 +01:00
Sebastiaan van Stijn
1bb2792c76
Merge pull request #44626 from thaJeztah/23.0_backport_update_fluent_deps
[23.0 backport] vendor: update dependencies for fluentd
2022-12-15 10:55:29 +01:00
Sebastiaan van Stijn
ce27df7b3c
Merge pull request #44633 from corhere/backport-23.0/fix-44512
[23.0 Backport] Prevent containers from being included in List API before they are registered
2022-12-14 12:30:11 +01:00
Bjorn Neergaard
98cad005ca
Merge pull request #44631 from neersighted/23.0_vendor_improvements
[23.0 backport] vendor tooling improvements
2022-12-13 18:40:23 -07:00
Cory Snider
dca58c654a daemon: drop side effect from registerLinks()
(*Daemon).registerLinks() calling the WriteHostConfig() method of its
container argument is a vestigial behaviour. In the distant past,
registerLinks() would persist the container links in an SQLite database
and drop the link config from the container's persisted HostConfig. This
changed in Docker v1.10 (#16032) which migrated away from SQLite and
began using the link config in the container's HostConfig as the
persistent source of truth. registerLinks() no longer mutates the
HostConfig at all so persisting the HostConfig to disk falls outside of
its scope of responsibilities.

Signed-off-by: Cory Snider <csnider@mirantis.com>
(cherry picked from commit 388fe4aea8)
Signed-off-by: Cory Snider <csnider@mirantis.com>
2022-12-13 18:08:21 -05:00
Cory Snider
6149c333ff daemon: don't checkpoint container until registered
(*Container).CheckpointTo() upserts a snapshot of the container to the
daemon's in-memory ViewDB and also persists the snapshot to disk. It
does not register the live container object with the daemon's container
store, however. The ViewDB and container store are used as the source of
truth for different operations, so having a container registered in one
but not the other can result in inconsistencies. In particular, the List
Containers API uses the ViewDB as its source of truth and the Container
Inspect API uses the container store.

The (*Daemon).setHostConfig() method is called fairly early in the
process of creating a container, long before the container is registered
in the daemon's container store. Due to a rogue CheckpointTo() call
inside setHostConfig(), there is a window of time where a container can
be included in a List Containers API response but "not exist" according
to the Container Inspect API and similar endpoints which operate on a
particular container. Remove the rogue call so that the caller has full
control over when the container is checkpointed and update callers to
checkpoint explicitly. No changes to (*Daemon).create() are needed as it
checkpoints the fully-created container via (*Daemon).Register().

Fixes #44512.

Signed-off-by: Cory Snider <csnider@mirantis.com>
(cherry picked from commit 0141c6db81)
Signed-off-by: Cory Snider <csnider@mirantis.com>
2022-12-13 18:08:21 -05:00
Cory Snider
42bffae5ff daemon: fix GetContainer() returning (nil, nil)
GetContainer() would return (nil, nil) when looking up a container
if the container was inserted into the containersReplica ViewDB but not
the containers Store at the time of the lookup. Callers which reasonably
assume that the returned err == nil implies returned container != nil
would dereference a nil pointer and panic. Change GetContainer() so that
it always returns a container or an error.

Signed-off-by: Cory Snider <csnider@mirantis.com>
(cherry picked from commit 00157a42d3)
Signed-off-by: Cory Snider <csnider@mirantis.com>
2022-12-13 18:08:21 -05:00
Bjorn Neergaard
a6818fd4cb
hack: introduce validate/no-module
Moby is not a Go module; to prevent anyone from mistakenly trying to
convert it to one before we are ready, introduce a check (usable in CI
and locally) for a go.mod file.

This is preferable to trying to .gitignore the file as we can ensure
that a mistakenly created go.mod is surfaced by Git-based tooling and is
less likely to surprise a contributor.

Signed-off-by: Bjorn Neergaard <bneergaard@mirantis.com>
(cherry picked from commit 25c3421802)
Signed-off-by: Bjorn Neergaard <bneergaard@mirantis.com>
2022-12-13 14:42:07 -07:00
Bjorn Neergaard
45fe08c93c
hack: replace go-mod-prepare.sh with wrapper script
To make the local build environment more correct and consistent, we
should never leave an uncommitted go.mod in the tree; however, we need a
go.mod for certain commands to work properly. Use a wrapper script to
create and destroy the go.mod as needed instead of potentially changing
tooling behavior by leaving it.

If a go.mod already exists, this script will warn and call the wrapped
command with GO111MODULE=on.

Signed-off-by: Bjorn Neergaard <bneergaard@mirantis.com>
(cherry picked from commit a449f77774)
Signed-off-by: Bjorn Neergaard <bneergaard@mirantis.com>
2022-12-13 14:42:05 -07:00
Bjorn Neergaard
c508d13372
hack/go-mod-prepare.sh: find root robustly; make steps transparent
Signed-off-by: Bjorn Neergaard <bneergaard@mirantis.com>
(cherry picked from commit af8e955e8f)
Signed-off-by: Bjorn Neergaard <bneergaard@mirantis.com>
2022-12-13 14:41:28 -07:00
Bjorn Neergaard
036398f512
hack/validate/vendor: clean up license validation step
Signed-off-by: Bjorn Neergaard <bneergaard@mirantis.com>
(cherry picked from commit 9f004830a5)
Signed-off-by: Bjorn Neergaard <bneergaard@mirantis.com>
2022-12-13 14:41:27 -07:00
Bjorn Neergaard
a4957d2585
hack/validate/vendor: split tidy from vendor
Signed-off-by: Bjorn Neergaard <bneergaard@mirantis.com>
(cherry picked from commit dbd76848ca)
Signed-off-by: Bjorn Neergaard <bneergaard@mirantis.com>
2022-12-13 14:41:25 -07:00
Bjorn Neergaard
394eaa8495
hack/vendor.sh: allow running tidy & vendor separately
Signed-off-by: Bjorn Neergaard <bneergaard@mirantis.com>
(cherry picked from commit 72568286ab)
Signed-off-by: Bjorn Neergaard <bneergaard@mirantis.com>
2022-12-13 14:41:23 -07:00
Sebastiaan van Stijn
d80f235c47
vendor: github.com/tinylib/msgp v1.1.6
This is a dependency of github.com/fluent/fluent-logger-golang, which
currently does not provide a go.mod, but tests against the latest
versions of its dependencies.

Updating this dependency to the latest version.

Notable changes:

- all: implement omitempty
- fix: JSON encoder may produce invalid utf-8 when provided invalid utf-8 message pack string.
- added Unwrap method to errWrapped plus tests; switched travis to go 1.14
- CopyToJSON: fix bitSize for floats
- Add Reader/Writer constructors with custom buffer
- Add missing bin header functions
- msgp/unsafe: bring code in line with unsafe guidelines
- msgp/msgp: fix ReadMapKeyZC (fix "Fail to decode string encoded as bin type")

full diff: https://github.com/tinylib/msgp/compare/v1.1.0...v1.1.6

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 389dacd6e2)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-12 11:38:57 +01:00
Sebastiaan van Stijn
5ca9231b44
vendor: github.com/philhofer/fwd v1.1.2
This is an (indirect) dependency of github.com/fluent/fluent-logger-golang,
which currently does not provide a go.mod, but tests against the latest
versions of its dependencies.

Updating this dependency to the latest version.

full diff: https://github.com/philhofer/fwd/compare/v1.0.0...v1.1.2

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 24496fe097)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-12 11:36:24 +01:00
Tianon Gravi
abcb4c556c
Merge pull request #44616 from thaJeztah/23.0_backport_bump_golang_net
[23.0 backport] update dependencies
2022-12-09 13:06:42 -08:00
Sebastiaan van Stijn
47069ae18c
Merge pull request #44617 from thaJeztah/23.0_backport_images_errdefs
[23.0 backport] image/store: Use errdefs for errors
2022-12-09 21:31:25 +01:00
Paweł Gronowski
ffa2c0b517
image/store: Use errdefs for errors
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
(cherry picked from commit e214503789)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-09 00:17:57 +01:00
Sebastiaan van Stijn
c0c146fc82
Remove uses of deprecated go-digest.NewDigestFromHex, go-digest.Digest.Hex
Both of these were deprecated in 55f675811a,
but the format of the GoDoc comments didn't follow the correct format, which
caused them not being picked up by tools as "deprecated".

This patch updates uses in the codebase to use the alternatives.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 0f7c9cd27e)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-09 00:17:18 +01:00
Sebastiaan van Stijn
6295320d91
use consistent alias for gotest.tools/v3/assert/cmp
Make sure we use the same alias everywhere for easier finding,
and to prevent accidentally introducing duplicate imports with
different aliases for the same package.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit f6b695d2fb)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-09 00:15:26 +01:00
Sebastiaan van Stijn
1cc1395fae
vendor: golang.org/x/net v0.4.0
golang.org/x/net contains a fix for CVE-2022-41717, which was addressed
in stdlib in go1.19.4 and go1.18.9;

> net/http: limit canonical header cache by bytes, not entries
>
> An attacker can cause excessive memory growth in a Go server accepting
> HTTP/2 requests.
>
> HTTP/2 server connections contain a cache of HTTP header keys sent by
> the client. While the total number of entries in this cache is capped,
> an attacker sending very large keys can cause the server to allocate
> approximately 64 MiB per open connection.
>
> This issue is also fixed in golang.org/x/net/http2 v0.4.0,
> for users manually configuring HTTP/2.

full diff: https://github.com/golang/net/compare/v0.2.0...v0.4.0

other dependency updates (due to circular dependencies):

- golang.org/x/sys v0.3.0: https://github.com/golang/sys/compare/v0.2.0...v0.3.0
- golang.org/x/text v0.5.0: https://github.com/golang/text/compare/v0.4.0...v0.5.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 4bbc37687e)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-09 00:01:27 +01:00
Sebastiaan van Stijn
0163808dbe
vendor: github.com/prometheus/client_golang v1.14.0
full diff: https://github.com/prometheus/client_golang/compare/v1.13.0...v1.14.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit dc52e08bb5)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-09 00:01:16 +01:00
Sebastiaan van Stijn
9b62b83429
vendor: github.com/go-logr/logr v1.2.3
full diff: https://github.com/go-logr/logr/compare/v1.2.2...v1.2.3

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit b2fe29ba79)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-09 00:01:07 +01:00
Sebastiaan van Stijn
d5ffdeb76c
vendor: golang.org/x/crypto v0.2.0
- all: use math/bits.RotateLeft

full diff: https://github.com/golang/crypto/compare/v0.1.0...v0.2.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 7c1b7842c6)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-09 00:00:58 +01:00
Sebastiaan van Stijn
4da8dedaab
vendor: golang.org/x/net v0.2.0
- http2/hpack: build static table with go generate

full diff: https://github.com/golang/net/compare/v0.1.0...v0.2.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit efe17dbdb4)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-09 00:00:49 +01:00
Sebastiaan van Stijn
b14ffffffd
vendor: github.com/opencontainers/runc v1.1.3
no changes in vendored code

full diff: https://github.com/opencontainers/runc/compare/v1.1.2...v1.1.3

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 0588a83380)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-09 00:00:39 +01:00
Sebastiaan van Stijn
173df30ac5
vendor: github.com/klauspost/compress v1.15.12
full diff: https://github.com/klauspost/compress/compare/v1.15.9...v1.15.12

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 38adf7a694)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-09 00:00:31 +01:00