Commit Graph

10694 Commits

Author SHA1 Message Date
Kazuyoshi Kato
a35fbb7ec7
Merge pull request #7028 from AkihiroSuda/continuity-0.3.0
go.mod: github.com/containerd/continuity v0.3.0
2022-06-07 20:10:13 -07:00
Derek McGowan
1c54ab1da1
Merge pull request #7029 from Zinbo/correct-spelling-mistake
Correct spelling mistake ("sanbdox" to "sandbox")
2022-06-07 09:49:24 -07:00
Shane Jennings
6190b0f04b
Correct spelling mistake ("sanbdox" to "sandbox")
Signed-off-by: Shane Jennings <superzinbo@gmail.com>
2022-06-07 10:55:15 +01:00
Akihiro Suda
088c8df3ac
go.mod: github.com/containerd/continuity v0.3.0
https://github.com/containerd/continuity/compare/v0.2.2...v0.3.0

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2022-06-07 17:14:08 +09:00
Derek McGowan
c1bcabb454
Merge pull request from GHSA-5ffw-gxpp-mxpf
Limit the response size of ExecSync
2022-06-06 10:19:23 -07:00
Kazuyoshi Kato
8bf5995e12
Merge pull request #7018 from lucacome/bump-grpc
Bump grpc to v1.47.0
2022-06-06 10:04:10 -07:00
Kazuyoshi Kato
40aa4f3f1b
Implicitly discard the input to drain the reader
Signed-off-by: Derek McGowan <derek@mcg.dev>
2022-06-06 09:57:13 -07:00
Kazuyoshi Kato
455b45708c
Merge pull request #7017 from lucacome/bump-k8s-deps
Bump k8s.io deps to v0.24.1
2022-06-03 10:33:50 -07:00
Phil Estes
2b661b890f
Merge pull request #6899 from shuaichang/ISSUE6657-support-runtime-snapshotter
Support runtime level snapshotter for issue 6657
2022-06-03 10:04:53 +02:00
shuaichang
7b9f1d4058 Added support for runtime level snapshotter, issue 6657
Signed-off-by: shuaichang <shuai.chang@databricks.com>

Updated annotation name
2022-06-02 16:29:59 -07:00
Luca Comellini
8bc6ccc073
Bump k8s.io deps to v0.24.1
Signed-off-by: Luca Comellini <luca.com@gmail.com>
2022-06-02 15:26:54 -07:00
Luca Comellini
5fcde823dd
Bump grpc to v1.47.0
Signed-off-by: Luca Comellini <luca.com@gmail.com>
2022-06-02 15:25:37 -07:00
Fu Wei
1f4e5175c4
Merge pull request #7012 from thaJeztah/update_golang_1.18.3
update golang to 1.18.3, 1.17.11
2022-06-02 18:49:01 +08:00
Sebastiaan van Stijn
1b3c3860db
update golang to 1.18.3, 1.17.11
go1.18.3 (released 2022-06-01) includes security fixes to the crypto/rand,
crypto/tls, os/exec, and path/filepath packages, as well as bug fixes to the
compiler, and the crypto/tls and text/template/parse packages. See the Go
1.18.3 milestone on our issue tracker for details:

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

update golang to 1.17.11

go1.17.11 (released 2022-06-01) includes security fixes to the crypto/rand,
crypto/tls, os/exec, and path/filepath packages, as well as bug fixes to the
crypto/tls package. See the Go 1.17.11 milestone on our issue tracker for details.

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

Hello gophers,

We have just released Go versions 1.18.3 and 1.17.11, minor point releases.

These minor releases include 4 security fixes following the security policy:

- crypto/rand: rand.Read hangs with extremely large buffers
  On Windows, rand.Read will hang indefinitely if passed a buffer larger than
  1 << 32 - 1 bytes.

  Thanks to Davis Goodin and Quim Muntal, working at Microsoft on the Go toolset,
  for reporting this issue.

  This is [CVE-2022-30634][CVE-2022-30634] and Go issue https://go.dev/issue/52561.
- crypto/tls: session tickets lack random ticket_age_add
  Session tickets generated by crypto/tls did not contain a randomly generated
  ticket_age_add. This allows an attacker that can observe TLS handshakes to
  correlate successive connections by comparing ticket ages during session
  resumption.

  Thanks to GitHub user nervuri for reporting this.

  This is [CVE-2022-30629][CVE-2022-30629] and Go issue https://go.dev/issue/52814.
