Commit graph

39395 commits

Author SHA1 Message Date
Sebastiaan van Stijn
a5044765b9
Merge pull request #42479 from AkihiroSuda/cherrypick-42071
[20.10 backport] Fix setting swaplimit=true without checking
2021-07-15 20:44:23 +02:00
Sebastiaan van Stijn
8a2af96969
Merge pull request #42591 from thaJeztah/20.10_backport_update_s390x_ubuntu_2004
[20.10 backport] Run s390x tests on Ubuntu 20.04
2021-07-15 20:42:09 +02:00
Sebastiaan van Stijn
c37c7b5c95
Merge pull request #42613 from thaJeztah/20.10_update_hcsshim
[20.10] vendor github.com/Microsoft/hcsshim 64a2b71405dacf76c95600f4c756a991ad09cf7c (moby branch)
2021-07-15 20:39:53 +02:00
Brian Goff
883cc3682d
Merge pull request #42602 from thaJeztah/20.10_backport_swagger_404
[20.10 backport] API: fix 404 status description on container create
2021-07-15 11:34:29 -07:00
Brian Goff
a1a73d1477
Merge pull request #42568 from thaJeztah/20.10_backport_runc_v1.0.0
[20.10 backport] update runc binary to v1.0.0 GA
2021-07-15 11:32:20 -07:00
Brian Goff
555bf586c7
Merge pull request #42637 from thaJeztah/20.10_update_containerd
[20.10] update containerd binary to v1.4.7
2021-07-15 11:30:13 -07:00
Sebastiaan van Stijn
4b407e4140
Merge pull request #42595 from thaJeztah/20.10_backport_update_swagger_fork
[20.10 backport] Dockerfile: update go-swagger to fix validation on Go1.16
2021-07-14 10:11:59 +02:00
Sebastiaan van Stijn
793340a33a
[20.10] update containerd binary to v1.4.7
full diff: https://github.com/containerd/containerd/compare/v1.4.6...v1.4.7

Welcome to the v1.4.7 release of containerd!

The seventh patch release for containerd 1.4 updates runc to 1.0.0 and contains
various other fixes.

Notable Updates

- Update runc binary to 1.0.0
- Fix invalid validation error checking
- Fix error on image pull resume
- Fix symlink resolution for disk mounts on Windows

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-07-13 23:41:22 +02:00
Sebastiaan van Stijn
72b66d56a5
[20.10] vendor github.com/Microsoft/hcsshim 64a2b71405dacf76c95600f4c756a991ad09cf7c (moby branch)
Brings in microsoft/hcsshim#1065, which fixes #42610.

full diff: 89a9a3b524...64a2b71405

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-07-09 20:06:40 +02:00
Sebastiaan van Stijn
50c392c9ff
API: fix 404 status description on container create
This updates the current swagger file, and all docs versions
with the same fix as ff1d9a3ec5

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 68b095d4df)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-07-07 11:50:43 +02:00
Matt Morrison
025e3a7898
Update v1.41.yaml
fix containers/create 404 response description

Signed-off-by: Matt Morrison <3241034+Emdot@users.noreply.github.com>
(cherry picked from commit ff1d9a3ec5)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-07-07 11:50:26 +02:00
Sebastiaan van Stijn
78bb0f445a
Dockerfile: update go-swagger to fix validation on Go1.16
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 42d2048b9d)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-07-03 17:23:07 +02:00
Stefan Scherer
618f6a79ab
Run s390x tests on Ubuntu 20.04
Signed-off-by: Stefan Scherer <stefan.scherer@docker.com>
(cherry picked from commit 7a6cac2b23)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-07-02 14:41:13 +02:00
Akihiro Suda
872cb16edb
update runc binary to v1.0.0 GA
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
(cherry picked from commit 64badfc018)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-06-24 22:19:37 +02:00
Sebastiaan van Stijn
46a7ebc540
Merge pull request #42561 from ameyag/20.10-logbroker
[20.10] vendor: swarmkit to fix deadlock in log broker (bump_20.10)
2021-06-24 15:23:30 +02:00
Ameya Gawde
4d42e18c05
vendor: swarmkit to fix deadlock in log broker
Signed-off-by: Ameya Gawde <agawde@mirantis.com>
2021-06-23 16:45:51 -07:00
Akihiro Suda
87e28a6171
Merge pull request #42538 from ameyag/20.10-overlap-ip
[20.10 backport] Fix possible overlapping IPs
2021-06-19 18:05:46 +09:00
Drew Erny
89edb68e89
Fix possible overlapping IPs
A node is no longer using its load balancer IP address when it no longer
has tasks that use the network that requires that load balancer. When
this occurs, the swarmkit manager will free that IP in IPAM, and may
reaassign it.

