Commit graph

42891 commits

Author SHA1 Message Date
Akihiro Suda
f50c7644cf
update runc binary to v1.0.1
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-07-18 20:19:33 +09:00
Brian Goff
b316cc059a
Merge pull request #42636 from thaJeztah/update_containerd
Update containerd binary and vendor to v1.5.3
2021-07-15 14:10:26 -07:00
Sebastiaan van Stijn
a2da507857
Merge pull request #42604 from kinvolk/rata/seccomp-new-fields
seccomp: Sync fields with runtime-spec fields
2021-07-15 23:02:45 +02:00
Tianon Gravi
b2e31eb416
Merge pull request #42614 from jk-vb/patch-1
updated names-generator.go for alphabetization
2021-07-14 22:50:48 +00:00
Tianon Gravi
40502f49f6
Merge pull request #42634 from kevpar/fix-vndr-tooling
Fix up vndr tooling
2021-07-14 22:43:21 +00:00
Akihiro Suda
22d6671db2
Merge pull request #42631 from thaJeztah/bump_go_1.16.6
Bump go 1.16.6 (addresses CVE-2021-34558)
2021-07-14 12:50:10 +09:00
jk-vb
1d055267a8
updated names-generator.go for alphabetization
re ordered some entries so they are in proper alphabetical order

Signed-off-by: Justin Keller <jkeller@vb-jkeller-mbp.local>
2021-07-13 23:52:51 +02:00
Sebastiaan van Stijn
a4ee738b31
Merge pull request #42611 from kevpar/update-hcsshim
Update hcsshim vendor to v0.8.20
2021-07-13 23:48:11 +02:00
Sebastiaan van Stijn
84df737f50
vendor: github.com/containerd/containerd v1.5.3
full diff: https://github.com/containerd/containerd/compare/v1.5.2...v1.5.3

- Fix User Agent sent to registry authentication server (changes default user-
  agent from "Go-http-client/1.1" to "containerd/v1.5.3")
- Fix missing Body.Close() calls on push to docker remote
- Change Wrapf of non-error to an actual error
    - fixes Failed to pull image (unexpected commit digest)
- fix invalid validation error checking
- Update hcsshim to 0.8.18
- Update Go to 1.16.6
- content/local: inline sys.StatATimeAsTime()
- windows: Use GetFinalPathNameByHandle for ResolveSymbolicLink
- Fix cleanup context of teardownPodNetwork
    - fixes CRI fails to invoke CNI plugin to teardown network when RunPodSandbox times out
- sandbox: send pod UID to CNI plugins as K8S_POD_UID

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-07-13 23:32:56 +02:00
Sebastiaan van Stijn
5ae2af41ee
Update containerd binary to v1.5.3
full diff: https://github.com/containerd/containerd/compare/v1.5.2...v1.5.3

Welcome to the v1.5.3 release of containerd!

The third patch release for containerd 1.5 updates runc to 1.0.0 and contains
various other fixes.

Notable Updates

- Update runc binary to 1.0.0
- Send pod UID to CNI plugins as K8S_POD_UID
- Fix invalid validation error checking
- Fix error on image pull resume
- Fix User Agent sent to registry authentication server
- Fix symlink resolution for disk mounts on Windows

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-07-13 23:17:29 +02:00
Kevin Parsons
3334fb9af1 Fix up vndr tooling
- Fix the error message in hack/validate/vendor to specify that
  hack/vendor.sh should be run instead of vndr.
- Fix hack/vendor.sh to also match on Windows paths for the whitelist.
  This allows the script to be run on Windows via Git Bash.

Signed-off-by: Kevin Parsons <kevpar@microsoft.com>
2021-07-13 09:45:07 -07:00
Justin Cormack
cf73a45a13
Merge pull request #42622 from aiordache/carry_wants_containerd
Move containerd.service from Requires= to Wants=
2021-07-13 13:55:11 +01:00
Sebastiaan van Stijn
fe6f1a4067
Bump go 1.16.6 (addresses CVE-2021-34558)
This addresses CVE-2021-34558: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34558