- `os/exec`: empty `Cmd.Path` can result in running unintended binary on Windows

  If, on Windows, `Cmd.Run`, `cmd.Start`, `cmd.Output`, or `cmd.CombinedOutput`
  are executed when Cmd.Path is unset and, in the working directory, there are
  binaries named either "..com" or "..exe", they will be executed.

  Thanks to Chris Darroch, brian m. carlson, and Mikhail Shcherbakov for reporting
  this.

  This is [CVE-2022-30580][CVE-2022-30580] and Go issue https://go.dev/issue/52574.
- `path/filepath`: Clean(`.\c:`) returns `c:` on Windows

  On Windows, the `filepath.Clean` function could convert an invalid path to a
  valid, absolute path. For example, Clean(`.\c:`) returned `c:`.

  Thanks to Unrud for reporting this issue.

  This is [CVE-2022-29804][CVE-2022-29804] and Go issue https://go.dev/issue/52476.

[CVE-2022-30634]: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-30634
[CVE-2022-30629]: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-30629
[CVE-2022-30580]: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-30580
[CVE-2022-29804]: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-29804

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-06-02 09:45:57 +02:00
Phil Estes
5e876262ed
Merge pull request #7004 from SilverSoldier/patch-1
Fix containerd-stress duration flag
2022-06-02 09:43:36 +02:00
Fu Wei
aa0aaa4947
Merge pull request #7009 from mikebrow/update-gocni 2022-06-02 11:09:46 +08:00
Mike Brown
e3b4d750db update go-cni/for cni update fixing plugins that don't respond with version
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2022-06-01 17:20:18 -05:00
Kazuyoshi Kato
c149e6c2ea
Merge pull request #6996 from dcantah/hpc-validations
Add validations for Windows HostProcess CRI configs
2022-06-01 11:37:12 -07:00
Kazuyoshi Kato
fcd0c86c70
Merge pull request #7007 from dmcgowan/move-docker-sort
Move docker reference logic to reference/docker package
2022-06-01 11:33:52 -07:00
Phil Estes
5bc2d2e429
Merge pull request #7003 from pacoxu/pause-3.7
promote pause image to 3.7 (sync with kube v1.24)
2022-06-01 05:59:14 -04:00
Phil Estes
dd9e6a70dc
Merge pull request #6998 from thaJeztah/urfave_cli_no_docs
Makefile: use urfave_cli_no_docs for binaries that don't need it
2022-06-01 05:32:09 -04:00
Derek McGowan
8ed54849a6
Move docker reference logic to reference/docker package
Signed-off-by: Derek McGowan <derek@mcg.dev>
2022-05-31 22:40:49 -07:00
SilverSoldier
f7aa90d273 Fix containerd-stress duration flag
Signed-off-by: Kavya G <soldatargent@gmail.com>
2022-06-01 10:47:18 +05:30
Mike Brown
8c27ce4193
Merge pull request #6993 from mxpv/images
CRI: cleanup cri/store package
2022-05-31 20:38:43 -05:00
Kazuyoshi Kato
49ca87d727 Limit the response size of ExecSync
Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-05-31 22:21:35 +00:00
Kazuyoshi Kato
78cd9d3b6b
Merge pull request #7001 from dcantah/cri-trun
Use t.Run for /pkg/cri tests
2022-05-31 12:26:48 -07:00
Paco Xu
1cf6f20320 promote pause image to 3.7
Signed-off-by: Paco Xu <paco.xu@daocloud.io>
2022-05-30 15:08:28 +08:00
Daniel Canter
b5e1b8f619 Use t.Run for /pkg/cri tests
A majority of the tests in /pkg/cri are testing/validating multiple
things per test (generally spec or options validations). This flow
lends itself well to using *testing.T's Run method to run each thing
as a subtest so `go test` output can actually display which subtest
failed/passed.

Some of the tests in the packages in pkg/cri already did this, but
a bunch simply logged what sub-testcase was currently running without
invoking t.Run.

Signed-off-by: Daniel Canter <dcanter@microsoft.com>
2022-05-29 18:32:09 -07:00
Maksym Pavlenko
b572a82ad8 CRI: Remove deprecated error types and update error msg
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-05-28 13:53:28 -07:00
Daniel Canter
978ff393d2 Add validations for Windows HostProcess CRI configs
HostProcess containers require every container in the pod to be a
host process container and have the corresponding field set. The Kubelet
usually enforces this so we'd error before even getting here but we recently
found a bug in this logic so better to be safe than sorry.

