Commit graph

46524 commits

Author SHA1 Message Date
Sebastiaan van Stijn
754bc52a79
Merge pull request #45868 from thaJeztah/docs_plugin_disable_force_carry
docs: api:  add missing "force" query arg on plugin disable
2023-07-02 21:57:42 +02:00
Sebastiaan van Stijn
42690b6d57
Merge pull request #45866 from thaJeztah/api_remove_deprecated_swarm
docs: api: remove outdated information from ServerVersion
2023-07-02 21:56:55 +02:00
Brian Goff
2ea6794c97
Merge pull request #45863 from thaJeztah/update_msgp
vendor: github.com/tinylib/msgp v1.1.8
2023-07-02 11:39:19 -07:00
Sebastiaan van Stijn
f6258f70cb
docs: api v1.28 - v1.40: add missing "force" query arg on plugin disable
This option was added in 8cb2229cd1 for
API version 1.28, but forgot to update the documentation and version
history.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-02 13:04:06 +02:00
Sebastiaan van Stijn
892e9f2c23
docs: api v1.41: add missing "force" query arg on plugin disable
This option was added in 8cb2229cd1 for
API version 1.28, but forgot to update the documentation and version
history.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-02 13:03:33 +02:00
Sebastiaan van Stijn
a4bdfb963f
docs: api v1.42: add missing "force" query arg on plugin disable
This option was added in 8cb2229cd1 for
API version 1.28, but forgot to update the documentation and version
history.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-02 13:03:24 +02:00
Sebastiaan van Stijn
85ccb25eb8
docs: api v1.43: add missing "force" query arg on plugin disable
This option was added in 8cb2229cd1 for
API version 1.28, but forgot to update the documentation and version
history.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-02 13:02:32 +02:00
Sebastiaan van Stijn
aba8e04ab1
docs: api: amend changelog for API 1.28 for "force" option
This option was added in 8cb2229cd1 for
API version 1.28, but forgot to update the documentation and version
history.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-02 12:53:52 +02:00
Sebastiaan van Stijn
3e4c9d90cf
Merge pull request #43897 from milas/docs-plugin-disable-force
api: swagger: add missing "force" query arg on plugin disable
2023-07-02 12:53:39 +02:00
Sebastiaan van Stijn
7055244547
docs: api v1.32 - v1.40: remove outdated information from ServerVersion
This field's documentation was still referring to the Swarm V1 API, which
is deprecated, and the link redirects to SwarmKit.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-02 12:38:33 +02:00
Sebastiaan van Stijn
ed0dbb8518
docs: api v1.41: remove outdated information from ServerVersion
This field's documentation was still referring to the Swarm V1 API, which
is deprecated, and the link redirects to SwarmKit.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-02 12:33:43 +02:00
Sebastiaan van Stijn
b770a50dee
docs: api v1.42: remove outdated information from ServerVersion
This field's documentation was still referring to the Swarm V1 API, which
is deprecated, and the link redirects to SwarmKit.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-02 12:33:35 +02:00
Sebastiaan van Stijn
18d77ff455
docs: api v1.43: remove outdated information from ServerVersion
This field's documentation was still referring to the Swarm V1 API, which
is deprecated, and the link redirects to SwarmKit.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-02 12:33:20 +02:00
Sebastiaan van Stijn
92f1ddaf0a
api: remove outdated information from ServerVersion
This field's documentation was still referring to the Swarm V1 API, which
is deprecated, and the link redirects to SwarmKit.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-02 12:33:20 +02:00
Bjorn Neergaard
70f57409c3
Merge pull request #45864 from thaJeztah/api_remove_deprecated
docs: api: remove "ClusterStore" and "ClusterAdvertise" fields
2023-07-01 13:03:11 -06:00
Sebastiaan van Stijn
e8f206972a
docs: api v1.42: remove "ClusterStore" and "ClusterAdvertise" fields
The `ClusterStore` and `ClusterAdvertise` fields were deprecated in commit
616e64b42f (and would no longer be included in
the `/info` API response), and were fully removed in 24.0.0 through commit
68bf777ece

This patch removes the fields from the swagger file.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-01 16:37:51 +02:00
Sebastiaan van Stijn
e58a60902c
docs: api v1.43: remove "ClusterStore" and "ClusterAdvertise" fields
The `ClusterStore` and `ClusterAdvertise` fields were deprecated in commit
616e64b42f (and would no longer be included in
the `/info` API response), and were fully removed in 24.0.0 through commit
68bf777ece

This patch removes the fields from the swagger file.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-01 16:36:52 +02:00
Sebastiaan van Stijn
3c905d0db9
api: remove "ClusterStore" and "ClusterAdvertise" fields
The `ClusterStore` and `ClusterAdvertise` fields were deprecated in commit
616e64b42f (and would no longer be included in
the `/info` API response), and were fully removed in 24.0.0 through commit
68bf777ece