When a task shuts down cleanly, it attempts removal of the networks it
uses, and if it is the last task using those networks, this removal
succeeds, and the load balancer IP is freed.

However, this behavior is absent if the container fails. Removal of the
networks is never attempted.

To address this issue, I amend the executor. Whenever a node load
balancer IP is removed or changed, that information is passedd to the
executor by way of the Configure method. By keeping track of the set of
node NetworkAttachments from the previous call to Configure, we can
determine which, if any, have been removed or changed.

At first, this seems to create a race, by which a task can be attempting
to start and the network is removed right out from under it. However,
this is already addressed in the controller. The controller will attempt
to recreate missing networks before starting a task.

Signed-off-by: Drew Erny <derny@mirantis.com>
(cherry picked from commit 0d9b0ed678)
Signed-off-by: Ameya Gawde <agawde@mirantis.com>
2021-06-18 10:13:59 -07:00
Tianon Gravi
4d29d58a65
Merge pull request #42507 from thaJeztah/20.10_backport_disable_power_z
[20.10 backport] Jenkinsfile: skip ppc64le and s390x by default on pull requests
2021-06-10 12:06:52 -07:00
Sebastiaan van Stijn
523f8b397c
Jenkinsfile: skip ppc64le and s390x by default on pull requests
This changes CI to skip these platforms by default. The ppc64le and s390x
machines are "pet machines", configuration may be outdated, and these
machines are known to be flaky.

Building and verifying packages for these platforms is being handed
over to the IBM team.

We can still run these platforms for specific pull requests by selecting
the checkboxes.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 82c7e906ea)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-06-10 14:05:07 +02:00
Jakub Guzik
a57fc0eb15
Fix setting swaplimit=true without checking
Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
(cherry picked from commit 7ef6ece774)
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-06-07 17:27:35 +09:00
Brian Goff
b0f5bc36fe
Merge pull request #42352 from AkihiroSuda/cherrypick-41724
[20.10 backport] Use v2 capabilities in layer archives
2021-06-01 15:34:42 -07:00
Brian Goff
497c50a575
Merge pull request #42448 from thaJeztah/20.10_backport_update_buildkit
[20.10 backport] vendor: github.com/moby/buildkit v0.8.3-3-g244e8cde
2021-06-01 15:13:27 -07:00
Sebastiaan van Stijn
6474dada20
vendor: github.com/moby/buildkit v0.8.3-3-g244e8cde
full diff: https://github.com/moby/buildkit/compare/v0.8.3...v0.8.3-3-g244e8cde

- Transform relative mountpoints for exec mounts in the executor
- Add test for handling relative mountpoints

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 61b04b3a02)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-05-31 16:08:36 +02:00
Sebastiaan van Stijn
895eaacdd4
vendor: github.com/moby/buildkit v0.8.3
full diff: https://github.com/moby/buildkit/compare/v0.8.2...v0.8.3

- vendor containerd (required for rootless overlayfs on kernel 5.11)
    - not included to avoid depending on a fork
- Add retry on image push 5xx errors
- contenthash: include basename in content checksum for wildcards
- Fix missing mounts in execOp cache map
- Add regression test for run cache not considering mounts
- Add hack to preserve Dockerfile RUN cache compatibility after mount cache bugfix

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 79ee285d76)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-05-31 16:08:33 +02:00
Sebastiaan van Stijn
eab37e5676
Merge pull request #42413 from thaJeztah/20.10_backport_bump_libnetwork
[20.10 backport] vendor: github.com/docker/libnetwork 64b7a4574d1426139437d20e81c0b6d391130ec8
2021-05-27 10:44:33 +02:00
Akihiro Suda
d844987b77
Merge pull request #42421 from thaJeztah/20.10_backport_more_ignore 2021-05-27 02:46:50 +09:00
Sebastiaan van Stijn
003e3c0551
pkg/signal: ignore SIGURG on all platforms
Other Unix platforms (e.g. Darwin) are also affected by the Go
runtime sending SIGURG.

This patch changes how we match the signal by just looking for the
"URG" name, which should handle any platform that has this signal
defined in the SignalMap.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 05f520dd3c)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-05-25 21:42:21 +02:00
Sebastiaan van Stijn
95551168ac
vendor: github.com/ishidawataru/sctp f2269e66cdee387bd321445d5d300893449805be
full diff: 6e2cb13661...f2269e66cd

