Commit graph

39295 commits

Author SHA1 Message Date
Sebastiaan van Stijn
e1bba7456d
Merge pull request #41712 from tiborvass/fix-ipvalidation-portmapper
vendor libnetwork to fix mix up between IPv4 and IPv6
2020-11-25 14:47:54 +01:00
Brian Goff
35390305e8
Merge pull request #41667 from kplachkov/feature/fix_client_error_handling
Fix error handling
2020-11-24 15:33:02 -08:00
Tibor Vass
22e31dbd9a vendor libnetwork to fix mix up between IPv4 and IPv6
Signed-off-by: Tibor Vass <tibor@docker.com>
2020-11-24 23:22:31 +00:00
Sebastiaan van Stijn
e1b15e1e5b
Merge pull request #41625 from sparrc/delete-task-timeout
handleContainerExit: timeout on containerd DeleteTask
2020-11-24 14:24:21 +01:00
Akihiro Suda
ab09458e21
dockerd-rootless-setuptool.sh: show more helpful error messages
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-11-24 15:10:27 +09:00
Sebastiaan van Stijn
776cadc7db
vendor: gotest.tools v3.0.3
- assert: fixes a bug that would cause a panic if there were any
  function calls before `assert.Check` on the same line
- golden: create the directory if it does not exist, when run with
  `-test.update-golden`

full diff: https://github.com/gotestyourself/gotest.tools/compare/v3.0.2...v3.0.3

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-11-23 12:33:57 +01:00
Kostadin Plachkov
aeddf93de0 Implement Unwrap to errors
Signed-off-by: Kostadin Plachkov <k.n.plachkov@gmail.com>
2020-11-21 16:36:35 +01:00
Sebastiaan van Stijn
73571e4689
vendor: github.com/moby/buildkit v0.8.0-rc2
full diff: 6861f17f15...v0.8.0-rc2

- dockerfile: rename experimental channel to labs
- dockerfile build: fix not exit when meet error in load config metadata
- copy containerd.UnknownExitStatus to local const to reduce dependency graph in client
- executor: switch to docker seccomp profile
- add retry handlers to push/pull
- SSH-based auth for llb.Git operations
- Allow gateway exec-ing into a failed solve with an exec op
- Fix parsing ssh-based git sources
- Fix sshkeyscan to work with ipv6
- fix assumption that ssh port must be 2 digits
- vendor: github.com/Microsoft/go-winio v0.4.15
- vendor: github.com/tonistiigi/fsutil v0.0.0-20201103201449-0834f99b7b85
- vendor: containerd v1.4.1-0.20201117152358-0edc412565dc
- vendor: golang.org/x/crypto v0.0.0-20201117144127-c1f2f97bffc9

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-11-19 10:31:35 +01:00
Sebastiaan van Stijn
1f88736871
vendor: github.com/containerd/containerd 0edc412565dcc6e3d6125ff9e4b009ad4b89c638
full diff: d4e78200d6...0edc412565

- integrates containerd/cri into main containerd repository
- seccomp: add `pidfd_open` and `pidfd_send_signal`
- seccomp: add `pidfd_getfd` syscall (gated by `CAP_SYS_PTRACE`)
- docker: don’t hide pusher response error

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-11-19 10:30:54 +01:00
Sebastiaan van Stijn
8eebe32f5c
vendor: github.com/containerd/cgroups 0b889c03f102012f1d93a97ddd3ef71cd6f4f510
full diff: 318312a373...0b889c03f1

- v1/stats: add all fields of memory.oom_control
- memory: remove wrong memory.kmem.limit_in_bytes check
- CI: test against Go 1.15

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-11-19 10:30:52 +01:00
Sebastiaan van Stijn
ba475d44a7
vendor: github.com/containerd/fifo 0724c46b320cf96bb172a0550c19a4b1fca4dacb
full diff: f15a329036...0724c46b32

- Add OpenFifoDup2
- use golang.org/x/sys/unix for dup2 (fixes build on arm64)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-11-19 10:30:50 +01:00
Sebastiaan van Stijn
37da117aba
vendor: github.com/containerd/ttrpc v1.0.2
full diff: https://github.com/containerd/ttrpc/compare/v1.0.1...v1.0.2

