Commit graph

45617 commits

Author SHA1 Message Date
Sebastiaan van Stijn
a48f19157a
Merge pull request #45068 from vvoland/deprecate-none
api: Remove <none> in Repo(Tags|Digests) for >= 1.43
2023-02-28 23:34:32 +01:00
Paweł Gronowski
248745004a
api: Remove <none> in Repo(Tags|Digests) for >= 1.43
Deprecate `<none>:<none>` and `<none>@<none>` magic strings included in
`RepoTags` and `RepoDigests`.
Produce an empty arrays instead and leave the presentation of
untagged/dangling images up to the client.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2023-02-27 19:44:43 +01:00
Brian Goff
0021339b92
Merge pull request #45025 from corhere/oci-annotation-passthru 2023-02-24 16:27:11 +00:00
Cory Snider
0ffaa6c785 daemon: add annotations to container HostConfig
Allow clients to set annotations on a container which will applied to
the container's OCI spec.

Signed-off-by: Cory Snider <csnider@mirantis.com>
2023-02-23 18:59:00 -05:00
Bjorn Neergaard
2f0e308c7d
Merge pull request #45070 from corhere/libnet/fix-networkdb-test-panic
libnet/networkdb: fix nil-dereference panic in test
2023-02-23 15:22:31 -07:00
Bjorn Neergaard
a9f17a28db
Merge pull request #44840 from vvoland/c8d-list-dangling-upstream
c8d/list: Fix Repo(Digests|Tags) for untagged images
2023-02-23 14:25:03 -07:00
Cory Snider
88f6b637a0 libnet/networkdb: fix nil-dereference panic in test
Signed-off-by: Cory Snider <csnider@mirantis.com>
2023-02-23 14:31:48 -05:00
Bjorn Neergaard
855c684708
Merge pull request #44664 from corhere/embedded-resolver-fixes
libnetwork: improve embedded DNS resolver
2023-02-23 12:25:58 -07:00
Sebastiaan van Stijn
ca2fe6859f
Merge pull request #45019 from corhere/libnet/fix-ipam-flaky-test
libnetwork/ipam: fix racy, flaky unit test
2023-02-23 20:24:59 +01:00
Paweł Gronowski
f8791db4be
c8d/list: Fix Repo(Digests|Tags) for untagged images
Show dangling images in `docker image ls` output.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2023-02-23 19:54:21 +01:00
Bjorn Neergaard
89ac2061f5
Merge pull request #44620 from neersighted/go_1.20
Upgrade to Go 1.20.1
2023-02-22 15:37:53 -07:00
Cory Snider
cd779dae46 Upgrade to Go 1.20.1
Signed-off-by: Cory Snider <csnider@mirantis.com>
2023-02-22 16:38:01 -05:00
Bjorn Neergaard
d4e7a87b96 Upgrade to Go 1.20
Signed-off-by: Bjorn Neergaard <bneergaard@mirantis.com>
Co-authored-by: Cory Snider <csnider@mirantis.com>
Signed-off-by: Cory Snider <csnider@mirantis.com>
2023-02-22 16:37:59 -05:00
Bjorn Neergaard
10a7435ebb
Merge pull request #45063 from corhere/golangci-lint_v1.51.2
Upgrade to golangci-lint v1.51.2
2023-02-22 13:06:14 -07:00
Cory Snider
3606d6a7cd Upgrade to golangci-lint v1.51.2
Signed-off-by: Cory Snider <csnider@mirantis.com>
2023-02-22 14:17:30 -05:00
Brian Goff
73db49f8ef
Merge pull request #44003 from vvoland/invalidfilter 2023-02-22 16:24:47 +00:00
Paweł Gronowski
2f9e3cca3d
api: Move Repo(Digests|Tags) <none> fallback from daemon
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2023-02-22 17:08:45 +01:00
Sebastiaan van Stijn
432390c4c4
Merge pull request #45054 from neersighted/authors_regen
AUTHORS: regenerate
2023-02-22 13:24:31 +01:00
Sebastiaan van Stijn
99a65dc93e
Merge pull request #45055 from vvoland/c8d-tag-fix-createderr
c8d/tag: Don't create a separate error variable
2023-02-22 13:13:46 +01:00
Paweł Gronowski
8657c87c8c
c8d/tag: Don't create a separate error variable
Checking if the image creation failed due to IsAlreadyExists didn't use
the error from ImageService.Create.
Error from ImageService.Create was stored in a separate variable and
later IsAlreadyExists checked the standard `err` variable instead of the
`createErr`.
As there's no need to store the error in a separate variable - just
assign it to err variable and fix the check.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2023-02-22 10:09:23 +01:00
Bjorn Neergaard
9f6649b248
AUTHORS: regenerate
Signed-off-by: Bjorn Neergaard <bneergaard@mirantis.com>
2023-02-22 00:36:57 -07:00
Bjorn Neergaard
5c1d6c957b
Merge pull request #44810 from rumpl/containerd-lazy-snapshotters
c8d/pull: Add CRI-compatible annotation of pulled content
2023-02-21 16:30:35 -07:00
Brian Goff
68fe202f06
Merge pull request #45050 from lmbarros/close-reader
Close DecompressStream after layer is downloaded
2023-02-21 22:57:53 +00:00
Bjorn Neergaard
6c81e2ce3f
Merge pull request #45005 from corhere/fix-loopclosure-test-bugs
Fix loop-closure bugs in tests and shadowed bugs in distribution/xfer
2023-02-21 15:31:38 -07:00
Bjorn Neergaard
bc0392af66
Merge pull request #45047 from thaJeztah/update_buildkit_0.11.3
vendor: github.com/moby/buildkit v0.11.3
2023-02-21 15:01:27 -07:00
Bjorn Neergaard
e5008ced28
Merge pull request #45048 from my-git9/chore-httpcode
chore: use http constants to replace numbers
2023-02-21 14:58:14 -07:00
Cory Snider
c97db54e54
Merge pull request #45049 from corhere/containerd-fifo_v1.1
Upgrade containerd/fifo to v1.1.0
2023-02-21 14:46:14 -05:00
Cory Snider
50d7164978 docs/api: add v1.43 OpenAPI definitions
Signed-off-by: Cory Snider <csnider@mirantis.com>
2023-02-21 13:20:18 -05:00
Leandro Motta Barros
bb21e0f191 Close DecompressStream after layer is downloaded
Signed-off-by: Leandro Motta Barros <lmb@stackedboxes.org>
2023-02-21 15:03:19 -03:00
Cory Snider
d6c4e17411 Upgrade containerd/fifo to v1.1.0
Signed-off-by: Cory Snider <csnider@mirantis.com>
2023-02-21 12:29:46 -05:00
Bjorn Neergaard
782a369f92
c8d/pull: Add CRI-compatible annotation of pulled content
Co-authored-by: Paweł Gronowski <pawel.gronowski@docker.com>
Signed-off-by: Bjorn Neergaard <bneergaard@mirantis.com>
2023-02-21 08:35:52 -07:00
Bjorn Neergaard
a4a3efb75b
Merge pull request #44982 from neersighted/containerd_1.6.18
daemon: fully resolve `apparmor_parser` regression
2023-02-21 08:19:02 -07:00
xin.li
a770153af0 chore: use http constants to replace numbers
Signed-off-by: xin.li <xin.li@daocloud.io>
2023-02-21 23:02:56 +08:00
Sebastiaan van Stijn
9104cd5441
vendor: github.com/moby/buildkit v0.11.3
full diff: https://github.com/moby/buildkit/compare/49992f513921...v0.11.3

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-02-21 12:17:33 +01:00
Bjorn Neergaard
530974e724
Merge pull request #45028 from ahrtr/bump_bbolt_1.3.7_20230217
dependency: bump go.etcd.io/bbolt to v1.3.7
2023-02-20 11:30:40 -07:00
Bjorn Neergaard
a27953f716
Merge pull request #45023 from thaJeztah/update_containerd_binary_1.7.0-beta.4
update containerd binary to v1.7.0-beta.4
2023-02-20 11:30:16 -07:00
Benjamin Wang
4a886a3e8f dependency: bump go.etcd.io/bbolt to v1.3.7
Please refer to link below to get more detailed info on bbolt@v1.3.7,
- https://github.com/etcd-io/bbolt/blob/master/CHANGELOG/CHANGELOG-1.3.md#v1372023-01-31

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-02-17 16:51:15 +08:00
Sebastiaan van Stijn
e40c4c997e
update containerd binary to v1.7.0-beta.4
release notes: https://github.com/containerd/containerd/releases/tag/v1.7.0-beta.4
full diff: https://github.com/containerd/containerd/compare/v1.7.0-beta.3...v1.7.0-beta.4

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-02-17 01:28:29 +01:00
Sebastiaan van Stijn
c030f7f40d
Merge pull request #44999 from thaJeztah/bump_go_1.19.6
update to go1.19.6
2023-02-17 01:19:31 +01:00
Cory Snider
f8cfd3a61f libnetwork: devirtualize Resolver type
https://github.com/golang/go/wiki/CodeReviewComments#interfaces