- support SO_SNDBUF/SO_RCVBUF handling
- Support Go Modules
- license clarificaton
- ci: drop 1.6, 1.7, 1.8 support
- Add support for SocketConfig
- support goarch mips64le architecture.
- fix possible socket leak when bind fails

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 22b9e2a7e5)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-05-25 11:39:46 +02:00
Sebastiaan van Stijn
d29a55c6c3
vendor: github.com/docker/libnetwork 64b7a4574d1426139437d20e81c0b6d391130ec8
Update libnetwork to make `docker run -p 80:80` functional again on environments
with kernel boot parameter `ipv6.disable=1`.

full diff: b3507428be...64b7a4574d

- fix port forwarding with ipv6.disable=1
    - fixes moby/moby/42288 Docker 20.10.6: all containers stopped and cannot start if ipv6 is disabled on host
    - fixes docker/libnetwork/2629 Network issue with IPv6 following update to version 20.10.6
    - fixesdocker/for-linux/1233 Since 20.10.6 it's not possible to run docker on a machine with disabled IPv6 interfaces
- vendor: github.com/ishidawataru/sctp f2269e66cdee387bd321445d5d300893449805be
- Enforce order of lock acquisitions on network/controller, fixes #2632
    - fixes docker/libnetwork/2632 Name resolution stuck due to deadlock between different network struct methods
    - fixes moby/moby/42032 Docker deamon get's stuck, can't serve DNS requests

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit e4109b3b6b)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-05-25 11:39:44 +02:00
Brian Goff
3db8385b18
Merge pull request #42382 from thaJeztah/20.10_backport_schema1_cache_fix
[20.10 backport] builder-next: relax second cache key requirements for schema1
2021-05-20 12:08:53 -07:00
Brian Goff
df371af560
Merge pull request #42401 from thaJeztah/20.10_catch_almost_all
[20.10 backport] pkg/signal.CatchAll: ignore SIGURG on Linux
2021-05-20 11:08:47 -07:00
Sebastiaan van Stijn
c1ebb81514
Merge pull request #42398 from thaJeztah/20.10_update_containerd_1.4.6
[20.10] update containerd binary to v1.4.6
2021-05-20 12:33:05 +02:00
Sebastiaan van Stijn
41cf01fa93
pkg/signal.CatchAll: ignore SIGURG on Linux
Do not handle SIGURG on Linux, as in go1.14+, the go runtime issues
SIGURG as an interrupt to support preemptable system calls on Linux.

This issue was caught in TestCatchAll, which could fail when updating to Go 1.14 or above;

    === Failed
    === FAIL: pkg/signal TestCatchAll (0.01s)
        signal_linux_test.go:32: assertion failed: urgent I/O condition (string) != continued (string)
        signal_linux_test.go:32: assertion failed: continued (string) != hangup (string)
        signal_linux_test.go:32: assertion failed: hangup (string) != child exited (string)
        signal_linux_test.go:32: assertion failed: child exited (string) != illegal instruction (string)
        signal_linux_test.go:32: assertion failed: illegal instruction (string) != floating point exception (string)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit b7ebf32ba3)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-05-20 10:11:39 +02:00
Sebastiaan van Stijn
a23a880c6e
Merge pull request #42395 from thaJeztah/20.10_backport_runc_rc95
[20.10 backport] update runc binary to v1.0.0-rc95
2021-05-19 20:49:52 +02:00
Sebastiaan van Stijn
56541eca9a
[20.10] update containerd binary to v1.4.6
full diff: https://github.com/containerd/containerd/compare/v1.4.5...v1.4.6

The sixth patch release for containerd 1.4 is a security release to update
runc for CVE-2021-30465

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-05-19 20:43:04 +02:00
Sebastiaan van Stijn
fb179ff098
update runc binary to v1.0.0-rc95
full diff: https://github.com/opencontainers/runc/compare/v1.0.0-rc94...v1.0.0-rc95

Release notes:

This release of runc contains a fix for CVE-2021-30465, and users are
strongly recommended to update (especially if you are providing
semi-limited access to spawn containers to untrusted users).

