Maksym Pavlenko
21338d2777
Add stub to build common OCI spec
...
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-01-11 13:03:59 -08:00
Maksym Pavlenko
f318e5630b
Update sandbox API to return target platform
...
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-01-11 13:03:59 -08:00
Maksym Pavlenko
dd22a3a806
Move WithMounts to specs
...
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-01-11 13:03:59 -08:00
Maksym Pavlenko
0ae0399b16
Make OCI spec opts available on all platforms
...
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-01-11 13:03:58 -08:00
Akihiro Suda
61617211bf
Merge pull request #7946 from mqasimsarfraz/fix-swap-tests
...
cri: Fix TestUpdateOCILinuxResource for host w/o swap controller
2023-01-11 18:10:09 +09:00
Samuel Karp
5f1a42543c
shim: move reap log line to debug
...
Fixes https://github.com/containerd/containerd/issues/7941
Signed-off-by: Samuel Karp <samuelkarp@google.com>
2023-01-10 16:39:39 -08:00
Samuel Karp
515d68099b
shim: enable debug logging for delete
...
Signed-off-by: Samuel Karp <samuelkarp@google.com>
2023-01-10 16:39:38 -08:00
yanggang
c8f4ab3b0d
update to go1.19.5, go1.18.10
...
Signed-off-by: yanggang <gang.yang@daocloud.io>
2023-01-11 06:41:43 +08:00
Qasim Sarfraz
9c8c4508ec
cri: Fix TestUpdateOCILinuxResource for host w/o swap controller
...
Tested on Ubuntu 20.04 w/o swap controller:
```
$ stat -fc %T /sys/fs/cgroup/
tmpfs
$ la -la /sys/fs/cgroup/memory/memory.memsw.limit_in_bytes
ls: cannot access '/sys/fs/cgroup/memory/memory.memsw.limit_in_bytes': No such file or directory
$ go test -v ./pkg/cri/sbserver/ -run TestUpdateOCILinuxResource
=== RUN TestUpdateOCILinuxResource
=== RUN TestUpdateOCILinuxResource/should_be_able_to_patch_the_unified_map
=== RUN TestUpdateOCILinuxResource/should_be_able_to_update_each_resource
=== RUN TestUpdateOCILinuxResource/should_skip_empty_fields
=== RUN TestUpdateOCILinuxResource/should_be_able_to_fill_empty_fields
--- PASS: TestUpdateOCILinuxResource (0.00s)
--- PASS: TestUpdateOCILinuxResource/should_be_able_to_patch_the_unified_map (0.00s)
--- PASS: TestUpdateOCILinuxResource/should_be_able_to_update_each_resource (0.00s)
--- PASS: TestUpdateOCILinuxResource/should_skip_empty_fields (0.00s)
--- PASS: TestUpdateOCILinuxResource/should_be_able_to_fill_empty_fields (0.00s)
PASS
ok github.com/containerd/containerd/pkg/cri/sbserver (cached)
$ go test -v ./pkg/cri/server/ -run TestUpdateOCILinuxResource
=== RUN TestUpdateOCILinuxResource
=== RUN TestUpdateOCILinuxResource/should_be_able_to_update_each_resource
=== RUN TestUpdateOCILinuxResource/should_skip_empty_fields
=== RUN TestUpdateOCILinuxResource/should_be_able_to_fill_empty_fields
=== RUN TestUpdateOCILinuxResource/should_be_able_to_patch_the_unified_map
--- PASS: TestUpdateOCILinuxResource (0.00s)
--- PASS: TestUpdateOCILinuxResource/should_be_able_to_update_each_resource (0.00s)
--- PASS: TestUpdateOCILinuxResource/should_skip_empty_fields (0.00s)
--- PASS: TestUpdateOCILinuxResource/should_be_able_to_fill_empty_fields (0.00s)
--- PASS: TestUpdateOCILinuxResource/should_be_able_to_patch_the_unified_map (0.00s)
PASS
ok github.com/containerd/containerd/pkg/cri/server (cached)
```
Signed-off-by: Qasim Sarfraz <qasimsarfraz@microsoft.com>
2023-01-10 15:41:04 +01:00
Phil Estes
54ec1919f3
Merge pull request #7929 from Iceber/ctr_run
...
ctr/run: flags --detach and --rm cannot be specified together
2023-01-09 14:37:51 -05:00
Fu Wei
da163ef3b8
Merge pull request #7935 from fangn2/fix-TestContainerConsumedStats
...
Fix Flaky Windows CRI Integration test on TestContainerConsumedStats
2023-01-09 21:18:59 +08:00
Fu Wei
fd1a4a2e71
Merge pull request #7917 from iyear/refactor-tx
...
Refactor snapshotters metastore transaction
2023-01-09 21:14:32 +08:00
Tony Fang
82d6c2f931
Revert container_stats_test.go change which caused Windows CRI integration test failure
...
PR #7892 which supposed to fix issue on Linux introduced random failure
on Windows, this commit is to revert that change for Windows platform
Signed-off-by: Tony Fang <nenghui.fang@gmail.com>
2023-01-09 05:22:25 +00:00
Akihiro Suda
5e7baa2eb3
Merge pull request #7932 from samuelkarp/upgrade-go-toml
...
mod: update github.com/pelletier/go-toml@v1.9.5
2023-01-07 13:44:44 +09:00
Iceber Gu
0b9313c426
ctr/run: flags --detach and --rm cannot be specified together
...
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>
2023-01-07 10:18:43 +08:00
Samuel Karp
6f9936e305
mod: update github.com/pelletier/go-toml@v1.9.5
...
Signed-off-by: Samuel Karp <samuelkarp@google.com>
2023-01-06 13:11:07 -08:00
Maksym Pavlenko
9bfe1d911c
Merge pull request #7927 from AkihiroSuda/improve-TestSourceDateEpoch
...
archive: improve TestSourceDateEpoch
2023-01-06 12:01:36 -08:00
Akihiro Suda
f0917fb6e0
archive: improve TestSourceDateEpoch
...
The previous test wasn't highly meaningful because 5 * (100 * Millisecond)
is smaller than a second.
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-01-06 11:22:14 +09:00
Derek McGowan
5ef8bd4f87
Merge pull request #7883 from fangn2/add-tracing-plugin-tests
...
Add tracing plugin test
2023-01-05 13:33:10 -08:00
Derek McGowan
70eada1fa3
Merge pull request #7925 from Iceber/content-flow
...
docs/content-flow: update the description of the content labels
2023-01-05 12:58:03 -08:00
iyear
9df5a1714d
snapshots: refactor metastore transaction
...
Signed-off-by: Junyu Liu <ljyngup@gmail.com>
2023-01-05 15:53:23 +08:00
Iceber Gu
f9a702105d
docs/content-flow: update the description of the content labels
...
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>
2023-01-05 14:03:31 +08:00
Iceber Gu
fc905324a6
docs/content-flow: update the digests of the redis:5.0.9
...
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>
2023-01-05 14:03:20 +08:00
Fu Wei
5fc727224e
Merge pull request #7861 from dmcgowan/cleanup-context
...
Add cleanup package for context management during cleanup
2023-01-05 13:18:31 +08:00
Tony Fang
0de12cf7e5
Add tracing plugin test
...
Add tracing related plugins to the registration test
Signed-off-by: Tony Fang <nenghui.fang@gmail.com>
2023-01-05 00:25:10 +00:00
Phil Estes
72e5ddb516
Merge pull request #7886 from dmcgowan/fix-transfer-register-ordering
...
Fix race between stream registration and use
2023-01-04 14:49:28 -05:00
Derek McGowan
b550526ccd
Use cleanup.Background instead of context.Background for cleanup
...
Use the cleanup context to re-use values from the original context
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-01-04 11:22:24 -08:00
Derek McGowan
ef9c2a689a
Merge pull request #7903 from dmcgowan/prepare-1.7.0-beta.2
...
Prepare release notes for v1.7.0-beta.2
2023-01-04 10:46:21 -08:00
Fu Wei
28e8e247b9
Merge pull request #7892 from AkihiroSuda/cri-integration-cgroup2
...
Cirrus CI (Fedora 37, Rocky 8): enable cri-integration
2023-01-04 20:21:14 +08:00
Derek McGowan
38159694fc
Prepare release notes for v1.7.0-beta.2
...
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-01-03 22:45:07 -08:00
Maksym Pavlenko
b7b0ee060c
Merge pull request #7891 from AkihiroSuda/integration-in-docker
...
contrib/Dockerfile.test: add "integration", "cri-integration", "critest" stages
2023-01-03 20:27:43 -08:00
Maksym Pavlenko
0d6e61a609
Merge pull request #7914 from changweige/fix-tracing-doc-typo
...
docs: fix a typo in tracing documentation
2023-01-03 20:26:51 -08:00
Changwei Ge
88c8d2e39c
docs: fix a typo in tracing documentation
...
It should be "daemon"
Signed-off-by: Changwei Ge <gechangwei@bytedance.com>
2023-01-04 10:27:36 +08:00
Derek McGowan
8b15917123
Merge pull request #7913 from kevpar/rate-limit
...
CI: Pass GITHUB_TOKEN to containerd/project-checks
2023-01-03 16:39:59 -08:00
Kevin Parsons
79d09c69b4
CI: Pass GITHUB_TOKEN to containerd/project-checks
...
Previously the project-checks action was failing sometimes due to
hitting GitHub API rate limits. Since no token was supplied, the rate
limits were only 60 requests/hour keyed off the IP address of the
runner.
Now, passing GITHUB_TOKEN secret through to project-checks, we have a
limit of 1000 requests/hour for the whole repo. This should alleviate
the rate limits that were being seen.
I believe it is safe to pass this secret as project-checks is also owned
by the containerd organization. The secret is also scoped to the actions
run, and is invalidated upon completion.
project-checks version is also updated to the version that supports
repo-access-token input.
Signed-off-by: Kevin Parsons <kevpar@microsoft.com>
2023-01-03 15:48:51 -08:00
Akihiro Suda
c6aa1db8e6
Merge pull request #7911 from mxpv/dupword
...
Enable dupword linter
2023-01-04 07:38:36 +09:00
Samuel Karp
f15563c26d
Merge pull request #7905 from dcantah/ctr-ocispec-plat
2023-01-03 14:33:06 -08:00
Maksym Pavlenko
06bfcd658c
Enable dupword linter
...
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-01-03 12:47:16 -08:00
Danny Canter
0abc2f160c
ctr: Add platform flag to 'oci spec' command
...
This adds in a simple flag to control what platform the spec it generates
is for. Useful to easily get a glance at whats the default across platforms.
Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-01-03 12:44:26 -08:00
Derek McGowan
f606c4eba7
Add cleanup package for context management during cleanup
...
Provides a couple helper functions that provide a background context for
running cleanup jobs while preserving the original context values.
The new contexts will not inherit the errors or cancellations.
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-01-03 12:30:26 -08:00
Maksym Pavlenko
c5c636b7a9
Merge pull request #7907 from AkihiroSuda/vagrantfile-fix-virtualbox
...
Vagrantfile: fix disk resize error with VirtualBox
2023-01-03 12:08:02 -08:00
Akihiro Suda
419b5ab042
Cirrus CI (Fedora 37, Rocky 8): enable cri-integration
...
Fix issue 7889
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-01-04 02:20:43 +09:00
Akihiro Suda
7b1f08bf50
nri_test.go: skip if SELinux is enabled
...
SELinux relabeling is not implemented for NRI yet
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-01-04 02:20:42 +09:00
Akihiro Suda
dcbb32d6fb
cri-integration: set SelinuxRelabel
...
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-01-04 02:20:42 +09:00
Akihiro Suda
0f163d6960
TestVolumeOwnership: compare GID, not group name
...
The name of the GID 65534 differs across distros.
("nogroup" on Debian derivatives, "nobody" on Red Hat derivatives)
Fix the following test failure:
```
=== RUN TestVolumeOwnership
volume_copy_up_test.go:103: Create a sandbox
main_test.go:667: Pull test image "ghcr.io/containerd/volume-ownership:2.1"
volume_copy_up_test.go:108: Create a container with volume-ownership test image
volume_copy_up_test.go:117: Start the container
volume_copy_up_test.go:125: Check ownership of test directory inside container
volume_copy_up_test.go:146: Check ownership of test directory on the host
volume_copy_up_test.go:153:
Error Trace: /root/go/src/github.com/containerd/containerd/volume_copy_up_test.go:153
Error: Not equal:
expected: "nobody:nogroup\n"
actual : "nobody:nobody\n"
Diff:
--- Expected
+++ Actual
@@ -1,2 +1,2 @@
-nobody:nogroup
+nobody:nobody
Test: TestVolumeOwnership
--- FAIL: TestVolumeOwnership (3.45s)
```
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-01-04 02:20:42 +09:00
Akihiro Suda
76d68b080e
container_stats_test.go: avoid checking snapshot size
...
On Linux, the snapshot size differs depending on the backing filesystem.
See issue 7909.
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-01-04 02:20:41 +09:00
Mike Brown
b21d28b458
Merge pull request #7908 from AkihiroSuda/vagrantfile-fix-comments
...
Vagrantfile: fix comments about SELinux
2023-01-03 11:19:08 -06:00
Akihiro Suda
4adf3fb3af
Merge pull request #7906 from Iceber/use_label_uncompressed
...
Use the const labels.LabelUncompressed
2023-01-04 01:04:20 +09:00
Akihiro Suda
24a255ce96
Merge pull request #7850 from dmcgowan/sandbox-store-local-plugin
...
[sandbox] Add sandbox store plugin type
2023-01-04 00:21:06 +09:00
Akihiro Suda
12955d291e
Vagrantfile: fix comments about SELinux
...
SELinux has been enforcing since commit a7f24b29c2
(PR 4698, v1.5.0)
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-01-03 21:02:33 +09:00