Commit graph

48953 commits

Author SHA1 Message Date
Djordje Lukic
388ecf65bc
c8d: Send push metrics to prom
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2024-03-13 15:03:42 +01:00
Djordje Lukic
bb3ab1edb7
c8d: Send pull metrics to prom
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2024-03-13 15:03:42 +01:00
Djordje Lukic
da245cab15
c8d: Send history metrics to prometheus
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2024-03-13 15:03:42 +01:00
Djordje Lukic
1cfd763214
c8d: Send image delete metrics to prometheus
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2024-03-13 15:03:42 +01:00
Djordje Lukic
0ce714a085
images: Export the image actions prometheus counter
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2024-03-13 15:03:36 +01:00
Paweł Gronowski
bcb4794eea
Be more explicit about non-TLS TCP access deprecation
Turn warnings into a deprecation notice and highlight that it will
prevent daemon startup in future releases.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2024-03-13 14:22:10 +01:00
Paweł Gronowski
0d5ef431a1
docker-py: Temporarily skip test_commit and test_commit_with_changes
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2024-03-13 13:03:48 +01:00
Paweł Gronowski
03cddc62f4
api/image-inspect: Remove Container and ContainerConfig
Don't include these fields starting from API v1.45.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2024-03-13 13:02:29 +01:00
Akihiro Suda
825635a5bf
Merge pull request #47552 from thaJeztah/vendor_containerd_1.7.14
vendor: github.com/containerd/containerd v1.7.14
2024-03-13 11:57:52 +09:00
Sebastiaan van Stijn
ec19fd6fed
vendor: github.com/containerd/containerd v1.7.14
- full diff: https://github.com/containerd/containerd/compare/v1.7.13...v1.7.14
- release notes: https://github.com/containerd/containerd/releases/tag/v1.7.14

Welcome to the v1.7.14 release of containerd!

The fourteenth patch release for containerd 1.7 contains various fixes and updates.

Highlights

- Update builds to use go 1.21.8
- Fix various timing issues with docker pusher
- Register imagePullThroughput and count with MiB
- Move high volume event logs to Trace level

Container Runtime Interface (CRI)

- Handle pod transition states gracefully while listing pod stats

Runtime

- Update runc-shim to process exec exits before init

Dependency Changes

- github.com/containerd/nri v0.4.0 -> v0.6.0
- github.com/containerd/ttrpc v1.2.2 -> v1.2.3
- google.golang.org/genproto/googleapis/rpc 782d3b101e98 -> cbb8c96f2d6d

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-03-12 12:46:19 +01:00
Sebastiaan van Stijn
d19f6d4b6d
vendor: github.com/containerd/ttrpc v1.2.3
full diff: https://github.com/containerd/ttrpc/compare/v1.2.2..v1.2.3

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-03-12 12:37:44 +01:00
Sebastiaan van Stijn
b8165a9cd1
Merge pull request #47494 from vvoland/devcontainer-golang
devcontainer: Add Golang extension
2024-03-11 17:50:13 +01:00
Erik Sjölund
a6a445d86b set-up-git.md: clarify URL in git clone command
Fixes https://github.com/moby/moby/issues/47407

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2024-03-09 16:42:44 +01:00
Sebastiaan van Stijn
0fb845858d
Merge pull request #47505 from akerouanton/fix-TestBridgeICC-ipv6
inte/networking:  ping with -6 specified when needed
2024-03-08 18:33:46 +01:00
Paweł Gronowski
db2263749b
Merge pull request #47530 from vvoland/flaky-liverestore
volume: Don't decrement refcount below 0
2024-03-08 12:28:10 +01:00
Sebastiaan van Stijn
1abf17c779
Merge pull request #47512 from robmry/46329_internal_resolver_ipv6_upstream
Add IPv6 nameserver to the internal DNS's upstreams.
2024-03-07 21:21:12 +01:00
Paweł Gronowski
294fc9762e
volume: Don't decrement refcount below 0
With both rootless and live restore enabled, there's some race condition
which causes the container to be `Unmount`ed before the refcount is
restored.

