Commit graph

39557 commits

Author SHA1 Message Date
Sebastiaan van Stijn
fbbe1fcfd8
api: remove HostConfig.LxcConf field
Commit 3b5fac462d  / docker 1.10 removed support
for the LXC runtime, and removed the corresponding fields from the API (v1.22).

This patch removes the `HostConfig.LxcConf` field from the swagger definition.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 75a1ad0c9f)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-02-18 13:21:10 +01:00
Sebastiaan van Stijn
a5a697143d
docs: fixing /exec/{id}/resize response code in API documentation
This takes the changes from 1a933e113d and
834272f978, and applies them to older API
versions in the docs directory (which are used for the actual documentation).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 2145f3ba2c)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-02-18 13:20:25 +01:00
Thomas LEDOS
42b13c09a6
Added error codes for exec resize in API docs
Signed-off-by: Thomas LEDOS <thomas.ledos92@gmail.com>
(cherry picked from commit 834272f978)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-02-18 13:20:09 +01:00
Thomas LEDOS
aa69e8ed3f
Fixed exec resize success code in API docs
Signed-off-by: Thomas LEDOS <thomas.ledos92@gmail.com>
(cherry picked from commit 1a933e113d)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-02-18 13:19:58 +01:00
Felipe Ruhland
ca5ba4890e
Fix typo on the v1.41 changelog
Signed-off-by: Felipe Ruhland <felipe.ruhland@gmail.com>
(cherry picked from commit eefb6c672a)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-02-18 13:19:21 +01:00
Sebastiaan van Stijn
3d5fb9425e
Merge pull request #43167 from thaJeztah/20.10_backport_jenkinsfile_remove_rs1
[20.10 backport] Jenkinsfile: remove Windows RS1 as it reached end of support
2022-02-17 20:10:45 +01:00
Sebastiaan van Stijn
1eef444005
Merge pull request #43171 from thaJeztah/20.10_backport_api_docs_fixes
[20.10 backport] docs: update API v1.41 and v1.40 docs with fixes from api/swagger
2022-02-17 20:10:26 +01:00
Brian Goff
7f44d606f9
Merge pull request #43166 from thaJeztah/20.10_backport_fix_update_sync
[20.10 backport] Fix for lack of syncronization in daemon/update.go
2022-02-17 11:08:56 -08:00
Tianon Gravi
c9e1608dd4
Merge pull request #43243 from thaJeztah/20.10_update_go_1.16.14
[20.10] Update Go to 1.16.14
2022-02-15 13:13:37 -08:00
Sebastiaan van Stijn
9502dec32f
[20.10] Update Go to 1.16.14
Includes security fixes for crypto/elliptic (CVE-2022-23806), math/big (CVE-2022-23772),
and cmd/go (CVE-2022-23773).

go1.16.14 (released 2022-02-10) includes security fixes to the crypto/elliptic,
math/big packages and to the go command, as well as bug fixes to the compiler,
linker, runtime, the go command, and the debug/macho, debug/pe, net/http/httptest,
and testing packages. See the Go 1.16.14 milestone on our issue tracker for details:

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

full diff: https://github.com/golang/go/compare/go1.16.13...go1.16.14

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-02-15 16:22:00 +01:00
Akihiro Suda
879dd468dc
Merge pull request #43215 from thaJeztah/20.10_backport_fix_overlay_fuse_permissions
[20.10 backport] daemon/graphdriver/fuse-overlayfs: Init(): fix directory permissions (staticcheck)
2022-02-12 12:10:29 +09:00
Sebastiaan van Stijn
9edb93886a
Merge pull request #43151 from thaJeztah/20.10_backport_containerd_15
[20.10 backport] update containerd binary v1.5.9, runc v1.0.3, and some script changes
2022-02-10 20:36:31 +01:00
Sebastiaan van Stijn
878b9de935
daemon/graphdriver/fuse-overlayfs: Init(): fix directory permissions (staticcheck)
daemon/graphdriver/fuse-overlayfs/fuseoverlayfs.go:101:63: SA9002: file mode '700' evaluates to 01274; did you mean '0700'? (staticcheck)
        if err := idtools.MkdirAllAndChown(path.Join(home, linkDir), 700, currentID); err != nil {
                                                                     ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit f9fb5d4f25)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-02-08 13:38:29 +01:00
Sebastiaan van Stijn
606c29418a
Merge pull request #43177 from thaJeztah/20.10_update_distribution
[20.10] vendor: github.com/docker/distribution v2.8.0
2022-02-08 09:40:46 +01:00
Sebastiaan van Stijn
d1b3497bfa
[20.10] vendor: github.com/docker/distribution v2.8.0
full diff: 58f99e93b7...distribution:v2.8.0