- fix bug, failed to assert net error due to error wrap
    - fixes: ttrpc client receive "read: connection reset by peer: unknown"
- client: add UserOnCloseWait function
- travis: add go 1.15

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-11-19 10:30:48 +01:00
Sebastiaan van Stijn
1725a1493e
vendor github.com/tonistiigi/fsutil 0834f99b7b85462efb69b4f571a4fa3ca7da5ac9
c3ed55f3b4...0834f99b7b

- copy: use Clonefileat from golang.org/x/sys/unix on macOS
- go.mod: update opencontainers/go-digest v1.0.0
- Add github action CI
- github: test go1.15

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-11-19 10:30:45 +01:00
Sebastiaan van Stijn
fa592fa7b2
vendor: golang.org/x/crypto c1f2f97bffc9c53fc40a1a28a5b460094c0050d9
full diff: 75b288015a...c1f2f97bff

relevant changes:

- pkcs12: document that we use the wrong PEM type
- pkcs12: drop PKCS#12 attributes with unknown OIDs
- ocsp: Improve documentation for ParseResponse and ParseResponseForCert

other changes (not in vendor);

- ssh: improve error message for KeyboardInteractiveChallenge
- ssh: remove slow unnecessary diffie-hellman-group-exchange primality check
- ssh/terminal: replace with a golang.org/x/term wrapper
    - Deprecates ssh/terminal in favor of golang.org/x/term
- ssh/terminal: add support for zos
- ssh/terminal: bump x/term dependency to fix js/nacl
- nacl/auth: use Size instead of KeySize for Sum output
- sha3: remove go:nocheckptr annotation

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-11-19 10:30:16 +01:00
Sebastiaan van Stijn
6c0a036dce
Merge pull request #41695 from thaJeztah/bump_term
vendor: github.com/moby/term bea5bbe245bf407372d477f1361d2ff042d2f556
2020-11-19 07:51:25 +01:00
Sebastiaan van Stijn
c7f0b509cf
vendor: github.com/moby/term bea5bbe245bf407372d477f1361d2ff042d2f556
full diff: 7f0af18e79...bea5bbe245

- Fix windows integer overflow on GOOS=windows, GOARCH=arm
- go.mod: github.com/creack/pty v1.1.11
  - v1.1.11: Add arm support for OpenBSD
  - v1.1.10: Fix CTTY to work with go1.15
- CI: fix Go version matrix, and drop go 1.12, add go 1.15
- CI: remove "sudo" to fix incorrect Go versions (incorrect PATH, GOROOT)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-11-19 00:29:13 +01:00
Sebastiaan van Stijn
74455dcbb1
Merge pull request #41684 from ameyag/bmp-libnetwork-nil-deference
vendor: docker/libnetwork 6b51d028f4bbb9a4cc8d3eaba13baa9f848af546
2020-11-18 15:24:37 +01:00
Sebastiaan van Stijn
27801b9ef8
vendor: update github.com/Microsoft/hcsshim v0.8.10 (back to tagged release)
This switches the hcsshim dependency back to tagged releases, instead of the special
"moby" branch. This makes the dependency align with both BuildKit and containerd,
which use these versions.

The switch to the "moby" branch was done in 2865478487,
to bring in a fix for image import, without having to bring in additional changes;

> We changed to the moby branch for a couple of reasons:
>
> - Allows us to take this important change without needing to also pull in all
>   of the other work that has been going on in the repo.
> - moby uses an older set of APIs exposed from hcsshim, based on the HCS v1
>   functionality. Going forwards, we have discussed deprecating/removing these
>   APIs from the mainline branch in hcsshim, so our thinking was we could keep
>   this moby branch around to ensure we don't break compatibility there.
>
> (...) Long term, the best path here is to get moby using containerd as the
> backend on Windows, which should alleviate these issues.

