Commit graph

45361 commits

Author SHA1 Message Date
Cory Snider
7037c48e58 libnetwork: set IPv6 without reexec
unshare.Go() is not used as an existing network namespace needs to be
entered, not a new one created. Explicitly lock main() to the initial
thread so as not to depend on the side effects of importing the
internal/unshare package to achieve the same.

Signed-off-by: Cory Snider <csnider@mirantis.com>
2023-01-11 12:05:39 -05:00
Cory Snider
0246332954 libnetwork: create netns without reexec
Signed-off-by: Cory Snider <csnider@mirantis.com>
2023-01-11 12:05:39 -05:00
Bjorn Neergaard
ffb2c1fb4a
Merge pull request #44802 from akerouanton/libnetwork-sysfs-cleanup
libnetwork: Clean up sysfs-based operations
2023-01-11 10:04:51 -07:00
Albin Kerouanton
ef161d4aeb
libnetwork: Clean up sysfs-based operations
- The oldest kernel version currently supported is v3.10. Bridge
parameters can be set through netlink since v3.8 (see
torvalds/linux@25c71c7). As such, we don't need to fallback to sysfs to
set hairpin mode.
- `scanInterfaceStats()` is never called, so no need to keep it alive.
- Document why `default_pvid` is set through sysfs

Signed-off-by: Albin Kerouanton <albinker@gmail.com>
2023-01-11 17:01:53 +01:00
Sebastiaan van Stijn
a0572a40ab
Merge pull request #44793 from thaJeztah/bump_go_1.19.5
update to go1.19.5
2023-01-11 16:26:00 +01:00
Sebastiaan van Stijn
d3dec8fae1
Merge pull request #44784 from thaJeztah/api_sync_docs
docs: api: synchronise versioned API docs (v1.39 - v1.42)
2023-01-11 13:55:42 +01:00
Bjorn Neergaard
b139a7636f
Merge pull request #44792 from neersighted/rip_derek
CONTRIBUTING.md: drop reference to the Derek GitHub bot
2023-01-10 17:30:44 -07:00
Sebastiaan van Stijn
155e8d7d78
update to go1.19.5
go1.19.5 (released 2023-01-10) includes fixes to the compiler, the linker,
and the crypto/x509, net/http, sync/atomic, and syscall packages. See the
Go 1.19.5 milestone on the issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.19.5+label%3ACherryPickApproved

full diff: https://github.com/golang/go/compare/go1.19.4...go1.19.5

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-01-11 00:15:35 +01:00
Bjorn Neergaard
8d1e56e210
CONTRIBUTING.md: drop reference to the Derek GitHub bot
Signed-off-by: Bjorn Neergaard <bneergaard@mirantis.com>
2023-01-10 15:42:09 -07:00
Cory Snider
62296f9281
Merge pull request #44087 from jchorl/josh/sdkupgrade
Upgrade to aws go sdk v2 for cloudwatch logging driver
2023-01-10 14:51:30 -05:00
Akihiro Suda
cf3ce189ab
Merge pull request #44782 from thaJeztah/no_dockerio
use example.com for tests and examples
2023-01-11 03:31:11 +09:00
Sebastiaan van Stijn
805aea501a
docs: api: synchronise versioned API docs (v1.39 - v1.41)
synchronises some fixes between these API versions for the documentation,
including fixes from:

- 52a9f1689a
- 345346d7c6
- 18f85467e7
- 1557892c37

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-01-10 16:42:44 +01:00
Sebastiaan van Stijn
92cbd1c69e
docs: api: synchronise versioned API docs (v1.42)
synchronises some fixes between these API versions for the documentation,
including fixes from:

- 18f85467e7
- 345346d7c6

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-01-10 16:42:23 +01:00
Sebastiaan van Stijn
fb80e8a1c4
Merge pull request #44061 from fussybeaver/44059-swagger-create-image-info
api: swagger: add errorDetail to CreateImageInfo
2023-01-10 16:06:43 +01:00
Sebastiaan van Stijn
9275a771bf
Merge pull request #44599 from davidhsingyuchen/doc-auth
docs: add 401 to possible status codes of /auth
2023-01-10 15:39:04 +01:00
Sebastiaan van Stijn
4f81f9d5ea
builder/dockerfile: use example.com for tests
Trying to remove the "docker.io" domain from locations where it's not relevant.
In these cases, this domain was used as a "random" domain for testing or example
purposes.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-01-10 15:28:09 +01:00
Sebastiaan van Stijn
65aa43bf66
libnetwork: use example.com for tests and examples
Trying to remove the "docker.io" domain from locations where it's not relevant.
In these cases, this domain was used as a "random" domain for testing or example
purposes.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-01-10 15:27:58 +01:00
Sebastiaan van Stijn
d73aba2500
Merge pull request #42264 from thaJeztah/update_the_update
restartmanager:  Remove RestartManager interface, and unused error return
2023-01-10 11:40:36 +01:00
Sebastiaan van Stijn
9a8b8009f4
Merge pull request #44772 from crazy-max/update-buildkit-ref
ci: update buildkit to fix integration tests
2023-01-10 11:31:20 +01:00
CrazyMax
dc30785947
ci: update buildkit to fix integration tests
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-01-10 09:43:06 +01:00
Bjorn Neergaard
62227e1bba
Merge pull request #44733 from jg-public/fix-rootless-specspaths--T43111
Use user data path for plugin discovery in rootless mode
2023-01-09 17:32:11 -07:00
Bjorn Neergaard
1ef0a1b1be
Merge pull request #44762 from AkihiroSuda/fix-btrfs-kernel-requirement
graphdriver/btrfs: needs kernel headers >= 4.12, not >= 4.7
2023-01-09 16:56:32 -07:00
Bjorn Neergaard
5db247da9d
Merge pull request #44770 from neersighted/ignore_bom
daemon/config: ignore UTF-8 BOM in config JSON
2023-01-09 16:41:57 -07:00
Samuel Karp
214cd9d1e6
Merge pull request #44768 from thaJeztah/vendor_containerd_1.6.15 2023-01-09 13:23:54 -08:00
Tianon Gravi
a558074474
Merge pull request #43248 from thaJeztah/cleanup_translateContainerdStartErr
daemon: refactor translateContainerdStartErr() and remove unused argument
2023-01-09 13:23:19 -08:00
Bjorn Neergaard
cba3edbc37
daemon/config: group JSON preprocessing steps
Signed-off-by: Bjorn Neergaard <bneergaard@mirantis.com>
2023-01-09 13:17:32 -07:00
Bjorn Neergaard
bb19265ba8
daemon/config: ignore UTF-8 BOM in config JSON
[RFC 8259] allows for JSON implementations to optionally ignore a BOM
when it helps with interoperability; do so in Moby as Notepad (the only
text editor available out of the box in many versions of Windows Server)
insists on writing UTF-8 with a BOM.

  [RFC 8259]: https://tools.ietf.org/html/rfc8259#section-8.1

Signed-off-by: Bjorn Neergaard <bneergaard@mirantis.com>
2023-01-09 13:16:57 -07:00
Jan Garcia
6ab12ec8f4 rootless: move ./rootless to ./pkg/rootless
Signed-off-by: Jan Garcia <github-public@n-garcia.com>
2023-01-09 16:26:06 +01:00
Jan Garcia
c1bd5e9144 Use user paths for plugin discovery in rootless mode
Signed-off-by: Jan Garcia <github-public@n-garcia.com>
2023-01-09 16:26:06 +01:00
Sebastiaan van Stijn
bffe6d5670
vendor: github.com/containerd/containerd v1.6.15
no changes to vendored files

full diff: https://github.com/containerd/containerd/compare/v1.6.14...v1.6.15

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-01-09 13:26:32 +01:00
Sebastiaan van Stijn
eaa7b49bd6
Merge pull request #44749 from vvoland/fix-test-race-logs-goroutines
integration-cli: Fix hangs in TestLogsFollowGoroutines*
2023-01-09 13:00:14 +01:00
Akihiro Suda
89fb8b32f6
graphdriver/btrfs: needs kernel headers >= 4.12, not >= 4.7
`linux/btrfs_tree.h` was not installed to `/usr/include` until kernel 4.12
fcc8487d47

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-01-08 05:04:47 +09:00
Josh Chorlton
c12d7b6d21 upgrade to aws sdk go v2
Co-Authored-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Josh Chorlton <jchorlton@gmail.com>
Signed-off-by: Cory Snider <csnider@mirantis.com>
Signed-off-by: Josh Chorlton <jchorlton@gmail.com>
2023-01-07 17:27:31 +00:00
Bjorn Neergaard
6834304feb
Merge pull request #44761 from neersighted/btrfs_uapi
graphdriver/btrfs: depend on kernel UAPI instead of libbtrfs
2023-01-06 15:20:20 -07:00
Bjorn Neergaard
aa80c33360
Dockerfile.*: drop libbtrfs
This is no longer necessary after the switch to the kernel UAPI.

Signed-off-by: Bjorn Neergaard <bneergaard@mirantis.com>
2023-01-06 13:23:09 -07:00
Bjorn Neergaard
c9d632e485
PACKAGERS: update Btrfs graphdriver dependencies
We only need suitable UAPI headers now. They are available on kernel 4.7
and newer; out of the distributions currently in support that users
might be interested in, only Enterprise Linux 7 has too old a kernel
(3.10).