This makes sure we don't underflow the refcount (uint64) when
decrementing it.

The root cause of this race condition still needs to be investigated and
fixed, but at least this unflakies the `TestLiveRestore`.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2024-03-07 20:42:20 +01:00
Paweł Gronowski
eef352b565
devcontainer: Use a separate devcontainer target
Use a separate `devcontainer` Dockerfile target, this allows to include
the `gopls` in the devcontainer so it doesn't have to be installed by
the Go vscode extension.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2024-03-07 20:39:56 +01:00
Paweł Gronowski
f4c696eef1
Merge pull request #47449 from vvoland/c8d-list-single
c8d/list: Add test and combine size
2024-03-07 18:49:19 +01:00
Albin Kerouanton
5a009cdd5b inte/networking: add isIPv6 flag
Make sure the `ping` command used by `TestBridgeICC` actually has
the `-6` flag when it runs IPv6 test cases. Without this flag,
IPv6 connectivity isn't tested properly.

Signed-off-by: Albin Kerouanton <albinker@gmail.com>
2024-03-07 17:55:53 +01:00
Paweł Gronowski
2f1a32e3e5
c8d/list: Skip images with non matching platform
Currently this won't have any real effect because the platform matcher
matches all platform and is only used for sorting.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2024-03-07 16:27:12 +01:00
Paweł Gronowski
72f1f82f28
c8d/list: Remove outdated TODO
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2024-03-07 16:27:10 +01:00
Paweł Gronowski
52a80b40e2
c8d/list: Extract imageSummary function
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2024-03-07 16:27:09 +01:00
Paweł Gronowski
288a14e264
c8d/list: Simplify "best" image selection
Don't save all present images,  inline the sorting into the loop
instead.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2024-03-07 16:27:07 +01:00
Paweł Gronowski
b37ced2551
c8d/list: Count containers by their manifest
Move containers counting out of `singlePlatformImage` and count them
based on the `ImageManifest` property.