Signed-off-by: Daniel Canter <dcanter@microsoft.com>
2022-05-27 21:17:07 -07:00
Sebastiaan van Stijn
1a8024b46a
Makefile: use urfave_cli_no_docs for binaries that don't need it
We only need the `ToMan()` as part of the `bin/gen-manpages` binary, which
generates the man-pages; other binaries don't use this code, so we can
set the `urfave_cli_no_docs` build-tag to exclude `cpuguy83/md2man` and
`russross/blackfriday` (and other dependencies) from the binaries:

Before:

    ls -lh bin
    total 149M
    -rwxr-xr-x 1 root root  49M May 27 10:12 containerd
    -rwxr-xr-x 1 root root 6.1M May 27 10:13 containerd-shim
    -rwxr-xr-x 1 root root 8.1M May 27 10:13 containerd-shim-runc-v1
    -rwxr-xr-x 1 root root 8.2M May 27 10:13 containerd-shim-runc-v2
    -rwxr-xr-x 1 root root  22M May 27 10:12 containerd-stress
    -rwxr-xr-x 1 root root  26M May 27 10:11 ctr
    -rwxr-xr-x 1 root root  30M May 27 10:14 gen-manpages

    ls -l bin
    total 151676
    -rwxr-xr-x 1 root root 51280184 May 27 10:12 containerd
    -rwxr-xr-x 1 root root  6332416 May 27 10:13 containerd-shim
    -rwxr-xr-x 1 root root  8458240 May 27 10:13 containerd-shim-runc-v1
    -rwxr-xr-x 1 root root  8536064 May 27 10:13 containerd-shim-runc-v2
    -rwxr-xr-x 1 root root 22567160 May 27 10:12 containerd-stress
    -rwxr-xr-x 1 root root 26873752 May 27 10:11 ctr
    -rwxr-xr-x 1 root root 30508888 May 27 10:14 gen-manpages

After:

    ls -lh bin
    total 147M
    -rwxr-xr-x 1 root root  49M May 27 10:26 containerd
    -rwxr-xr-x 1 root root 6.1M May 27 10:26 containerd-shim
    -rwxr-xr-x 1 root root 8.1M May 27 10:26 containerd-shim-runc-v1
    -rwxr-xr-x 1 root root 8.2M May 27 10:26 containerd-shim-runc-v2
    -rwxr-xr-x 1 root root  22M May 27 10:26 containerd-stress
    -rwxr-xr-x 1 root root  26M May 27 10:26 ctr
    -rwxr-xr-x 1 root root  30M May 27 10:27 gen-manpages

    ls -l bin
    total 149912
    -rwxr-xr-x 1 root root 50930360 May 27 10:26 containerd
    -rwxr-xr-x 1 root root  6332416 May 27 10:26 containerd-shim
    -rwxr-xr-x 1 root root  8458240 May 27 10:26 containerd-shim-runc-v1
    -rwxr-xr-x 1 root root  8536064 May 27 10:26 containerd-shim-runc-v2
    -rwxr-xr-x 1 root root 22209144 May 27 10:26 containerd-stress
    -rwxr-xr-x 1 root root 26523896 May 27 10:26 ctr
    -rwxr-xr-x 1 root root 30508888 May 27 10:27 gen-manpages

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-05-27 19:57:12 +02:00
Kazuyoshi Kato
c76559a6a9
Merge pull request #6997 from thaJeztah/update_urfave
vendor: github.com/urfave/cli v1.22.9 and fix "verify-vendor" script
2022-05-27 10:30:58 -07:00
Sebastiaan van Stijn
5bb47fb956
vendor: github.com/urfave/cli v1.22.9
The regression in v1.22.2 has been resolved, so we can drop the
replace rule and use the latest v1.22.x version.