Aside from this security fix, only a few other changes were made since
v1.0.0-rc94 (the only user-visible change was the addition of support
for defaultErrnoRet in seccomp profiles).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit efec2bb368)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-05-19 13:20:30 +02:00
Akihiro Suda
989c08c367
Merge pull request #42388 from thaJeztah/20.10_backport_update_runc
[20.10 backport] Update runc binary to v1.0.0-rc94
2021-05-19 12:26:26 +09:00
Akihiro Suda
4c801fdb7d
integration: remove KernelMemory tests
Starting with runc v1.0.0-rc94, runc no longer supports KernelMemory.

52390d6804

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
(cherry picked from commit 2f0d6664a1)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-05-18 09:25:38 +02:00
Jintao Zhang
6174e3cf22
Update runc binary to v1.0.0-rc94
Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
(cherry picked from commit 8c019e830a)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-05-18 09:25:36 +02:00
Akihiro Suda
afbb1277a3
Swarm config: use absolute paths for mount destination strings
Needed for runc >= 1.0.0-rc94.

See runc issue 2928.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 9303376242)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-05-18 09:25:34 +02:00
Tonis Tiigi
94c1890d39
builder-next: relax second cache key requirements for schema1
Schema1 images can not have a config based cache key
before the layers are pulled. Avoid validation and reuse
manifest digest as a second key.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 85167fc634)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-05-17 14:58:16 +02:00
Akihiro Suda
e4b9915803
Merge pull request #42372 from thaJeztah/20.10_containerd_1.4.5
[20.10] update containerd binary to v1.4.5
2021-05-13 12:51:54 +09:00
Sebastiaan van Stijn
01f734cb4f
[20.10] update containerd binary to v1.4.5
release notes: https://github.com/containerd/containerd/releases/tag/v1.4.5

- Update runc to rc94
- Fix leaking socket path in runc shim v2
- Fix cleanup logic in new container in runc shim v2
- Fix registry mirror authorization logic in CRI plugin
- Add support for userxattr in overlay snapshotter for kernel 5.11+

(Note that the update to runc is done separately)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-05-12 10:46:44 +02:00
Sebastiaan van Stijn
e3cb5adc0d
Merge pull request #42292 from cpuguy83/20.10_hcsshim_no_error_details
[20.10] Bump hcsshim for error details fix
2021-05-06 16:35:18 +02:00
Eric Mountain
2a0c446866
Use v2 capabilities in layer archives
When building images in a user-namespaced container, v3 capabilities are
stored including the root UID of the creator of the user-namespace.

This UID does not make sense outside the build environment however. If
the image is run in a non-user-namespaced runtime, or if a user-namespaced
runtime uses a different UID, the capabilities requested by the effective
bit will not be honoured by `execve(2)` due to this mismatch.

Instead, we convert v3 capabilities to v2, dropping the root UID on the
fly.

Signed-off-by: Eric Mountain <eric.mountain@datadoghq.com>
(cherry picked from commit 95eb490780)
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-05-05 21:46:31 +09:00
Brian Goff
614a70a11b
Merge pull request #42294 from AkihiroSuda/rootlesskit-0.14.2-2010
[20.10 backport] bump up rootlesskit to v0.14.2 (Fix `Timed out proxy starting the userland proxy.` error with `DOCKERD_ROOTLESS_ROOTLESSKIT_PORT_DRIVER=slirp4netns`)
2021-04-30 09:18:11 -07:00
Tianon Gravi
114310d76a
Merge pull request #42342 from AkihiroSuda/dind-fix-cgroup2-evac-2010
[20.10 backport] hack/dind: fix cgroup v2 evacuation with `docker run --init`
2021-04-30 08:10:12 -07:00
Akihiro Suda
21391bb7f7
hack/dind: fix cgroup v2 evacuation with docker run --init
Evacuate all the processes in `/sys/fs/cgroup/cgroup.procs`, not just PID 1.

Before:
```console
$ docker run --rm --privileged --init $(docker build -q .) cat /sys/fs/cgroup/cgroup.subtree_control
sed: couldn't flush stdout: Device or resource busy
```

After:
```console
$ docker run --rm --privileged --init $(docker build -q .) cat /sys/fs/cgroup/cgroup.subtree_control
cpuset cpu io memory hugetlb pids rdma
```

Fix docker-library/docker issue 308

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
(cherry picked from commit 42b1175eda)
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-04-30 19:08:07 +09:00
Brian Goff
12b03bcb27 Error string match: do not match command path
Whether or not the command path is in the error message is a an
implementation detail.
For example, on Windows the only reason this ever matched was because it
dumped the entire container config into the error message, but this had
nothing to do with the actual error.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 225e046d9d)
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2021-04-27 18:46:33 +00:00