(also remove ChainIDs calculation as they're no longer used)

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2024-03-07 16:26:53 +01:00
Paweł Gronowski
a535a65c4b
c8d/list: Combine size
Multi-platform images are coalesced into one entry now.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2024-03-07 16:25:32 +01:00
Paweł Gronowski
582de4bc3c
c8d/list: Add TestImageList
Add unit test for `Images` implementation.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2024-03-07 16:25:31 +01:00
Paweł Gronowski
a6e7e67d3a
specialimage: Return optional ocispec.Index
To ease accessing image descriptors in tests.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2024-03-07 16:25:30 +01:00
Paweł Gronowski
1b108bdfeb
daemon/c8d: Cache SnapshotService
Avoid fetching `SnapshotService` from client every time. Fetch it once
and then store when creating the image service.

This also allows to pass custom snapshotter implementation for unit
testing.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2024-03-07 16:25:29 +01:00
Paweł Gronowski
74e2f23e1a
daemon/c8d: Use i.images and i.content
Use `image.Store` and `content.Store` stored in the ImageService struct
instead of fetching it every time from containerd client.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2024-03-07 16:25:27 +01:00
Paweł Gronowski
e8496b1ee4
imageService: Extract common code from MakeImageCache
Both containerd and graphdriver image service use the same code to
create the cache - they only supply their own `cacheAdaptor` struct.

Extract the shared code to `cache.New`.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2024-03-07 15:39:42 +01:00
Paweł Gronowski
d66177591e
c8d/cache: Use the same cache logic as graphdrivers
Implement the cache adaptor for containerd image store and use the same
cache logic.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2024-03-07 14:58:06 +01:00
Paweł Gronowski
bf30fee58a
image/cache: Refactor backend specific code
Move image store backend specific code out of the cache code and move it
to a separate interface to allow using the same cache code with
containerd image store.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2024-03-07 14:58:04 +01:00
Paweł Gronowski
608d77d740
Merge pull request #47497 from robmry/resolvconf_fixes
Fix 'resolv.conf' parsing issues
2024-03-07 13:05:10 +01:00
Paweł Gronowski
66adfc729a
Merge pull request #47521 from robmry/no_ipv6_addr_when_ipv6_disabled
Don't configure IPv6 addr/gw when IPv6 disabled.
2024-03-07 12:57:27 +01:00
Sebastiaan van Stijn
ab4b5a4890
Merge pull request #47519 from thaJeztah/dupword
golangci-lint: enable dupword linter
2024-03-07 12:41:54 +01:00
Sebastiaan van Stijn
f5a5e3f203
golangci-lint: enable dupword linter
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-03-07 11:44:27 +01:00
Sebastiaan van Stijn
773f792b88
Merge pull request #47523 from tonistiigi/snapshot-lock-fix
builder-next: fix missing lock in ensurelayer
2024-03-07 11:17:25 +01:00
Sebastiaan van Stijn
4adc40ac40
fix duplicate words (dupwords)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-03-07 10:57:03 +01:00
Rob Murray
8921897e3b Ignore bad ndots in host resolv.conf
Rather than error out if the host's resolv.conf has a bad ndots option,
just ignore it. Still validate ndots supplied via '--dns-option' and
treat failure as an error.

Signed-off-by: Rob Murray <rob.murray@docker.com>
2024-03-07 09:27:34 +00:00
Tonis Tiigi
37545cc644
builder-next: fix missing lock in ensurelayer
When this was called concurrently from the moby image
exporter there could be a data race where a layer was
written to the refs map when it was already there.

In that case the reference count got mixed up and on
release only one of these layers was actually released.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2024-03-06 23:11:32 -08:00
Bjorn Neergaard
6c10086976
Merge pull request #47520 from vvoland/buildkit-v13-leaseutil
builder-next/export: Use leaseutil for descref lease
2024-03-06 11:55:02 -07:00
Rob Murray
ef5295cda4 Don't configure IPv6 addr/gw when IPv6 disabled.
When IPv6 is disabled in a container by, for example, using the --sysctl
option - an IPv6 address/gateway is still allocated. Don't attempt to
apply that config because doing so enables IPv6 on the interface.

Signed-off-by: Rob Murray <rob.murray@docker.com>
2024-03-06 18:32:31 +00:00
Paweł Gronowski
49b77753cb
builder-next/export: Use leaseutil for descref lease
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2024-03-06 17:47:37 +01:00
Paweł Gronowski
d91665a2ac
Merge pull request #47511 from vvoland/buildkit-v13.0
vendor: github.com/moby/buildkit v0.13.0
2024-03-06 17:41:55 +01:00
Sebastiaan van Stijn
4e53936f0a
Merge pull request #47509 from thirdkeyword/master
remove repetitive words
2024-03-06 13:52:16 +01:00
Sebastiaan van Stijn
cb8c8e9631
Merge pull request #47498 from Dzejrou/lower-perm-fix
daemon: overlay2: remove world writable permission from the lower file
2024-03-06 13:09:30 +01:00
Paweł Gronowski
c4fc6c3371
builder-next/executor: Replace removed network.Sample
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2024-03-06 12:02:12 +01:00
Paweł Gronowski
0f30791a0d
vendor: github.com/moby/buildkit v0.13.0
full diff: https://github.com/moby/buildkit/compare/v0.13.0-rc3...v0.13.0

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2024-03-06 11:54:43 +01:00
Rob Murray
4e8d9a4522 Add IPv6 nameserver to the internal DNS's upstreams.
When configuring the internal DNS resolver - rather than keep IPv6
nameservers read from the host's resolv.conf in the container's
resolv.conf, treat them like IPv4 addresses and use them as upstream
resolvers.

For IPv6 nameservers, if there's a zone identifier in the address or
the container itself doesn't have IPv6 support, mark the upstream
addresses for use in the host's network namespace.

Signed-off-by: Rob Murray <rob.murray@docker.com>
2024-03-06 10:47:18 +00:00