This patch removes the fields from the swagger file.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-01 16:34:46 +02:00
Sebastiaan van Stijn
e4d809b2b0
vendor: github.com/tinylib/msgp v1.1.8
This is an indirect dependency for github.com/fluent/fluent-logger-golang,
which does not yet use a go.mod. Update the dependency to the latest patch
release, which contains some fixes, and updates for newer go versions;

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

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-01 15:29:36 +02:00
Sebastiaan van Stijn
a61494e634
Merge pull request #45839 from vvoland/c8d-dont-prune-used
c8d/prune: Fix images being deleted when they're still used with a different reference
2023-06-30 21:12:42 +02:00
Bjorn Neergaard
75ee002347
Merge pull request #45854 from thaJeztah/daemon_config_remove_contextfield
daemon/config: remove unused CommonConfig.Context
2023-06-30 10:19:49 -06:00
Paweł Gronowski
e638351ef9
c8d/prune: Handle containers started from image id
If an image is only by id instead of its name, don't prune it
completely. but only untag it and create a dangling image for it.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2023-06-30 18:19:03 +02:00
Paweł Gronowski
a93298d4db
c8d/prune: Exclude dangling tag of the images used by containers
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2023-06-30 18:18:56 +02:00
Paweł Gronowski
a6d5db3f9b
c8d/softDelete: Deep copy Labels
So we don't override the original Labels in the passed image object.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2023-06-30 18:18:50 +02:00
Paweł Gronowski
2b0655a71a
c8d/softDelete: Extract ensureDanglingImage
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2023-06-30 18:18:47 +02:00
Paweł Gronowski
a96e6044cc
testutil/environment: Add GetTestDanglingImageId
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2023-06-30 18:18:45 +02:00
Sebastiaan van Stijn
647ed1d205
Merge pull request #45855 from thaJeztah/remove_overlay_cfg
libnetwork/drivers: remove unused "config" parameters and fields
2023-06-30 17:30:48 +02:00
Sebastiaan van Stijn
13472c6cf1
daemon/config: remove unused CommonConfig.Context
This field was added in f0e6e135a8, and
from that change I suspect it was intended to store the default SELinux
mount-labels to be set on containers.

However, it was never used, so let's remove it.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-30 16:44:53 +02:00
Sebastiaan van Stijn
b6ad25bf5e
Merge pull request #45848 from thaJeztah/improve_fd_count
pkg/fileutils: GetTotalUsedFds: reduce allocations
2023-06-30 14:54:57 +02:00
Sebastiaan van Stijn
40908c5fcd
libnetwork/drivers: inline capabilities options
Remove the intermediate variable, and move the option closer
to where it's used, as in some cases we created the variable,
but could return with an error before it was used.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-30 14:36:01 +02:00
Sebastiaan van Stijn
97285711f3
libnetwork/drivers/overlay: Register does not require DriverCallback
This function was not using the DriverCallback interface, and only
required the Registerer interface.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-30 14:29:30 +02:00
Sebastiaan van Stijn
a718ccd0c5
libnetwork/drivers: remove unused "config" parameters and fields
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-30 14:26:32 +02:00
Sebastiaan van Stijn
d547477bc2
Merge pull request #45851 from thaJeztah/gha_fix_missing_daemonjson
gha: don't fail if no daemon.json is present
2023-06-30 11:01:59 +02:00
Sebastiaan van Stijn
264dbad43a
gha: don't fail if no daemon.json is present
CI failed sometimes if no daemon.json was present:

    Run sudo rm /etc/docker/daemon.json
    sudo rm /etc/docker/daemon.json
    sudo service docker restart
    docker version
    docker info
    shell: /usr/bin/bash -e {0}
    env:
    DESTDIR: ./build
    BUILDKIT_REPO: moby/buildkit
    BUILDKIT_TEST_DISABLE_FEATURES: cache_backend_azblob,cache_backend_s3,merge_diff
    BUILDKIT_REF: 798ad6b0ce9f2fe86dfb2b0277e6770d0b545871
    rm: cannot remove '/etc/docker/daemon.json': No such file or directory
    Error: Process completed with exit code 1.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-30 01:50:42 +02:00
Sebastiaan van Stijn
ec79d0fc05
pkg/fileutils: GetTotalUsedFds(): use fast-path for Kernel 6.2 and up
Linux 6.2 and up (commit [f1f1f2569901ec5b9d425f2e91c09a0e320768f3][1])
provides a fast path for the number of open files for the process.

From the [Linux docs][2]:

> The number of open files for the process is stored in 'size' member of
> `stat()` output for /proc/<pid>/fd for fast access.