go1.16.6 (released 2021-07-12) includes a security fix to the crypto/tls package,
as well as bug fixes to the compiler, and the net and net/http packages. See the
Go 1.16.6 milestone on the issue tracker for details:

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

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-07-13 12:42:59 +02:00
Sebastiaan van Stijn
bf78e25fe5
Merge pull request #42608 from rvolosatovs/fix_builder_size
Deprecate `BuilderSize` in API versions >= 1.42
2021-07-12 19:29:22 +02:00
Tianon Gravi
a985655ac4 Move containerd.service from Requires= to Wants=
Per the systemd.unit documentation:

> If this unit gets activated, the units listed will be activated as well. If one of the other units fails to activate, and an ordering dependency After= on the failing unit is set, this unit will not be started. Besides, with or without specifying After=, this unit will be stopped if one of the other units is explicitly stopped.
>
> Often, it is a better choice to use Wants= instead of Requires= in order to achieve a system that is more robust when dealing with failing services.

This should also be generally "safe" given we added `--containerd=/run/containerd/containerd.sock` to the flags we pass to `dockerd`.

Signed-off-by: Tianon Gravi <admwiggin@gmail.com>
Signed-off-by: Anca Iordache <anca.iordache@docker.com>
2021-07-12 10:06:35 +00:00
Roman Volosatovs
31348afa19
API: deprecate BuilderSize in API versions >= 1.42
Co-authored-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Roman Volosatovs <roman.volosatovs@docker.com>
2021-07-12 10:03:49 +02:00
Kevin Parsons
f7eaf2bf78 Update hcsshim vendor to v0.8.20
Full set of changes: https://github.com/Microsoft/hcsshim/compare/v0.8.16...v0.8.20

Importantly brings in https://github.com/microsoft/hcsshim/pull/1065,
which fixes #42610.

Signed-off-by: Kevin Parsons <kevpar@microsoft.com>
2021-07-09 15:36:39 -07:00
Sebastiaan van Stijn
c81abefdb1
Merge pull request #42607 from rvolosatovs/fix_build_cache_formatting
Ensure empty build cache is represented as empty JSON array
2021-07-09 15:01:37 +02:00
Roman Volosatovs
83e3dd68ca
swagger: add BuildCache example to /system/df
Co-authored-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Roman Volosatovs <roman.volosatovs@docker.com>
2021-07-09 09:57:13 +02:00
Rodrigo Campos
5d244675bd seccomp: Sync fields with runtime-spec fields
The runtime spec we are using has support for these 3 fields[1], but
moby doesn't have them in its seccomp struct. This patch just adds and
copies them when they are in the profile.

DefaultErrnoRet is implemented in the runc version moby is using (it is
implemented since runc-rc95[2]) but if we create a container without
this moby patch, we don't see an error nor the expected behavior. This
is not clear for the user (the profile they specify is valid, the syntax
is ok, but the wrong behavior is seen).

This is because the DefaultErrnoRet field is not copied to the config
passed ultimately to runc (i.e. is like the field was not specified).
With this patch, we see the expected behavior.

The other two fileds are in the runtime-spec but not yet in runc (a PR
is open and targets 1.1.0 milestone). However, I took the liberty to
copy them now too for two reasons:

1. If we don't add them now and end up using a runc version that
supports them, then the error that the user will see is not clear at
all:

	docker: Error response from daemon: OCI runtime create failed: container_linux.go:380: starting container process caused: listenerPath is not set: unknown.

And it is not obvious to debug for the user, as the field _is_ set in
the profile they specify (just not copied by moby to the profile moby
specifies ultimately to runc).