(taking my own fork for the diff link, as the samuelkarp fork didn't have a reference to the upstream)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-02-07 18:37:21 +01:00
Brian Goff
dd61d8dc4b
Merge pull request #43165 from thaJeztah/20.10_backport_logs_fixes
[20.10 backport] daemon/logger: read the length header correctly
2022-01-27 10:15:00 -08:00
Sebastiaan van Stijn
f9344b45fe
api/swagger: move DistributionInspect to definitions
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 16cb04c2e8)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-01-20 16:03:21 +01:00
Sebastiaan van Stijn
13cb9d9723
api/swagger: rename PluginPrivilegeItem to PluginPrivilege
To match the name in Go

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit ebd709f80c)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-01-20 16:03:19 +01:00
Sebastiaan van Stijn
7f9760e10c
api/swagger: fix up event-types and move to definitions
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 0b5a2e3c87)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-01-20 16:03:18 +01:00
Sebastiaan van Stijn
e6739a2884
api/swagger: move DistributionInspect to definitions
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit a65804adc4)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-01-20 16:03:17 +01:00
Sebastiaan van Stijn
d445d24804
api/swagger: rename PluginPrivilegeItem to PluginPrivilege
To match the name in Go

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 24a43d934c)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-01-20 16:03:16 +01:00
Sebastiaan van Stijn
5e38ae84b2
api/swagger: fix up event-types and move to definitions
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 92ed6ca356)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-01-20 16:03:14 +01:00
Tobias Gesellchen
012fdff916
Fix swagger docs to match the opencontainers image-spec
Signed-off-by: Tobias Gesellchen <tobias@gesellix.de>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 62cf748df9)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-01-20 16:03:13 +01:00
Tobias Gesellchen
13cbf7fbb7
Extract PluginPrivilegeItem as explicit type definition
Signed-off-by: Tobias Gesellchen <tobias@gesellix.de>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 6153c2f08d)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-01-20 16:03:12 +01:00
Tobias Gesellchen
8fbcf0611b
Use explicit object names for improved swagger based code generation
Signed-off-by: Tobias Gesellchen <tobias@gesellix.de>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit be93e50a58)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-01-20 16:03:11 +01:00
Tobias Gesellchen
b8bee972c4
Fix ContainerSummary swagger docs
Signed-off-by: Tobias Gesellchen <tobias@gesellix.de>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 8168d1877d)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-01-20 16:03:09 +01:00
Tobias Gesellchen
7092a6091c
Add "changes" query parameter for /image/create to swagger docs
Signed-off-by: Tobias Gesellchen <tobias@gesellix.de>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 0e719f8a00)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-01-20 16:03:08 +01:00
Tobias Gesellchen
adf1e470a1
Add RestartPolicy "no" to swagger docs
Signed-off-by: Tobias Gesellchen <tobias@gesellix.de>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit d3d78c1ae3)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-01-20 16:03:07 +01:00
Tobias Gesellchen
b4b469eac2
Fix swagger docs to match the opencontainers image-spec
Signed-off-by: Tobias Gesellchen <tobias@gesellix.de>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit c0bc82cef1)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-01-20 16:03:06 +01:00
Tobias Gesellchen
2c38a2a635
Extract PluginPrivilegeItem as explicit type definition
Signed-off-by: Tobias Gesellchen <tobias@gesellix.de>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 7248ebcd7e)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-01-20 16:03:04 +01:00
Tobias Gesellchen
621bfddd6e
Use explicit object names for improved swagger based code generation
Signed-off-by: Tobias Gesellchen <tobias@gesellix.de>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 6e421a1823)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-01-20 16:03:03 +01:00
Tobias Gesellchen
8a5240a8aa
Fix ContainerSummary swagger docs
Signed-off-by: Tobias Gesellchen <tobias@gesellix.de>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 9ac2d04617)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-01-20 16:03:02 +01:00
Tobias Gesellchen
751cf68e36
Add "changes" query parameter for /image/create to swagger docs
Signed-off-by: Tobias Gesellchen <tobias@gesellix.de>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 050f5f29f7)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-01-20 16:03:00 +01:00
Tobias Gesellchen
a961b76aef
Add RestartPolicy "no" to swagger docs
Signed-off-by: Tobias Gesellchen <tobias@gesellix.de>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 90294e9bdb)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-01-20 16:02:49 +01:00
Sebastiaan van Stijn
ad21bcd94e
Jenkinsfile: remove Windows RS1 as it reached end of support
It was already disabled by default, but removing it now that it reached
end of the line.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 9326ea5b99)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-01-20 10:14:29 +01:00
dmytro.iakovliev
b2684c1857
Fix for lack of syncromization in daemon/update.go
Signed-off-by: dmytro.iakovliev <dmytro.iakovliev@zodiacsystems.com>
(cherry picked from commit 58825ffc32)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-01-20 09:55:17 +01:00
Kazuyoshi Kato
8268f70ebb
daemon/logger: replace flaky TestFollowLogsHandleDecodeErr
Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
(cherry picked from commit c91e09bee2)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-01-20 09:40:19 +01:00
Kazuyoshi Kato
78d0b936b8
daemon/logger: refactor followLogs to write more unit tests
followLogs() is getting really long (170+ lines) and complex.
The function has multiple inner functions that mutate its variables.

