Commit graph

47601 commits

Author SHA1 Message Date
Bjorn Neergaard
0e80073e01
daemon: strongly type containerd log.OutputFormat
This type was introduced in
0a79e67e4f

Make use of it throughout our log-format handling code, and convert back
to a string before we pass it to the containerd client.

Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
2023-09-21 05:40:17 -06:00
Sebastiaan van Stijn
0d9da7367d
Merge pull request #46522 from thaJeztah/update_hcsshim
vendor: github.com/Microsoft/hcsshim v0.11.1
2023-09-21 10:25:18 +02:00
Sebastiaan van Stijn
3a520c1c0f
Merge pull request #46521 from dmcgowan/fix-makefile-graphdriver
Fix graphdriver lookup in makefile
2023-09-21 08:43:43 +02:00
Sebastiaan van Stijn
e852ba55a5
vendor: github.com/Microsoft/hcsshim v0.11.1
full diff: https://github.com/Microsoft/hcsshim/compare/v0.9.10...v0.11.1

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-21 08:37:39 +02:00
Derek McGowan
06a640084f
Fix graphdriver lookup in makefile
When graphdriver is not provided the graphdriver is looked up
from docker info, but without quotes it may fail and set the
graphdriver to an incorrect value.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-09-20 14:46:43 -07:00
Sebastiaan van Stijn
1ed5d91555
Merge pull request #46365 from thaJeztah/libnetwork_endpoint_nits
libnetwork: Endpoint: fixing some nits
2023-09-20 22:01:28 +02:00
Sebastiaan van Stijn
4dbfe7e17e
Merge pull request #46502 from rumpl/c8d-fix-diff
c8d: Fix `docker diff`
2023-09-20 21:16:08 +02:00
Sebastiaan van Stijn
d8a51d2887
Merge pull request #46463 from thaJeztah/fix_version_checks
client: negotiate api version before handling version-specific code
2023-09-20 19:48:32 +02:00
Djordje Lukic
7444b88f5d
Merge pull request #46495 from rumpl/c8d-fix-create-platform 2023-09-20 16:39:38 +02:00
Paweł Gronowski
7c865c156f
Merge pull request #46515 from vvoland/c8d-pull-fix-progress-orderd
c8d/pull: Fix stale Downloading progress
2023-09-20 16:38:39 +02:00
Sebastiaan van Stijn
e061793212
Merge pull request #46315 from thaJeztah/libnetwork_remove_sandbox_interface_step2
libnetwork/osl: Namespace: assorted cleanups
2023-09-20 16:13:15 +02:00
Sebastiaan van Stijn
e6907243af
client: negotiate api version before handling version-specific code
We try to perform API-version negotiation as lazy as possible (and only execute
when we are about to make an API request). However, some code requires API-version
dependent handling (to set options, or remove options based on the version of the
API we're using).

Currently this code depended on the caller code to perform API negotiation (or
to configure the API version) first, which may not happen, and because of that
we may be missing options (or set options that are not supported on older API
versions).

This patch:

- splits the code that triggered API-version negotiation to a separate
  Client.checkVersion() function.
- updates NewVersionError to accept a context
- updates NewVersionError to perform API-version negotiation (if enabled)
- updates various Client functions to manually trigger API-version negotiation

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-20 15:23:27 +02:00
Djordje Lukic
207c4d537c c8d: Fix docker diff
Diffing a container yielded some extra changes that come from the
files/directories that we mount inside the container (/etc/resolv.conf
for example). To avoid that we create an intermediate snapshot that has
these files, with this we can now diff the container fs with its parent
and only get the differences that were made inside the container.

Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2023-09-20 14:16:22 +02:00
Paweł Gronowski
601c9b29e6
c8d/pull: Fix stale Downloading progress
Final progress messages were sent after the progress updater finished
which made the "Downloading" progress not being updated into "Download
complete".

Fix by sending the final messages after the progress has finished.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2023-09-20 14:10:58 +02:00
Sebastiaan van Stijn
313a090c0e
libnetwork/osl: add some TODOs
These came up during review of a refactor, and need further investigating.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-20 12:45:45 +02:00
Sebastiaan van Stijn
9d3b1f9419
libnetwork/osl: make constructing Interfaces more atomic
It's still not "great", but implement a `newInterface()` constructor
to create a new Interface instance, instead of creating a partial
instance and applying "options" after the fact.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-20 12:45:40 +02:00
Sebastiaan van Stijn
47f9e70385
libnetwork/osl: Namespace.Restore: conditionally fetch IPs
We're only using the results if the interface doesn't have an address
yet, so skip this step if we don't use it.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-20 12:38:27 +02:00
Sebastiaan van Stijn
ee5a91e663
libnetwork/osl: Namespace.Restore: flatten nested conditions
Flatten some nested "if"-statements, and improve error.

Errors returned by this function are not handled, and only logged, so
make them more informative if debugging is needed.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-20 12:38:27 +02:00
Sebastiaan van Stijn
299bd58c5a
libnetwork/osl: Namespace.Restore: rename vars for readability
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-20 12:38:27 +02:00
Sebastiaan van Stijn
7b96663082
libnetwork/osl: Namespace: inline setGateway and setGatewayIPv6
They were not consistently used, and the locations where they were
used were already "setters", so we may as well inline the code.

Also updating Namespace.Restore to keep the lock slightly longer,
instead of locking/unlocking for each property individually, although
we should consider to keep the long for the duration of the whole
function to make it more atomic.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-20 12:38:26 +02:00
Sebastiaan van Stijn
bd17d27658
libnetwork/osl: Namespace: make error-handling more idiomatic
Check for non-nil errors (and return early) instead of the reverse.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-20 12:38:26 +02:00
Sebastiaan van Stijn
0b4a70ca2c
libnetwork/osl: Namespace: programRoute, removeRoute rm path arg
Remove the argument, because it was not used.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-20 12:38:26 +02:00
Sebastiaan van Stijn
542fe0da40
libnetwork/osl: Namespace: make mutex private
Make the mutex internal to the Namespace; locking/unlocking should not
be done externally, and this makes it easier to see where it's used.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-20 12:38:26 +02:00
Sebastiaan van Stijn
338fc49060
libnetwork/osl: implement Namespace.RemoveInterface
Interface.Remove() was directly accessing Namespace "internals", such
as locking/unlocking. Move the code from Interface.Remove() into the
Namespace instead.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-20 12:34:47 +02:00
Sebastiaan van Stijn
7cfb81ba04
Merge pull request #46342 from thaJeztah/libnetwork_nwAgent_ip
libnetwork: nwAgent.bindAddr: change to net.IP
2023-09-20 10:27:06 +02:00
Sebastiaan van Stijn
34dc2f10b4
Merge pull request #46479 from vvoland/pull-check-reserved-name-in-api
api/pull: Move reference parsing from imageService, validate repo
2023-09-19 17:17:31 +02:00
Sebastiaan van Stijn
54d84229ce
Merge pull request #46511 from rumpl/c8d-system-df-image-containers
c8d: Number of containers using an image
2023-09-19 17:08:01 +02:00
Sebastiaan van Stijn
1c34831291
Merge pull request #46513 from vvoland/c8d-pull-pretty-jws
c8d/pull: Support legacy schema1 prettyjws manifests
2023-09-19 17:03:50 +02:00
Paweł Gronowski
3ff75aeb07
c8d/pull: Deprecation notice for schema1 manifests
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2023-09-19 15:46:42 +02:00
Paweł Gronowski
2cb94ade6c
distribution: Extract schema1 deprecation notice
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2023-09-19 15:39:05 +02:00
Sebastiaan van Stijn
3350f815c7
Merge pull request #46480 from thaJeztah/remove_remote_endpoints
libnetwork: remove some dead code around netWatch
2023-09-19 14:00:12 +02:00
Djordje Lukic
39fe25b69e
c8d: Fix getting image with platform
We weren't checking for the asked platform in the case the image was a
manifest, only if it was a manifest list.

Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2023-09-19 13:54:24 +02:00
Paweł Gronowski
68b67b3230
c8d/pull: Support legacy schema1 prettyjws manifests
Makes it possible to pull `application/vnd.docker.distribution.manifest.v1+prettyjws`
legacy manifests.

They are not stored in their original form but are converted to the OCI
manifests.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2023-09-19 13:17:12 +02:00
Paweł Gronowski
cf5657d4bb
Merge pull request #46512 from rumpl/run-once
Don't run tests twice
2023-09-19 12:56:22 +02:00
Djordje Lukic
d5425f28ae
Don't run tests twice
It's useless

Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2023-09-19 11:37:55 +02:00
Sebastiaan van Stijn
5d87dc98ea
Merge pull request #46507 from rumpl/c8d-fix-tests
c8d: Skip TestRemoveImageGarbageCollector
2023-09-18 23:06:00 +02:00
Sebastiaan van Stijn
f13065b1f7
Merge pull request #46183 from akerouanton/validate-NetworkingConfig
daemon: Improve NetworkingConfig & EndpointSettings validation
2023-09-18 22:09:29 +02:00
Sebastiaan van Stijn
a24d254397
Merge pull request #46436 from thaJeztah/search_remove_unused_bits
registry: assorted fixes for search
2023-09-18 21:28:33 +02:00
Sebastiaan van Stijn
07e28a968b
Merge pull request #46509 from thaJeztah/search_no_jsonstream
registry: remove jsonmessage dependency
2023-09-18 21:26:57 +02:00
Djordje Lukic
2394b07bce
c8d: Number of containers using an image
Return the number of containers that use an image if it was asked,
during a `docker system df` call for example.

Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2023-09-18 19:36:49 +02:00
Sebastiaan van Stijn
563bb58c8d
Merge pull request #46510 from thaJeztah/update_buildkit_deps
update some dependencies in preparation of containerd v1.7.x and buildkit v0.12
2023-09-18 19:24:43 +02:00
Albin Kerouanton
e19e541e2c
libnet: add comment to ipamType
Signed-off-by: Albin Kerouanton <albinker@gmail.com>
2023-09-18 18:26:56 +02:00
Albin Kerouanton
acf825def2
api/t/net: test EndpointIPAMConfig.Validate()
Signed-off-by: Albin Kerouanton <albinker@gmail.com>
2023-09-18 18:26:56 +02:00
Albin Kerouanton
3092b261e2
daemon: move most of validateEndpointSettings into api/t/net
Signed-off-by: Albin Kerouanton <albinker@gmail.com>
2023-09-18 18:26:56 +02:00
Sebastiaan van Stijn
554036040b
vendor: github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24
full diff: 43070de90f...ced1acdcaa

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-18 18:18:49 +02:00
Sebastiaan van Stijn
6fc3ead321
vendor: google.golang.org/grpc v1.56.2
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-18 18:17:30 +02:00
Sebastiaan van Stijn
73041028b6
vendor: google.golang.org/protobuf v1.31.0
full diff: https://github.com/protocolbuffers/protobuf-go/compare/v1.30.0...v1.31.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-18 18:17:30 +02:00
Sebastiaan van Stijn
54dc8d2968
vendor: github.com/cenkalti/backoff/v4 v4.2.1
no local changes

full diff: https://github.com/cenkalti/backoff/compare/v4.2.0...v4.2.1

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-18 18:17:30 +02:00
Sebastiaan van Stijn
d97e4300ee
vendor: google.golang.org/api v0.114.0
full diff:

- https://github.com/googleapis/google-api-go-client/compare/v0.110.0...v0.114.0
- https://github.com/googleapis/gax-go/compare/v2.7.0...v2.7.1

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-18 18:17:30 +02:00
Sebastiaan van Stijn
d50585b05b
vendor: golang.org/x/tools v0.8.0
full diff: https://github.com/golang/tools/compare/v0.6.0...v0.8.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-18 18:17:29 +02:00