Users of Enterprise Linux 7 distros can compile using a newer platform,
disable the Btrfs graphdriver as documented in this file, or use newer
kernel headers on their older distro.

Signed-off-by: Bjorn Neergaard <bneergaard@mirantis.com>
2023-01-06 13:23:06 -07:00
Bjorn Neergaard
d3778d65fa
graphdriver/btrfs: use free wrapper consistently
While the Cgo in this entire file is quite questionable, that is a task
for another day.

Signed-off-by: Bjorn Neergaard <bneergaard@mirantis.com>
2023-01-06 13:23:05 -07:00
Bjorn Neergaard
3208dcabdc
graphdriver/btrfs: use kernel UAPI headers
By relying on the kernel UAPI (userspace API), we can drop a dependency
and simplify building Moby, while also ensuring that we are using a
stable/supported source of the C types and defines we need.

btrfs-progs mirrors the kernel headers, but the headers it ships with
are not the canonical source and as [we have seen before][44698], could
be subject to changes.

Depending on the canonical headers from the kernel both is more
idiomatic, and ensures we are protected by the kernel's promise to not
break userspace.

  [44698]: https://github.com/moby/moby/issues/44698

Signed-off-by: Bjorn Neergaard <bneergaard@mirantis.com>
2023-01-06 13:22:58 -07:00
Bjorn Neergaard
1449c82484
graphdriver/btrfs: drop version information
This is actually quite meaningless as we are reporting the libbtrfs
version, but we do not use libbtrfs. We only use the kernel interface to
btrfs instead.

While we could report the version of the kernel headers in play, they're
rather all-or-nothing: they provide the structures and defines we need,
or they don't. As such, drop all version information as the host kernel
version is the only thing that matters.

Signed-off-by: Bjorn Neergaard <bneergaard@mirantis.com>
2023-01-06 11:13:23 -07:00
Sebastiaan van Stijn
937491288e
Merge pull request #43818 from thaJeztah/image_inspect
add support for image inspect with containerd-integration
2023-01-06 17:40:15 +01:00
Brian Goff
73e09ddecf
Merge pull request #43787 from thaJeztah/memdb_nits
container: ViewDB: cleanup error-types
2023-01-06 08:09:06 -08:00
Sebastiaan van Stijn
8fb13036ee
Merge pull request #44754 from tianon/requireRegistryMatch
Remove reference to "requireRegistryMatch"
2023-01-05 22:10:15 +01:00
Tianon Gravi
fdcab58ccf Remove reference to "requireRegistryMatch"
This option appears to never have actually existed in the merged implementation. 😄

Signed-off-by: Tianon Gravi <admwiggin@gmail.com>
2023-01-05 11:28:22 -08:00
Sebastiaan van Stijn
57af88a654
Merge pull request #44748 from vvoland/buildflags-nopie-whenrace
hack/make: Don't add -buildmode=pie with -race
2023-01-05 20:24:21 +01:00
Bjorn Neergaard
9353fc6a27
Merge pull request #44744 from KirkEasterson/kirk/fix-broken-contributing-link
Updated outdated docker contributing guidelines link
2023-01-05 10:48:10 -07:00
Bjorn Neergaard
9409b5623d
Merge pull request #44746 from crazy-max/fix-binary-daemon
hack: restore copy_binaries func
2023-01-05 10:45:53 -07:00
Paweł Gronowski
deb4910c5b
integration-cli: Fix hanging TestLogsFollowGoroutines*
cmd.Wait is called twice from different goroutines which can cause the
test to hang completely. Fix by calling Wait only once and sending its
return value over a channel.

In TestLogsFollowGoroutinesWithStdout also added additional closes and
process kills to ensure that we don't leak anything in case test returns
early because of failed test assertion.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2023-01-05 18:10:32 +01:00
Bjorn Neergaard
e9275392c1
Merge pull request #44742 from akerouanton/fix-44688
Clear conntrack entries for published UDP ports
2023-01-05 10:04:29 -07:00
Nicolas De Loof
1616a09b61 add support for image inspect with containerd-integration
This is a squashed version of various PRs (or related code-changes)
to implement image inspect with the containerd-integration;

- add support for image inspect
- introduce GetImageOpts to manage image inspect data in backend
- GetImage to return image tags with details
- list images matching digest to discover all tags
- Add ExposedPorts and Volumes to the image returned
- Refactor resolving/getting images
- Return the image ID on inspect
- consider digest and ignore tag when both are set
- docker run --platform

Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-01-05 16:20:41 +01:00
Paweł Gronowski
bbe6e9e8d1
hack/make: Don't add -buildmode=pie with -race
Make it possible to add `-race` to the BUILDFLAGS without making the
build fail with error:
"-buildmode=pie not supported when -race is enabled"

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2023-01-05 15:28:03 +01:00