2. When using a runc without seccomp notify support (like today), the
error we see is the same with and without this moby patch (when using a
seccomp profile with the new fields):

	docker: Error response from daemon: OCI runtime create failed: string SCMP_ACT_NOTIFY is not a valid action for seccomp: unknown.

Then, it seems like a clear win to add them now: we don't have to do it
later (that implies not clear errors to the user if we forget, like we
did with DefaultErrnoRet) and the user sees the exact same error when
using a runc version that doesn't support these fields.

[1]: Note we are vendoring version 1c3f411f041711bbeecf35ff7e93461ea6789220 and this version has these 3 fields 1c3f411f04/config-linux.md (seccomp)
[2]: https://github.com/opencontainers/runc/pull/2954/
[3]: https://github.com/opencontainers/runc/pull/2682

Signed-off-by: Rodrigo Campos <rodrigo@kinvolk.io>
2021-07-08 17:11:53 +02:00
Roman Volosatovs
f2225933bb
API: ensure empty build cache is represented as empty JSON array
Ensure empty `BuildCache` field is represented as empty JSON array(`[]`)
instead of `null` to be consistent with `Images`, `Containers` etc.

Signed-off-by: Roman Volosatovs <roman.volosatovs@docker.com>
2021-07-08 13:13:46 +02:00
Sebastiaan van Stijn
5e4da6cc82
Merge pull request #42005 from thaJeztah/refactor_seccomp
Refactor seccomp types to reuse runtime-spec, and add support for "ErrnoRet"
2021-07-07 11:58:13 +02:00
Sebastiaan van Stijn
c858e496f6
Merge pull request #42596 from thaJeztah/sync_swagger_fix
API: fix 404 status description on container create
2021-07-07 11:49:10 +02:00
Brian Goff
2a7f70f81c
Merge pull request #42063 from thaJeztah/bump_api_version
API: update API version to v1.42
2021-07-06 16:13:07 -07:00
Sebastiaan van Stijn
6d88407ac2
Merge pull request #42457 from AkihiroSuda/rootless-tumbleweed-etc-ssl
rootless: fix "x509: certificate signed by unknown authority" on openSUSE Tumbleweed
2021-07-06 11:53:37 +02:00
Sebastiaan van Stijn
68b095d4df
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>
2021-07-03 21:30:47 +02:00
Sebastiaan van Stijn
2b5427b853
Merge pull request #42047 from Emdot/Emdot-patch-1
Fix containers/create 404 response description
2021-07-03 21:21:16 +02:00
Sebastiaan van Stijn
477244cca5
API: update API version to v1.42
Docker 20.10 was released with API v1.41, so any change in the API
should now target v1.42.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-07-03 18:12:46 +02:00
Akihiro Suda
3f53b2ef7f
Merge pull request #42592 from thaJeztah/update_swagger_fork 2021-07-03 22:37:34 +09:00
Sebastiaan van Stijn
42d2048b9d
Dockerfile: update go-swagger to fix validation on Go1.16
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-07-02 22:17:59 +02:00
Brian Goff
45b45ad65b
Merge pull request #42508 from thaJeztah/bump_term_ansiterm
vendor: moby/term, Azure/go-ansiterm for golang.org/x/sys/windows compatibility
2021-07-02 12:23:28 -07:00
Tianon Gravi
c6dd474a49
Merge pull request #42579 from thaJeztah/update-s390x-ubuntu-2004
Run s390x tests on Ubuntu 20.04
2021-07-02 10:09:38 -07:00
Sebastiaan van Stijn
ababae665d
Merge pull request #42550 from rvolosatovs/fix_image_shared_size
Fix SharedSize computation in `ImageService.Image` for filtered requests
2021-07-02 18:16:55 +02:00
Sebastiaan van Stijn
b2891cd738
Merge pull request #42587 from awmirantis/fix-unsafe-ptr-42444
Fix use of unsafe ptr #42444
2021-07-02 14:33:44 +02:00
Roman Volosatovs
af3e5568fc
daemon/images: fix shared size computation for filtered requests
Signed-off-by: Roman Volosatovs <roman.volosatovs@docker.com>
2021-07-02 11:46:25 +02:00
Adam Williams
a8d92be6e8 Use crypto/rand
Signed-off-by: Adam Williams <awilliams@mirantis.com>
2021-07-01 14:15:39 -07:00
Adam Williams
9f0e268b00 Fix use of unsafe ptr #42444
Signed-off-by: Adam Williams <awilliams@mirantis.com>
2021-07-01 12:24:33 -07:00
Roman Volosatovs
b308097ec3
daemon/images: refactor image listing
- Rename image summary constructor
    - Rename `newImage` into `newImageSummary`, since the returned type is
      `*types.ImageSummary`