Signed-off-by: Cory Snider <csnider@mirantis.com>
2023-02-16 19:05:59 -05:00
Cory Snider
faaa4fdf18 libnetwork: forward unknown PTR queries externally
PTR queries with domain names unknown to us are not necessarily invalid.
Act like a well-behaved middlebox and fall back to forwarding
externally, same as we do with the other query types.

Signed-off-by: Cory Snider <csnider@mirantis.com>
2023-02-16 19:05:59 -05:00
Cory Snider
8f5a9a741b libnetwork: fail loudly on resolver iptables setup
Signed-off-by: Cory Snider <csnider@mirantis.com>
2023-02-16 19:05:59 -05:00
Cory Snider
25b51cad3d libnetwork: replace ad-hoc semaphore implementation
...for limiting concurrent external DNS requests with
"golang.org/x/sync/semaphore".Weighted. Replace the ad-hoc rate limiter
for when the concurrency limit is hit (which contains a data-race bug)
with "golang.org/x/time/rate".Sometimes.

Immediately retrying with the next server if the concurrency limit has
been hit just further compounds the problem. Wait on the semaphore and
refuse the query if it could not be acquired in a reasonable amount of
time.

Signed-off-by: Cory Snider <csnider@mirantis.com>
2023-02-16 19:05:59 -05:00
Cory Snider
a1f7c644be libnetwork: use dns.Client for forwarded requests
It handles figuring out the UDP receive buffer size and setting IO
timeouts, which simplifies our code. It is also more robust to receiving
UDP replies to earlier queries which timed out.