[1]: f1f1f25699
[2]: https://docs.kernel.org/filesystems/proc.html#proc-pid-fd-list-of-symlinks-to-open-files

This patch adds a fast-path for Kernels that support this, and falls back
to the slow path if the Size fields is zero.

Comparing on a Fedora 38 (kernel 6.2.9-300.fc38.x86_64):

Before/After:

    go test -bench ^BenchmarkGetTotalUsedFds$ -run ^$ ./pkg/fileutils/
    BenchmarkGetTotalUsedFds        57264     18595 ns/op     408 B/op      10 allocs/op
    BenchmarkGetTotalUsedFds       370392      3271 ns/op      40 B/op       3 allocs/op

Note that the slow path has 1 more file-descriptor, due to the open
file-handle for /proc/<pid>/fd during the calculation.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-30 01:31:58 +02:00
Sebastiaan van Stijn
eaa9494b71
pkg/fileutils: GetTotalUsedFds: reduce allocations
Use File.Readdirnames instead of os.ReadDir, as we're only interested in
the number of files, and results don't have to be sorted.

Before:

    BenchmarkGetTotalUsedFds-5   	  149272	      7896 ns/op	     945 B/op	      20 allocs/op

After:

    BenchmarkGetTotalUsedFds-5   	  153517	      7644 ns/op	     408 B/op	      10 allocs/op

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-30 01:31:58 +02:00
Sebastiaan van Stijn
03390be5fa
pkg/fileutils: add BenchmarkGetTotalUsedFds
go test -bench ^BenchmarkGetTotalUsedFds$ -run ^$ ./pkg/fileutils/
    goos: linux
    goarch: arm64
    pkg: github.com/docker/docker/pkg/fileutils
    BenchmarkGetTotalUsedFds-5   	  149272	      7896 ns/op	     945 B/op	      20 allocs/op

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-30 01:31:57 +02:00
Sebastiaan van Stijn
252e94f499
pkg/fileutils: GetTotalUsedFds(): don't pretend to support FreeBSD
Commit 8d56108ffb moved this function from
the generic (no build-tags) fileutils.go to a unix file, adding "freebsd"
to the build-tags.

This likely was a wrong assumption (as other files had freebsd build-tags).
FreeBSD's procfs does not mention `/proc/<pid>/fd` in the manpage, and
we don't test FreeBSD in CI, so let's drop it, and make this a Linux-only
file.

While updating also dropping the import-tag, as we're planning to move
this file internal to the daemon.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-30 01:31:51 +02:00
Sebastiaan van Stijn
3229517b2c
Merge pull request #45816 from laurazard/fix-non-default-platform-images
c8d/images: handle images without manifests for default platform
2023-06-29 20:54:06 +02:00
Sebastiaan van Stijn
b8ac06d9d1
Merge pull request #45844 from moby/maintainers_email
MAINTAINERS: update my email; AUTHORS,.mailmap: update with recent contributors
2023-06-29 18:05:26 +02:00
Bjorn Neergaard
7747327561
AUTHORS,.mailmap: update with recent contributors
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
2023-06-29 08:22:14 -06:00
Bjorn Neergaard
60d2eeaa5b
MAINTAINERS: update my email
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
2023-06-29 08:13:41 -06:00
Brian Goff
14de8ba4ea
Merge pull request #44741 from crazy-max/rm-apt-mirror 2023-06-29 07:11:41 -07:00
Bjorn Neergaard
46cf8cecc8
Merge pull request #43169 from thaJeztah/use_gofumpt
Format code with gofumpt
2023-06-29 06:23:52 -06:00
Akihiro Suda
fc7a3befda
Merge pull request #45823 from thaJeztah/bump_swarmkit
vendor: github.com/moby/swarmkit/v2 v2.0.0-20230627115642-ad0f3ae162fa
2023-06-29 08:33:29 +09:00
Sebastiaan van Stijn
a2154e1249
Merge pull request #45836 from neersighted/ctn-build-extra
docs: document more buildx targets
2023-06-29 00:38:59 +02:00
Sebastiaan van Stijn
a764cd5a40
pkg/chrootarchive: format code with gofumpt
Formatting the code with https://github.com/mvdan/gofumpt

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-29 00:33:03 +02:00
Sebastiaan van Stijn
210932b3bf
daemon: format code with gofumpt
Formatting the code with https://github.com/mvdan/gofumpt

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-29 00:33:03 +02:00
Sebastiaan van Stijn
e236994b76
daemon/snapshotter: format code with gofumpt
Formatting the code with https://github.com/mvdan/gofumpt

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-29 00:32:38 +02:00
Sebastiaan van Stijn
9213e35011
daemon/containerd: format code with gofumpt
Formatting the code with https://github.com/mvdan/gofumpt

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-29 00:31:54 +02:00