- Rename variables for clarity
    - Rename `newImage` into `summary`, since the variable type is
      `*types.ImageSummary`
    - Rename `imagesMap` into `summaryMap`, since the value type
      contained is `*types.ImageSummary`
- Only compute `DiffSize` when more than 1 reference to the layer
  exists, since it is not used otherwise
- Move variable declarations closer to where they are used

Signed-off-by: Roman Volosatovs <roman.volosatovs@docker.com>
Co-authored-by: Sebastiaan van Stijn <github@gone.nl>
2021-06-30 11:32:32 +02:00
Sebastiaan van Stijn
2a562b1583
Merge pull request #42569 from steffengy/master-2
libnetwork: processEndpointCreate: Fix deadlock between getSvcRecords and processEndpointCreate
2021-06-30 11:09:08 +02:00
Stefan Scherer
7a6cac2b23
Run s390x tests on Ubuntu 20.04
Signed-off-by: Stefan Scherer <stefan.scherer@docker.com>
2021-06-29 17:33:40 +02:00
Steffen Butzer
0c1a125644 libnetwork: processEndpointCreate: Fix deadlock between getSvcRecords and processEndpointCreate
References https://github.com/moby/moby/pull/42545

Signed-off-by: Steffen Butzer <steffen.butzer@outlook.com>
2021-06-29 08:07:14 +02:00
Sebastiaan van Stijn
d12fc17073
Merge pull request #42571 from xiaoding945/master
file mkimage-rinse.sh has been abort, should modify the script annotation
2021-06-28 19:58:33 +02:00
Akihiro Suda
1e71c6cffe
Merge pull request #42567 from thaJeztah/remove_unused_const 2021-06-28 23:24:37 +09:00
dingwei
345a180a55 there is no file named mkimage-rinse.sh in contrib floder, should delete
it

Signed-off-by: dingwei <dingwei@cmss.chinamobile.com>
2021-06-28 17:36:34 +08:00
Sebastiaan van Stijn
665de2e973
Merge pull request #42528 from thaJeztah/jenkins_windows_containerd
Jenkinsfile: add stage for Windows 2022 on containerd
2021-06-28 09:35:03 +02:00
Sebastiaan van Stijn
050929ab83
Merge pull request #42539 from cpuguy83/libnet_cleanup
Various libnetwork cleanups
2021-06-26 22:25:27 +02:00
Tianon Gravi
4b4e4c7c69
Merge pull request #42557 from thaJeztah/remove_report_issue
contrib: remove report-issue.sh script
2021-06-25 22:24:32 -07:00
Sebastiaan van Stijn
2050e085f9
hack: remove proxy.installer
It's no longer used

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-06-25 18:02:51 +02:00
Brian Goff
2bec9f607f
Remove spurious libnetwork vendor entry.
Not sure how this got added in there...

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2021-06-25 18:02:05 +02:00
Brian Goff
116f200737
Fix gosec complaints in libnetwork
These were purposefully ignored before but this goes ahead and "fixes"
most of them.
Note that none of the things gosec flagged are problematic, just
quieting the linter here.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2021-06-25 18:02:03 +02:00