Commit graph

44496 commits

Author SHA1 Message Date
Sebastiaan van Stijn
ce550fa9c2
Merge pull request #43968 from thaJeztah/implement_GetImageOpts
introduce GetImageOpts to manage image inspect data in backend
2022-08-24 19:07:30 +02:00
Sebastiaan van Stijn
68d7736e9e
Merge pull request #44011 from thaJeztah/test_detect_snapshotter
integration-cli: add utility to check if snapshotters are enabled
2022-08-24 17:03:42 +02:00
Sebastiaan van Stijn
74b84d00b3
integration-cli: add utility to check if snapshotters are enabled
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-08-24 14:03:15 +02:00
Sebastiaan van Stijn
500c026818
Merge pull request #43983 from thaJeztah/daemon_configurable_snapshotter
daemon: make the snapshotter configurable
2022-08-24 14:02:27 +02:00
Sebastiaan van Stijn
c7d74a2366
Merge pull request #44026 from zhangyoufu/libnetwork-ipvlan-fix
libnetwork/drivers/ipvlan: fix missing IpvlanFlag field in config JSON
2022-08-24 13:45:09 +02:00
Youfu Zhang
549d24b437 libnetwork/drivers/ipvlan: fix missing IpvlanFlag field in config JSON
Fixes #42542

Signed-off-by: Youfu Zhang <zhangyoufu@gmail.com>
2022-08-24 16:23:32 +08:00
Sebastiaan van Stijn
ab37723fa2
Merge pull request #44017 from corhere/timestamp-daemon-etw-logs
ci: print Windows daemon event log timestamps
2022-08-24 01:16:25 +02:00
Sebastiaan van Stijn
6b7974cf16
Merge pull request #43739 from ndeloof/healthcheck_timeout
don't use canceled context to send KILL signal to healthcheck process
2022-08-23 22:00:54 +02:00
Cory Snider
23b8fcc74d ci: print Windows daemon event log timestamps
Signed-off-by: Cory Snider <csnider@mirantis.com>
2022-08-23 14:16:21 -04:00
Cory Snider
4b84a33217
daemon: kill exec process on ctx cancel
Terminating the exec process when the context is canceled has been
broken since Docker v17.11 so nobody has been able to depend upon that
behaviour in five years of releases. We are thus free from backwards-
compatibility constraints.

Co-authored-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Co-authored-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Signed-off-by: Cory Snider <csnider@mirantis.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-08-23 15:35:30 +02:00
Sebastiaan van Stijn
774e25de13
info: add driver-type
With this patch:

    mkdir -p /etc/docker/
    echo '{"features":{"containerd-snapshotter":true}}' > /etc/docker/daemon.json
    dockerd

    docker info
    ...
    Storage Driver: overlayfs
     driver-type: io.containerd.snapshotter.v1
    Logging Driver: json-file

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-08-23 10:09:37 +02:00
Djordje Lukic
d8d990f2e3
daemon: make the snapshotter configurable
Treat (storage/graph)Driver as snapshotter

Also moved some layerStore related initialization to the non-c8d case
because otherwise they get treated as a graphdriver plugins.

