Commit Graph

10373 Commits

Author SHA1 Message Date
Jordan Karaze
cf571fa968 added make help for cri integration
Signed-off-by: Jordan Karaze <jordan.karaze@ibm.com>
2022-03-28 16:44:12 -05:00
Fu Wei
d394e00c7e
Merge pull request #6738 from zhsj/fix-test-msg
Fix error message in TestNewBinaryIO
2022-03-25 23:40:06 +08:00
Phil Estes
3633cae64b
Merge pull request #6706 from kzys/typeurl-upgrade
Use typeurl.Any instead of github.com/gogo/protobuf/types.Any
2022-03-25 10:38:46 -04:00
Shengjing Zhu
2689432bfa Fix error message in TestNewBinaryIO
Signed-off-by: Shengjing Zhu <zhsj@debian.org>
2022-03-25 11:56:21 +08:00
Akihiro Suda
eaf7929320
Merge pull request #5738 from thaJeztah/simplify_cgroup_add
Use cgroups.AddProc() for cgroups v1
2022-03-25 10:24:43 +09:00
Fu Wei
595ad06de7
Merge pull request #6713 from cosmoer/fix-ctr-images-mount-command
fix: ctr images mount with snapshotter option can't get snapshotter
2022-03-25 07:37:04 +08:00
Kazuyoshi Kato
96b16b447d Use typeurl.Any instead of github.com/gogo/protobuf/types.Any
This commit upgrades github.com/containerd/typeurl to use typeurl.Any.
The interface hides gogo/protobuf/types.Any from containerd's Go client.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-03-24 20:50:07 +00:00
Fu Wei
e7cba85e1c
Merge pull request #6323 from jepio/jepio/fix-cgroupv2-oom-event 2022-03-24 15:51:28 +08:00
Fu Wei
992f5d4634
Merge pull request #6721 from mikebrow/update-go-cni-to-v1.1.4
moving up to go-cni v1.1.4
2022-03-24 09:51:07 +08:00
Phil Estes
db84fdae10
Merge pull request #6722 from tonistiigi/snapshot-deadlocks
native: fix deadlock from leaving transactions open
2022-03-23 21:48:28 -04:00
Tonis Tiigi
fe426227d4 native: fix deadlock from leaving transactions open
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2022-03-23 15:48:42 -07:00
Mike Brown
a51da91c1d moving up to go-cni v1.1.4
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2022-03-23 22:16:51 +00:00
Kazuyoshi Kato
439316c7af
Merge pull request #5390 from thaJeztah/remove_googleapis_replace
go.mod: remove replace, and update github.com/gogo/googleapis v1.4.1
2022-03-23 14:02:25 -07:00
Derek McGowan
551516a18d
Merge pull request from GHSA-c9cp-9c75-9v8c
Fix the Inheritable capability defaults.
2022-03-23 10:50:56 -07:00
Sebastiaan van Stijn
36612d692f
go.mod: remove replace and update github.com/gogo/googleapis v1.4.1
gogo/googleapis has a single dependency (github.com/gogo/protobuf), which is
currently the same version as we use, and we have a separate replace for that
dependency, so removing this override should not make a difference there.

gogo/googleapis v1.4.1 Includes updated protos with the gogo/protobuf fixes for
[CVE-2021-3121](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-3121)

Change logs and diffs for each release:

- v1.3.3
  generate grpc service for google/longrunning/operations.proto
  full diff: https://github.com/gogo/googleapis/compare/v1.3.2...v1.3.3
- v1.4.0
  Add google geo type
  full diff: https://github.com/gogo/googleapis/compare/v1.3.3...v1.4.0
