Commit Graph

9017 Commits

Author SHA1 Message Date
Michael Crosby
677aaad83c
Merge pull request #4718 from thaJeztah/remove_sudo_remnants
install-runc: remove unused USESUDO variable
2020-11-10 10:18:13 -05:00
Phil Estes
6dc35dfdaa
Merge pull request #4716 from thaJeztah/faster_golang_ci
gha: specify full version for golang-ci-lint to speedup selection
2020-11-10 10:14:22 -05:00
Sebastiaan van Stijn
1edeea7663
install-runc: remove unused USESUDO variable
This is no longer needed, as the script is already run with sudo.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-11-10 12:49:21 +01:00
Sebastiaan van Stijn
72dd30feba
gha: specify full version for golang-ci-lint to speedup selection
Noticed this in the CI output:

    Requested golangci-lint 'v1.29', using 'v1.29.0', calculation took 7969ms
    Installing golangci-lint v1.29.0...
    Downloading https://github.com/golangci/golangci-lint/releases/download/v1.29.0/golangci-lint-1.29.0-darwin-amd64.tar.gz ...

Using nearly 8 seconds to convert v1.29 to v1.29.0 seems a bit long,
so hard-coding to the full version to speedup CI somewhat.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-11-10 11:34:57 +01:00
Akihiro Suda
0585213d01
remove unused hack/* files
- hack/test-cri-integration.sh : called from Makefile
- hack/test-utils.sh : called from hack/test-cri-integration.sh
- hack/utils.sh : called from hack/test-utils.sh

Other files are no longer used and can be safely removed.

Kube test-infra doesn't seem to require the removed file as well: https://github.com/kubernetes/test-infra/search?q=containerd+hack

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-11-10 17:19:31 +09:00
Akihiro Suda
9d54648be3
ctr: add AppArmor flags
e.g.
```
$ sudo ./bin/ctr run --apparmor-default-profile "cri-containerd.apparmor.d" docker.io/library/alpine:latest foo cat /proc/self/attr/current
cri-containerd.apparmor.d (enforce)
```

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-11-10 14:19:35 +09:00
Kathryn Baldauf
95ba6e9f75 Add annotations to task update request api
Signed-off-by: Kathryn Baldauf <kabaldau@microsoft.com>
2020-11-09 14:13:33 -08:00
Kazuyoshi Kato
bb8aac38a0 Do not hardcode "amd64" on LCOW and Windows-related files
Fixes #3281.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2020-11-09 13:39:07 -08:00
Michael Crosby
293b08dd19
Merge pull request #4699 from dweomer/selinx-relabel-dev-shm
cri: selinux relabel /dev/shm
2020-11-09 12:12:35 -05:00
Jacob Blain Christen
a7f24b29c2 test: run tests with selinux enforcing
With container-selinux policy updated to 2.145+ (the default for Fedora 32+) we
can enable SELinux=Enforcing mode in the CI workflow and pass all integration
and CRI tests except one, see https://github.com/containerd/containerd/issues/4460,
which has been marked as skipped.

Tested locally with:
- SELINUX=Enforcing vagrant up --provision-with=shell,selinux,test-integration
- SELINUX=Enforcing vagrant up --provision-with=shell,selinux,test-cri

Signed-off-by: Jacob Blain Christen <jacob@rancher.com>
2020-11-09 09:36:52 -07:00
Jacob Blain Christen
e8d8ae3b97 cri: selinux relabel /dev/shm
Address an issue originally seen in the k3s 1.3 and 1.4 forks of containerd/cri, https://github.com/rancher/k3s/issues/2240

Even with updated container-selinux policy, container-local /dev/shm
will get mounted with container_runtime_tmpfs_t because it is a tmpfs
created by the runtime and not the container (thus, container_runtime_t
transition rules apply). The relabel mitigates such, allowing envoy
proxy to work correctly (and other programs that wish to write to their
/dev/shm) under selinux.

Tested locally with:
- SELINUX=Enforcing vagrant up --provision-with=shell,selinux,test-integration
- SELINUX=Enforcing CRITEST_ARGS=--ginkgo.skip='HostIpc is true' vagrant up --provision-with=shell,selinux,test-cri
- SELINUX=Permissive CRITEST_ARGS=--ginkgo.focus='HostIpc is true' vagrant up --provision-with=shell,selinux,test-cri

Signed-off-by: Jacob Blain Christen <jacob@rancher.com>
2020-11-06 12:05:17 -07:00
Phil Estes
ac61e58cdd
Merge pull request #4692 from tianon/nosu
Remove setuid gosu in favor of "sudo -E PATH=$PATH ..."
2020-11-05 19:47:55 -05:00
Tianon Gravi
17688a733a Remove setuid gosu in favor of "sudo -E PATH=$PATH ..."
Signed-off-by: Tianon Gravi <admwiggin@gmail.com>
2020-11-05 14:08:05 -08:00
Akihiro Suda
ef79c99576
Merge pull request #4677 from thaJeztah/moby_sys_symlink
replace pkg/symlink with moby/sys/symlink
2020-11-05 00:59:30 +09:00
Akihiro Suda
8d42f86cf4
Merge pull request #4687 from samuelkarp/critest
ci: run critest target for all runtimes
2020-11-05 00:58:00 +09:00
Derek McGowan
8db2fe3852
Merge pull request #4686 from samuelkarp/cri-tests-runtimes
ci: run cri-integration target for all runtimes
2020-11-03 11:13:53 -08:00
Phil Estes
cb8c09290f
Merge pull request #4688 from YLonely/master
bug fix:#4646
2020-11-03 09:26:32 -05:00
YLonely
019148ef4c bug fix:#3448
Signed-off-by: Bowen Yan <loneybw@gmail.com>
2020-11-03 07:47:28 +00:00
Amr Mahdi
b81917ee72 Add comments clarifying copyWithBuffer implementation
Signed-off-by: Amr Mahdi <amramahdi@gmail.com>
2020-11-03 04:25:42 +00:00
Samuel Karp
e3f28eecd9
ci: run critest target for all runtimes
Signed-off-by: Samuel Karp <skarp@amazon.com>
2020-11-02 17:32:17 -08:00
Samuel Karp
a2581d3450
ci: run cri-integration target for all runtimes
Signed-off-by: Samuel Karp <skarp@amazon.com>
2020-11-02 14:36:12 -08:00
Derek McGowan
394be74fdb
Merge pull request #4681 from fuweid/update-godoc-badge
README.md: Use go.dev instead of godoc
2020-11-02 09:42:46 -08:00
Wei Fu
81cf375ec8
Merge pull request #4679 from mikebrow/update-util-versions
updates cri-tools to latest version
2020-11-01 18:56:59 +08:00
Mike Brown
63f673a229 updates cri-tools to latest version
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2020-10-31 14:46:44 -05:00
Akihiro Suda
ea56dd3fb6
Merge pull request #4680 from mikebrow/cri-doc-update-testing
refresh cri testing guide after move
2020-10-31 15:01:47 +09:00
Wei Fu
9756153170 README.md: Use go.dev instead of godoc
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2020-10-31 08:10:05 +08:00
Mike Brown
1ab8bdc27b refresh cri testing guide after move
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2020-10-30 18:22:37 -05:00
Michael Crosby
3662dc4c0b
Merge pull request #4673 from ehazlett/ctr-runtime-options
config path option to ctr for runtime
2020-10-30 11:00:14 -04:00
Phil Estes
9a672cca91
Merge pull request #4675 from mikebrow/update-default-config-doc-for-annotations
change default for disable snapshot annotations
2020-10-30 09:33:11 -04:00
Sebastiaan van Stijn
1146098421
replace pkg/symlink with moby/sys/symlink
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-30 00:05:15 +01:00
Phil Estes
abe1807a13
Merge pull request #4676 from thaJeztah/typo_fix
httpReadSeeker: fix typo in error-message
2020-10-29 18:43:52 -04:00
Sebastiaan van Stijn
b086062cfd
httpReadSeeker: fix typo in error-message
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-29 23:07:43 +01:00
Mike Brown
b6053fb7c3 change default for disablesnapshotannotations
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2020-10-29 15:30:13 -05:00
Derek McGowan
5184bccea3
Merge pull request #4631 from dims/copy-a-few-packages-from-moby/moby
Copy pkg/symlink and pkg/truncindex from moby/moby
2020-10-29 09:13:30 -07:00
Evan Hazlett
ef48ef1e4c
add config path option to ctr for runtime
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2020-10-29 15:21:37 +00:00
Wei Fu
f2e8fda82b
Merge pull request #4665 from dmcgowan/update-default-snapshot-annotations
Update make snapshot annotations disabled by default
2020-10-28 21:12:02 +08:00
Amr Mahdi
f6834d4c0b replicate io.Copy optimizations
Signed-off-by: Amr Mahdi <amramahdi@gmail.com>
2020-10-28 05:50:14 +00:00
Derek McGowan
b2642458f9
Update make snapshot annotations disabled by default
This experimental feature should not be enabled by default as
it is not used by any default snapshotters.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2020-10-27 21:32:25 -07:00
Akihiro Suda
8ff2707a3c
Merge pull request #4610 from shahzzzam/samashah/add-annotations
Add manifest digest annotation for snapshotters
2020-10-28 13:11:49 +09:00
Maksym Pavlenko
619f96c757
Merge pull request #4664 from deitch/ctr-client-optimize
use proper buffer size for content get
2020-10-27 10:13:06 -07:00
Phil Estes
839b136992
Merge pull request #4656 from zhuangqh/fix-unknown-state
CRI: always set unknown to false when handling exit event
2020-10-27 08:54:30 -04:00
Avi Deitcher
57baf92211 use proper buffer size for content get
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2020-10-27 10:11:55 +02:00
zhuangqh
30c9addd6c fix: always set unknown to false when handling exit event
Signed-off-by: jerryzhuang <zhuangqhc@gmail.com>
2020-10-27 10:50:15 +08:00
Phil Estes
65e39897bf
Merge pull request #4662 from BenTheElder/fifo-dup2-unix
Revender latest containerd/fifo
2020-10-26 19:32:23 -04:00
Benjamin Elder
502d6adc22 Revender latest containerd/fifo
fixes build on arm64

Signed-off-by: Benjamin Elder <bentheelder@google.com>
2020-10-26 14:53:35 -07:00
Akihiro Suda
f51d5f773d
Merge pull request #4657 from mxpv/master
Fix panic in shim not logged
2020-10-27 02:03:38 +09:00
Maksym Pavlenko
4da306e1e9 Fix panic in shim not logged
Fix #4274
Carry #4298

Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2020-10-26 09:05:47 -07:00
Maksym Pavlenko
5afc4b4d8b Revendor latest containerd/fifo
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2020-10-26 09:04:21 -07:00
Amr Mahdi
289130b8a7 Improve image pull performance from http 1.1 container registries
Private registries that does not support http 2.0 such as Azure Container Registry streams back content in a max of 16KB chunks (max TLS record size). The small chunks introduce an overhead when copying the layers to the content store sine each chunk incurs the overhead of  grpc message that has to be sent to the content store.

This change reduces this overhead by buffering the chunks into 1MB chunks and only then writes a message to the content store.

Below is a per comparsion between the 2 approaches using a couple of large images that are being pulled from the docker hub (http 2.0) and a private Azure CR (http 1.1) in seconds.

image                                                   | Buffered copy | master
-------                                                 |---------------|----------
docker.io/pytorch/pytorch:latest                        |  55.63        | 58.33
docker.io/nvidia/cuda:latest                            |  72.05        | 75.98
containerdpulltest.azurecr.io/pytorch/pytorch:latest    | 61.45         | 77.1
containerdpulltest.azurecr.io/nvidia/cuda:latest        | 77.13         | 85.47

Signed-off-by: Amr Mahdi <amramahdi@gmail.com>
2020-10-26 05:05:09 +00:00
Phil Estes
656b487d33
Merge pull request #4645 from masters-of-cats/master
Check if a process exists before returning it
2020-10-22 10:25:45 -04:00