full diff: 9dcb42f100..v0.8.10

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-11-18 11:49:55 +01:00
Ameya Gawde
2630994b35
Bump libnetwork
Signed-off-by: Ameya Gawde <agawde@mirantis.com>
2020-11-17 16:03:27 -08:00
Tibor Vass
131bf7e685
Merge pull request #41677 from thaJeztah/go_winio
vendor: github.com/Microsoft/go-winio v0.4.15 was tagged
2020-11-17 02:12:11 -08:00
Tibor Vass
12fe77c7ea
Merge pull request #41607 from cpuguy83/use_head_for_manifest_by_tag
cache manifests on pull
2020-11-16 21:27:43 -08:00
Tibor Vass
cf0ce96eb1
Merge pull request #41601 from tiborvass/bk_vendor
vendor buildkit 6861f17f15364de0fe1fd1e6e8da07598a485123
2020-11-16 21:22:12 -08:00
정재영
19eda6b9a2 Update daemon_linux.go for preventing off-by-one
Array length should be bigger than 5, when accessing index 4

Signed-off-by: J-jaeyoung <jjy600901@gmail.com>
2020-11-17 14:08:48 +09:00
Tibor Vass
dbffbe8f9b builder-next: fix platform-specific behavior
Signed-off-by: Tibor Vass <tibor@docker.com>
2020-11-17 02:33:01 +00:00
Sebastiaan van Stijn
be67385209
Merge pull request #41626 from cuonglm/master
pkg/devicemapper: fix invalid usage of reflect.SliceHeader
2020-11-16 23:05:50 +01:00
Sebastiaan van Stijn
f4214ec847
vendor: github.com/Microsoft/go-winio v0.4.15 was tagged
Same commit as we were already vendoring, so only updating the
comment.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-11-16 14:15:24 +01:00
Cam
05c20a6e1c
handleContainerExit: put a timeout on containerd DeleteTask
Also move c.Lock() below containerd delete task, as it doesn't seem that
there is any necessity to hold the container lock while containerd is
killing the task.

This fixes a potential edge-case where containerd delete task hangs, and
thereafter all operations on the container would hang forever, as this
function is holding onto the container lock.

Signed-off-by: Cam <gh@sparr.email>
2020-11-14 15:23:29 -08:00
Tibor Vass
beff0a5f2c integration-cli: remove TestBuildContChar
This old test is failing after an edge-case change in dockerfile
parsing considered a bugfix: https://github.com/moby/buildkit/pull/1559

Instead of fixing the test, I suggest removing it as there are already
tests for it in BuildKit.