- v1.4.1
  This release contains sources generated with the version of gogo/protobuf
  containing a fix for the "skippy peanut butter" issue.
  full diff: https://github.com/gogo/googleapis/compare/v1.4.0...v1.4.1

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-03-23 16:56:30 +01:00
Phil Estes
36dcc76fa9
Merge pull request #6496 from thaJeztah/deprecate_criu_opt
runtime: deprecate runc --criu / -criu-path option
2022-03-23 11:17:58 -04:00
cosmoer
df93940fb2 fix: ctr images mount with snapshotter option can't get snapshotter
Signed-off-by: Qian Zhang <cosmoer@qq.com>
2022-03-23 23:12:54 +08:00
Phil Estes
b06938ce10
Merge pull request #6651 from ambarve/mount_path_fix
Bug fix for mount path handling
2022-03-23 10:56:21 -04:00
Sebastiaan van Stijn
c091d48cb9
Use cgroups.AddProc() for cgroups v1
All occurrences only passed a PID, so we can use this utility to make
the code more symmetrical with their cgroups v2 counterparts.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-03-23 15:25:09 +01:00
Sebastiaan van Stijn
d2013d2c99
runtime: deprecate runc --criu / -criu-path option
runc option --criu is now ignored (with a warning), and the option will be
removed entirely in a future release. Users who need a non- standard criu
binary should rely on the standard way of looking up binaries in $PATH.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-03-23 14:42:43 +01:00
Maksym Pavlenko
f8585d632a
Merge pull request #6711 from kzys/imgcrypt-upgrade
Upgrade containerd/imgcrypt and opencontainers/image-spec
2022-03-22 16:06:26 -07:00
Kazuyoshi Kato
388ee880d2 Upgrade containerd/imgcrypt and opencontainers/image-spec
- Upgrade github.com/containerd/imgcrypt to prepare for typeurl upgrade
  (see https://github.com/containerd/imgcrypt/pull/72)
- Upgrade github.com/opencontainers/image-spec since imgcrypto needs at
  least 1.0.2.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-03-22 21:17:18 +00:00
Kazuyoshi Kato
3836c3bf6a
Merge pull request #6708 from kzys/remove-enum-customization
Remove enumvalue_customname, goproto_enum_prefix and enum_customname
2022-03-22 13:46:46 -07:00
Kazuyoshi Kato
067611fdea Remove enumvalue_customname, goproto_enum_prefix and enum_customname
This commit removes gogoproto.enumvalue_customname,
gogoproto.goproto_enum_prefix and gogoproto.enum_customname.

All of them make proto-generated Go code more idiomatic, but we already
don't use these enums in our external-surfacing types and they are anyway
not supported by Google's official toolchain (see #6564).

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-03-21 19:48:16 +00:00
Phil Estes
977cb8bef0
Merge pull request #6699 from kzys/remove-customtype
Remove gogoproto.customtype
2022-03-21 14:47:17 -04:00
Kazuyoshi Kato
f72dada151
Merge pull request #6698 from dcantah/skip-windows-critest-tty
Skip tty critest testcase on Windows Server 2022
2022-03-21 11:09:28 -07:00
Amit Barve
bfde58e3cd Bug fix for mount path handling
Currently when handling 'container_path' elements in container mounts we simply call
filepath.Clean on those paths. However, filepath.Clean adds an extra '.' if the path is a
simple drive letter ('E:' or 'Z:' etc.). These type of paths cause failures (with incorrect
parameter error) when creating containers via hcsshim. This commit checks for such paths
and doesn't call filepath.Clean on them.
It also adds a new check to error out if the destination path is a C drive and moves the
dst path checks out of the named pipe condition.

Signed-off-by: Amit Barve <ambarve@microsoft.com>
2022-03-21 09:40:19 -07:00
Daniel Canter
e9bb9c3bc7 Skip tty critest testcase on Windows Server 2022
Skip the 'runtime should support exec with tty=true and stdin=true' test
for now as it's exceedingly flaky only on Ws2022.. Doesn't seem to reproduce
on a local ws2022 machine, but don't want to keep the CI red while we
investigate.

Signed-off-by: Daniel Canter <dcanter@microsoft.com>
2022-03-21 09:10:53 -07:00
Akihiro Suda
ed1a762707
Merge pull request #6605 from kzys/go-118
Build with Go 1.18
2022-03-20 01:23:05 +09:00
Kazuyoshi Kato
3eeeb9429a Remove gogoproto.customtype
gogoproto.customtype is used to have go-digest.Digest instead of string.
While it is convinient, protoc-gen-go doesn't support the extension
and that blocks #6564.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-03-18 23:14:44 +00:00
Kazuyoshi Kato
040babe003 Vendor dependencies with module graph pruning
The empty-mod hack no longer works with Go 1.18.

This commit fixes #6586.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-03-18 16:49:09 +00:00
Kazuyoshi Kato
a19ad9bb6f Use Go 1.18 to build and test containerd
Go 1.18 is released. Go 1.16 is no longer supported by the Go team.
golangci-lint is updated since 1.44.2 doesn't support Go 1.18.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-03-18 16:48:25 +00:00
Michael Crosby
0c701654a1
Merge pull request #6690 from estesp/update-prom-dep
Update prometheus client vendor
2022-03-18 12:40:57 -04:00
Akihiro Suda
46598b8b14
Merge pull request #6687 from thaJeztah/bump_crypto
vendor: golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd
2022-03-18 14:03:51 +09:00
Phil Estes
56f95e3d8a
Test turning off golang CI lint cache
Signed-off-by: Phil Estes <estesp@amazon.com>
2022-03-17 18:43:37 -04:00
Phil Estes
ee49c4d557
Add nolint:staticcheck to platform-specific calls
The linter on platforms that have a hardcoded response complains about
"if xyz == nil" checks; ignore those.

Signed-off-by: Phil Estes <estesp@amazon.com>
2022-03-17 18:24:00 -04:00
Phil Estes
c568752335
Update prometheus client vendor
Signed-off-by: Phil Estes <estesp@amazon.com>
2022-03-17 13:33:07 -04:00
Fu Wei
d9797673b0
Merge pull request #6593 from qiutongs/improve-container-mount
Make the temp mount as ready only in container WithVolumes
2022-03-18 00:03:28 +08:00
Sebastiaan van Stijn
9aadef1bee
vendor: golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd
full diff: 32db794688...3147a52a75

This version contains a fix for CVE-2022-27191 (not sure if it affects us).

From the golang mailing list:

    Hello gophers,

    Version v0.0.0-20220315160706-3147a52a75dd of golang.org/x/crypto/ssh implements
    client authentication support for signature algorithms based on SHA-2 for use with
    existing RSA keys.

    Previously, a client would fail to authenticate with RSA keys to servers that
    reject signature algorithms based on SHA-1. This includes OpenSSH 8.8 by default
    and—starting today March 15, 2022 for recently uploaded keys.

    We are providing this announcement as the error (“ssh: unable to authenticate”)
    might otherwise be difficult to troubleshoot.

    Version v0.0.0-20220314234659-1baeb1ce4c0b (included in the version above) also
    fixes a potential security issue where an attacker could cause a crash in a
    golang.org/x/crypto/ssh server under these conditions:

    - The server has been configured by passing a Signer to ServerConfig.AddHostKey.
    - The Signer passed to AddHostKey does not also implement AlgorithmSigner.
    - The Signer passed to AddHostKey does return a key of type “ssh-rsa” from its PublicKey method.

    Servers that only use Signer implementations provided by the ssh package are
    unaffected. This is CVE-2022-27191.

    Alla prossima,

    Filippo for the Go Security team

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-03-17 14:13:41 +01:00
Michael Crosby
de9344d845
Merge pull request #6670 from snbc/ctr_run_cni
fix: `ctr run --cni` get failed
2022-03-16 14:45:00 -04:00
Fu Wei
79d7df70d6
Merge pull request #6681 from Juneezee/test/t.TempDir 2022-03-16 14:54:16 +08:00
Fu Wei
df41bf832e
Merge pull request #6679 from kzys/zuul-vote 2022-03-16 13:54:33 +08:00
Derek McGowan
42ff244b1f
Merge pull request #6683 from uthark/oatamanenko/docs
document log level and format
2022-03-15 22:33:39 -07:00
Oleg Atamanenko
fdb746442b document log level and format
Signed-off-by: Oleg Atamanenko <oleg.atamanenko@gmail.com>
2022-03-15 21:00:58 -07:00
Eng Zer Jun
52d307ac13
test: remove redundant mountPoint
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-03-16 10:01:47 +08:00
Phil Estes
58bae86d8e
Merge pull request #6660 from henry118/shared-ns
Add shared content label to namespaces
2022-03-15 13:57:52 -07:00
Phil Estes
cf30a39353
Merge pull request #6562 from kzys/fieldpath
Add protoc-gen-go-fieldpath
2022-03-15 07:48:30 -07:00
songjiang han
2a0b2ee9eb fix: ctr run --cni get failed
when   user  executes ctr run --cni to start a container,it will call cni plugin to create network .But when user kills it,the network won’t be removed. if we run a container with same namespace and name again will trigger a bug. we should remove the network when user kills task if it enables cni plugin.

Fix:#6604

Signed-off-by: SongJiang Han <songjiang.dark@gmail.com>
2022-03-15 15:46:29 +08:00
Eng Zer Jun
18ec2761c0
test: use T.TempDir to create temporary test directory
The directory created by `T.TempDir` is automatically removed when the
test and all its subtests complete.

Reference: https://pkg.go.dev/testing#T.TempDir
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-03-15 14:03:50 +08:00
Phil Estes
ed4cc4b482
Merge pull request #6669 from henry118/gosec
Enable gosec linter for golangci-lint
2022-03-14 21:23:27 -07:00