Co-authored-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-08-22 18:57:42 +02:00
Tianon Gravi
464882e398
Merge pull request #43982 from thaJeztah/daemon_remove_graphdriver_field
ImageService: rename GraphDriverName to StorageDriver, remove daemon.graphdriver
2022-08-19 13:08:36 -07:00
Sebastiaan van Stijn
2646beac87
Merge pull request #43353 from thaJeztah/update_logentries
vendor: github.com/bsphere/le_go v0.0.0-20200109081728-fc06dab2caa8
2022-08-19 18:03:40 +02:00
Sebastiaan van Stijn
d082bbcc05
Merge pull request #43978 from cpuguy83/default_runtime_shim
Allow containerd shim refs in default-runtime
2022-08-18 22:59:57 +02:00
Sebastiaan van Stijn
b6a2441eb9
Merge pull request #43986 from neersighted/bump_memberlist
vendor: bump memberlist
2022-08-18 22:56:49 +02:00
Sebastiaan van Stijn
61e5cf083a
Merge pull request #43971 from thaJeztah/daemon_fix_hosts_validation_step1c3
daemon: use initialized config struct in more tests
2022-08-18 21:30:07 +02:00
Brian Goff
e6ee27a541 Allow containerd shim refs in default-runtime
Since runtimes can now just be containerd shims, we need to check if the
reference is possibly a containerd shim.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2022-08-18 18:41:03 +00:00
Brian Goff
1e97933876
Merge pull request #43987 from thaJeztah/seccomp_bpfcap
seccomp: allow "bpf", "perf_event_open", gated by CAP_BPF, CAP_PERFMON
2022-08-18 11:35:39 -07:00
Sebastiaan van Stijn
d4314f7c1f
Merge pull request #43981 from thaJeztah/deprecate_graph
daemon: complete the "--graph" / "-g" deprecation
2022-08-18 20:29:44 +02:00
Sebastiaan van Stijn
a4ac991d02
Merge pull request #43657 from thaJeztah/default_builder_version
api: set default "Builder-Version" to "2" (BuildKit) on Linux
2022-08-18 20:14:47 +02:00
Akihiro Suda
5675d3a8fe
Merge pull request #43972 from thaJeztah/buildx_0.9
Makefile: update buildx to v0.9.0
2022-08-19 02:40:54 +09:00
Sebastiaan van Stijn
7b7d1132e8
seccomp: allow "bpf", "perf_event_open", gated by CAP_BPF, CAP_PERFMON
Update the profile to make use of CAP_BPF and CAP_PERFMON capabilities. Prior to
kernel 5.8, bpf and perf_event_open required CAP_SYS_ADMIN. This change enables
finer control of the privilege setting, thus allowing us to run certain system
tracing tools with minimal privileges.

Based on the original patch from Henry Wang in the containerd repository.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-08-18 18:34:09 +02:00
Bjorn Neergaard
360238e9e1 vendor: github.com/hasicorp/memberlist v0.4.0
Signed-off-by: Bjorn Neergaard <bneergaard@mirantis.com>
2022-08-18 09:51:11 -06:00
Sebastiaan van Stijn
b58de39ca7
daemon: complete the "--graph" / "-g" deprecation
The `-g` / `--graph` options were soft deprecated in favor of `--data-root` in
261ef1fa27 (v17.05.0) and at the time considered
to not be removed. However, with the move towards containerd snapshotters, having
these options around adds additional complexity to handle fallbacks for deprecated
(and hidden) flags, so completing the deprecation.

With this patch:

    dockerd --graph=/var/lib/docker --validate
    Flag --graph has been deprecated, Use --data-root instead
    unable to configure the Docker daemon with file /etc/docker/daemon.json: merged configuration validation from file and command line flags failed: the "graph" config file option is deprecated; use "data-root" instead

    mkdir -p /etc/docker
    echo '{"graph":"/var/lib/docker"}' > /etc/docker/daemon.json

    dockerd --validate
    unable to configure the Docker daemon with file /etc/docker/daemon.json: merged configuration validation from file and command line flags failed: the "graph" config file option is deprecated; use "data-root" instead

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-08-18 14:57:16 +02:00
Sebastiaan van Stijn
6f8ea5b26e
Merge pull request #43977 from thaJeztah/vendor_containerd_1.6.8
vendor: github.com/containerd/containerd v1.6.8
2022-08-18 13:29:33 +02:00
Sebastiaan van Stijn
d2276ff3f2
daemon: remove daemon.graphdriver
It was only used as an intermediate variable to store what's returned
by layerstore.DriverName() / ImageService.StorageDriver()

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-08-18 13:20:48 +02:00
Sebastiaan van Stijn
c6eab4077a
daemon: info: fillDriverInfo() get driver-name from ImageService
Make the ImageService the source of truth for the storage-driver
that's used.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-08-18 09:44:56 +02:00
Sebastiaan van Stijn
8dd14509d7
ImageService: rename GraphDriverName to StorageDriver
Make the function name more generic, as it's no longer used only
for graphdrivers but also for snapshotters.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-08-18 09:44:51 +02:00
Brian Goff
031c731c68
Merge pull request #43940 from thaJeztah/remove_legacy_graphdriver_fallback
daemon: remove some legacy fallbacks, and small refactor
2022-08-17 14:00:27 -07:00
Sebastiaan van Stijn
ca52e0a244
vendor: github.com/containerd/containerd v1.6.8
no code changes, other than a version bump