Log failures to perform a client exchange at level error so they are
more visible to operators and administrators.

Signed-off-by: Cory Snider <csnider@mirantis.com>
2023-02-16 18:50:23 -05:00
Cory Snider
e6258e6590 libnetwork: reply SERVFAIL if DNS forwarding fails
Fixes moby/moby issue 44575

Signed-off-by: Cory Snider <csnider@mirantis.com>
2023-02-16 18:44:56 -05:00
Cory Snider
9cf8c4f689 libnetwork: extract DNS client exchange to method
forwardExtDNS() will now continue with the next external DNS sever if
co.ReadMsg() returns (nil, nil). Previously it would abort resolving the
query and not reply to the container client. The implementation of
ReadMsg() in the currently- vendored version of miekg/dns cannot return
(nil, nil) so the difference is immaterial in practice.

Signed-off-by: Cory Snider <csnider@mirantis.com>
2023-02-16 18:44:56 -05:00
Cory Snider
854ec3ffb3 libnetwork: extract dialExtDNS to method
Signed-off-by: Cory Snider <csnider@mirantis.com>
2023-02-16 18:44:56 -05:00
Cory Snider
51cdd7ceac libnetwork: truncate DNS msgs using library method
(*dns.Msg).Truncate() is more intelligent and standards-compliant about
truncating DNS response messages than our hand-rolled version. Fix a
silly fencepost error the max TCP message size: the limit is
dns.MaxMsgSize (65535), full stop.

Signed-off-by: Cory Snider <csnider@mirantis.com>
2023-02-16 18:44:56 -05:00
Cory Snider
860e83e52f libnetwork: get rid of truncation red herring
The TC flag in a DNS message indicates that the sender had to
truncate it to fit within the length limit of the transmission channel.
It does NOT indicate that part of the message was lost before reaching
the recipient. Older versions of github.com/miekg/dns conflated the two
cases by returning ErrTruncated from ReadMsg() if the message was parsed
without error but had the TC flag set. The version of miekg/dns
currently vendored no longer returns an error when a well-formed DNS
message is received which has its TC flag set, but there was some
confusion on how to update libnetwork to deal with this behaviour
change. Truncated DNS replies are no longer different from any other
reply message: they are normal replies which do not need any special-
case handling to proxy back to the client.

Signed-off-by: Cory Snider <csnider@mirantis.com>
2023-02-16 18:44:56 -05:00
Cory Snider
8a35fb0d1c libnetwork: refactor ServeDNS for readability
Signed-off-by: Cory Snider <csnider@mirantis.com>
2023-02-16 18:44:55 -05:00