Signed-off-by: Tibor Vass <tibor@docker.com>
2020-11-14 03:57:36 +00:00
Tibor Vass
39f9c1b5d1 builder-next: fix --cache-from panic
Signed-off-by: Tibor Vass <tibor@docker.com>
2020-11-14 03:57:36 +00:00
Tibor Vass
8f464ae2ab builder-next: refactor to use flighcontrol and remove resolveOnce
Signed-off-by: Tibor Vass <tibor@docker.com>
2020-11-14 03:57:36 +00:00
Tibor Vass
1b1eb094cc builder-next: simple refactor
Signed-off-by: Tibor Vass <tibor@docker.com>
2020-11-14 03:57:36 +00:00
Tibor Vass
3756668adb builder-next: Refactor using buildkit's resolver pool
Signed-off-by: Tibor Vass <tibor@docker.com>
2020-11-14 03:57:36 +00:00
Tibor Vass
de56a90929 vendor buildkit 6861f17f15364de0fe1fd1e6e8da07598a485123
Signed-off-by: Tibor Vass <tibor@docker.com>
2020-11-14 03:57:36 +00:00
Justin Cormack
b6bfff2a62
Merge pull request #41665 from mikroskeem/41664-pidfd-syscalls-support
seccomp: add pidfd syscalls
2020-11-13 10:58:59 +00:00
Tibor Vass
4217958ca6
Merge pull request #41629 from thaJeztah/bump_pty
vendor: github.com/creack/pty v1.1.11 (includes fixes for go 1.15)
2020-11-12 21:55:26 -08:00
Brian Goff
13b09180b5
Merge pull request #41660 from thaJeztah/remove_e2e_stage
Jenkinsfile: remove e2e image stage
2020-11-12 11:20:18 -08:00
Mark Vainomaa
f7bcb02f67
seccomp: Add pidfd_getfd syscall
Signed-off-by: Mark Vainomaa <mikroskeem@mikroskeem.eu>
2020-11-12 15:31:07 +02:00
Mark Vainomaa
5e3ffe6464
seccomp: Add pidfd_open and pidfd_send_signal
Signed-off-by: Mark Vainomaa <mikroskeem@mikroskeem.eu>
2020-11-11 15:20:34 +02:00
Sebastiaan van Stijn
af34b94a78
Merge pull request #41659 from thaJeztah/system_fix_darwin
pkg/system: fix compile on darwin (macOS)
2020-11-10 22:19:21 +01:00
Tibor Vass
228d800f5c
Merge pull request #41658 from thaJeztah/replace_deprecated_mount
testutil: remove remaining use of deprecated pkg/mount
2020-11-10 12:41:03 -08:00
Sebastiaan van Stijn
2b41e84719
pkg/system: fix compile on darwin (macOS)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-11-10 20:49:09 +01:00
Sebastiaan van Stijn
b4b902b88f
Jenkinsfile: remove e2e image stage
The image that's built is not pushed anywhere, and is just
building the same as the main image already builds, so didn't
add value.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-11-10 18:42:13 +01:00
Sebastiaan van Stijn
6d243cdf27
testutil: remove remaining use of deprecated pkg/mount
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-11-10 14:46:59 +01:00
Paul "TBBle" Hampson
1571e9331b Use specific APIs for shared mount-point behaviour
Thanks to @cpuguy83 for pointing these APIs out in #41638.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-11-10 20:00:48 +11:00
Paul "TBBle" Hampson
695b151a18 Work around small disk on Windows-RS5 CI nodes
The free disk space on the Windows RS5 CI nodes appears to be just the
right size that the TestBuildWCOWSandboxSize test can generate 21GB of
layers, and then a 21GB sandbox inside a container, and then runs out of
space while committing the layer.

Helpfully, this failure is distinguishable in the logs from a failure
when the sandbox is too small, so we can do that.

TODO: Revert this if-and-when the Windows-RS5 CI nodes have more free
space.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-11-10 19:51:46 +11:00
Paul "TBBle" Hampson
db7b7f6df9 Parse storage-opt in GraphDriver init on Windows
This ensures the storage-opts applies to all operations by the graph
drivers, replacing the merging of storage-opts into container storage
config at container-creation time, and hence applying storage-opts to
non-container operations like `COPY` and `ADD` in the builder.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-11-10 19:51:46 +11:00
Paul "TBBle" Hampson
56d378a88f Apply a 127GB default WCOW Sandbox size globally
This applies the 127GB default WCOW Sandbox size to not just `RUN` under
`docker build` (as was previously the case) but to `COPY` and `ADD`
under `docker build` and also to `docker run`.

It also removes an inconsistency that the 127GB size was not applied
when `--platform windows` was not passed to `docker build`, but WCOW was
still used as a platform default, e.g. Docker Desktop for Windows in
Windows Containers mode.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-11-10 19:51:46 +11:00
Paul "TBBle" Hampson
142b2b785b Add TestBuildWCOWSandboxSize integration test
This test validates that `RUN` and `COPY` both target a read-write
sandbox on Windows that is configured according to the daemon's
`storage-opts` setting.

Sadly, this is a slow test, so we need to bump the timeout to 60 minutes
from the default of 10 minutes.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-11-10 19:51:46 +11:00
Sebastiaan van Stijn
0e8023ddea
Merge pull request #41638 from TBBle/37352-fix-Windows-CI-pipeline
Reinstate Windows CI Pipeline usefulness
2020-11-10 02:52:54 +01:00
Brian Goff
470ae8422f
Merge pull request #41652 from thaJeztah/cgroupv2_detection
use containerd/cgroups to detect cgroups v2
2020-11-09 10:03:30 -08:00