full diff: https://github.com/containerd/containerd/compare/v1.6.7...v1.6.8

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-08-17 17:34:07 +02:00
Sebastiaan van Stijn
f27b74f0f7
Makefile: update buildx to v0.9.0
release notes: https://github.com/docker/buildx/releases/tag/v0.9.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-08-17 14:55:39 +02:00
Sebastiaan van Stijn
327c8fc52f
daemon/config: use initialized config in more tests
Makes sure that tests use a config struct that's more representative
to how it's used in the code.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-08-17 14:31:25 +02:00
Sebastiaan van Stijn
2d7d81bc46
cmd/dockerd: use initialized config in tests
Makes sure that tests use a config struct that's more representative
to how it's used in the code.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-08-17 14:07:03 +02:00
Sebastiaan van Stijn
ff1b933d96
Merge pull request #43756 from thaJeztah/daemon_fix_hosts_validation_step1c2
daemon/config: New(): implement platform-specific defaults
2022-08-17 13:15:24 +02:00
Sebastiaan van Stijn
b28e66cf4f
daemon/config: New(): initialize config with platform-specific defaults
This centralizes more defaults, to be part of the config struct that's
created, instead of interweaving the defaults with other code in various
places.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-08-17 08:54:32 +02:00
Sebastiaan van Stijn
9d74c7ab99
daemon: Mount(): use container's driver information for error-message
Use the information stored as part of the container for the error-message,
instead of querying the current storage driver from the daemon.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-08-16 23:25:25 +02:00
Sebastiaan van Stijn
239d9c5eda
daemon: restore(): remove fallback for legacy containers
The check was accounting for old containers that did not have a storage-driver
set in their config, and was added in 4908d7f81d
for docker v0.7.0-rc6 - nearly 9 Years ago, so very likely nobody is still
depending on this ;-)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-08-16 23:25:16 +02:00
Sebastiaan van Stijn
6ccda5a041
daemon: restore(): remove platform-check (was used for LCOW)
This was added in 0cba7740d4, as part of
the LCOW implementation. LCOW support has been removed, so we can remove
this check.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-08-16 23:17:23 +02:00
Brian Goff
724feb898f
Merge pull request #43857 from corhere/follow-up-42829
libnetwork: refactor networkdb test implementation
2022-08-16 10:48:02 -07:00
Nicolas De Loof
9a849cc83a
introduce GetImageOpts to manage image inspect data in backend
Currently only provides the existing "platform" option, but more
options will be added in follow-ups.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-08-16 16:49:46 +02:00
Sebastiaan van Stijn
cff2b5b338
Merge pull request #43912 from thaJeztah/containerd_emptyfs_modern
emptyfs: Use newer image layout
2022-08-16 14:43:01 +02:00
Sebastiaan van Stijn
301fed8a45
Merge pull request #43817 from thaJeztah/pull_auth
containerd integration: containerd/pull: Use authorization
2022-08-16 13:18:29 +02:00
Paweł Gronowski
a4b28e23cf
integration-cli: Correct emptyfs id under c8d
The legacy v1 is not supported by the containerd import

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-08-16 13:01:48 +02:00
Paweł Gronowski
502d3a1fcb
containerd/load: Load all platforms
To make it possible to load emptyfs which is amd64 only

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2022-08-16 13:00:18 +02:00
Brian Goff
54de892d1e
Merge pull request #43833 from thaJeztah/compute_sharedsize
containerd integration: compute image's shared size
2022-08-15 09:25:13 -07:00
Samuel Karp
af1edfd368
Merge pull request #43899 from thaJeztah/fix_build_api_errors 2022-08-13 16:21:38 -07:00
Samuel Karp
73785fff07
Merge pull request #43949 from thaJeztah/fix_godoc 2022-08-13 16:19:10 -07:00
Tianon Gravi
4a14453d2d
Merge pull request #43883 from thaJeztah/image_router_warnings
api/server/router/image: address some linter warnings
2022-08-12 17:24:43 -07:00
Tianon Gravi
8d9d5a3bb5
Merge pull request #43844 from Abirdcfly/master
fix minor code unreachability error
2022-08-12 17:12:15 -07:00