full diff: https://github.com/urfave/cli/compare/v1.22.1...v1.22.9

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-05-27 13:05:54 +02:00
Sebastiaan van Stijn
a3a2d14ecc
fix verify-vendor if go.mod does not contain replace rules
Before this patch, if the go.mod did not contain a replace rule, jq would fail
(Cannot iterate over null), and Bash would produce an error when trying to add
an empty `$key` to `map_requires`:

    make verify-vendor
    + verify-vendor
      jq: error (at <stdin>:581): Cannot iterate over null (null)
      /go/src/github.com/containerd/containerd//script/verify-go-modules.sh: line 44: map_replaces_1[$key]: bad array subscript
      make: *** [Makefile:435: verify-vendor] Error 1

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-05-27 12:57:12 +02:00
Maksym Pavlenko
688b30cf52 CRI: Move truncindex to pkg
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-05-26 13:02:45 -07:00
Maksym Pavlenko
e44335800e CRI: Move reference sorting to reference package
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-05-26 12:52:36 -07:00
Maksym Pavlenko
b5366f8d7e CRI: Retrieve image spec on client
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-05-26 12:38:55 -07:00
Derek McGowan
c4e29027d4
Merge pull request #6937 from mythi/sandbox-errors
sandbox: replace github.com/pkg/errors with native errors
2022-05-26 10:44:15 -07:00
Phil Estes
da2db02369
Merge pull request #6983 from ethan-lowman-dd/ethan.lowman/fix-makefile-check-protos
build: Fix references to check-protos target in Makefile
2022-05-25 18:23:49 +01:00
Derek McGowan
8ba075c3dd
Merge pull request #6954 from Iceber/fix_ctr_new_container
ctr: fix label args used in NewContainer
2022-05-25 09:01:32 -07:00
Derek McGowan
928ae45e39
Merge pull request #6959 from mythi/ctr-sb
ctr sandbox: handle sandbox config
2022-05-24 18:25:31 -07:00
Ethan Lowman
4ba5415fb3
build: Fix references to check-protos target in Makefile
Signed-off-by: Ethan Lowman <ethan.lowman@datadoghq.com>
2022-05-24 17:41:10 -04:00
Derek McGowan
11de19af68
Merge pull request #6975 from AdamKorcz/fuzz3
Fix broken oss-fuzz build
2022-05-24 13:12:07 -07:00
Phil Estes
da9f9e464c
Merge pull request #6982 from AkihiroSuda/improve-userns-lchown-error
archive: add human-readable hint to Lchown error
2022-05-24 17:03:39 +01:00
AdamKorcz
8a3114b375 Fix broken oss-fuzz build
Signed-off-by: AdamKorcz <adam@adalogics.com>
2022-05-24 14:54:53 +01:00
Akihiro Suda
d2f30150b3
archive: add human-readable hint to Lchown error
Before:
```
$ nerdctl pull gcr.io/kubeflow-images-public/tensorflow-1.14.0-notebook-cpu:v0.7.0
FATA[0026] failed to extract layer sha256:f8a604834d388fd3d04c26e4ed832b36b617ea8a4e0b1665b9199bd10cfcb171: mount callback failed on /var/lib/containerd/tmpmounts/containerd-mount1818823128:
lchown /var/lib/containerd/tmpmounts/containerd-mount1818823128/usr/local/bin/docker-credential-gcr: invalid argument: unknown
```

After:
```
$ nerdctl pull gcr.io/kubeflow-images-public/tensorflow-1.14.0-notebook-cpu:v0.7.0
FATA[0027] failed to extract layer sha256:f8a604834d388fd3d04c26e4ed832b36b617ea8a4e0b1665b9199bd10cfcb171: mount callback failed on /var/lib/containerd/tmpmounts/containerd-mount3521205359:
failed to Lchown "/var/lib/containerd/tmpmounts/containerd-mount3521205359/usr/local/bin/docker-credential-gcr" for UID 205001, GID 5000:
lchown /var/lib/containerd/tmpmounts/containerd-mount3521205359/usr/local/bin/docker-credential-gcr: invalid argument
(Hint: try increasing the number of subordinate IDs in /etc/subuid and /etc/subgid): unknown
```

Related to moby/moby issue 43576 but for containerd

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2022-05-24 17:57:53 +09:00
Fu Wei
22e8fc1f40
Merge pull request #6978 from cardyok/fix-tx-closed 2022-05-24 13:02:42 +08:00
Derek McGowan
9ab02adb92
Merge pull request #6972 from AkihiroSuda/improve-config-toml-version-message
config: improve config v1 deprecation message
2022-05-23 20:52:37 -07:00
cardy.tang
9f9ebbd991 Fix tx closed error when upperdirlabel specified
When upperdirLabel specified, overlay Update will throw tx closed error since Commit is invoked before GetInfo

Signed-off-by: cardy.tang <zuniorone@gmail.com>
2022-05-24 10:34:43 +08:00
Akihiro Suda
739cb4c99a
config: improve config v1 deprecation message
The previous wording was causing confusion.
Fix moby/moby issue 43628

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2022-05-23 10:10:07 +09:00