To refactor the function, this change introduces follow{} struct.
The inner functions are now defined as ordinal methods, which are
accessible from tests.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
(cherry picked from commit 7a10f5a558)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-01-20 09:40:16 +01:00
Kazuyoshi Kato
39519221c2
daemon/logger: test followLogs' handleDecodeErr case
Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
(cherry picked from commit f2e458ebc5)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-01-20 09:38:36 +01:00
Kazuyoshi Kato
ada1b01de1
daemon/logger: read the length header correctly
Before this change, if Decode() couldn't read a log record fully,
the subsequent invocation of Decode() would read the record's non-header part
as a header and cause a huge heap allocation.

This change prevents such a case by having the intermediate buffer in
the decoder struct.

Fixes #42125.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
(cherry picked from commit 48d387a757)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-01-20 09:38:32 +01:00
Sebastiaan van Stijn
829f071228
update containerd binary to v1.5.9
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit df3ea5da03)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-01-20 09:28:34 +01:00
Akihiro Suda
3e5eea4192
update runc binary to v1.0.3
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
(cherry picked from commit 53397ac539)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-01-20 09:28:32 +01:00
Sebastiaan van Stijn
bd42e17284
update containerd binary to v1.5.8
The eighth patch release for containerd 1.5 contains a mitigation for CVE-2021-41190
as well as several fixes and updates.

Notable Updates

* Handle ambiguous OCI manifest parsing
* Filter selinux xattr for image volumes in CRI plugin
* Use DeactiveLayer to unlock layers that cannot be renamed in Windows snapshotter
* Fix pull failure on unexpected EOF
* Close task IO before waiting on delete
* Log a warning for ignored invalid image labels rather than erroring
* Update pull to handle of non-https urls in descriptors

See the changelog for complete list of changes

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit aef782f348)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-01-20 09:28:30 +01:00
Sebastiaan van Stijn
3fd0b8d6eb
Update containerd binary to v1.5.7
The seventh patch release for containerd 1.5 is a security release to fix CVE-2021-41103.

Notable Updates:

- Fix insufficiently restricted permissions on container root and plugin directories
  GHSA-c2h3-6mxw-7mvq

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit fa4a9702be)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-01-20 09:28:28 +01:00
Sebastiaan van Stijn
3700adb70a
Update containerd binary to v1.5.6
- Install apparmor parser for arm64 and update seccomp to 2.5.1
- Update runc binary to 1.0.2
- Update hcsshim to v0.8.21 to fix layer issue on Windows Server 2019
- Add support for 'clone3' syscall to fix issue with certain images when seccomp is enabled
- Add image config labels in CRI container creation
- Fix panic in metadata content writer on copy error

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit b746a2bf9b)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-01-20 09:28:26 +01:00
Sebastiaan van Stijn
0f37f2989b
Dockerfile: update gotestsum to v1.7.0
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 1b8db06785)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-01-20 09:28:21 +01:00
Sebastiaan van Stijn
2716336abd
Dockerfile: use "go install" to install utilities
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 14ff070469)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-01-20 09:27:36 +01:00
Sebastiaan van Stijn
b35a1707e3
Dockerfile: use version for some utilities instead of commit-sha
The golangci-lint, gotestsum, shfmt, and vndr utilities should generally
be ok to be pinned by version instead of a specific sha. Also rename
the corresponding env-vars / build-args accordingly:

- GOLANGCI_LINT_COMMIT -> GOLANGCI_LINT_VERSION
- GOTESTSUM_COMMIT -> GOTESTSUM_VERSION
- SHFMT_COMMIT -> SHFMT_VERSION
- VNDR_COMMIT -> VNDR_VERSION
- CONTAINERD_COMMIT -> CONTAINERD_VERSION
- RUNC_COMMIT -> RUNC_VERSION
- ROOTLESS_COMMIT -> ROOTLESS_VERSION

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit a7a7c732c0)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-01-20 09:27:30 +01:00
Sebastiaan van Stijn
2a18825cdf
Dockerfile: remove GOPROXY override (was for go < 1.14)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 3cec4b8cd4)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-01-20 09:24:51 +01:00
Sebastiaan van Stijn
0f925d5d3d
remove deprecated "nokmem" build-tag for runc
This build-tag was removed in 52390d6804,
which is part of runc v1.0.0-rc94 and up, so no longer relevant.

the kmem options are now always disabled in runc.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 3c7c18a499)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-01-20 09:24:49 +01:00