Commit Graph

13124 Commits

Author SHA1 Message Date
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
Akihiro Suda
bb86c6e576
contrib/Dockerfile.test: add "integration", "cri-integration", "critest" stages
For ease of running the entire tests locally

```
cd contrib

docker build -t containerd-test -f Dockerfile.test --target integration ..
docker run --privileged containerd-test

docker build -t containerd-test -f Dockerfile.test --target cri-integration ..
docker run --privileged --sysctl net.ipv6.conf.all.disable_ipv6=0 containerd-test

docker build -t containerd-test -f Dockerfile.test --target critest ..
docker run --privileged --sysctl net.ipv6.conf.all.disable_ipv6=0 containerd-test
```

Tested on Ubuntu 22.10 (amd64, cgroup v2).

Known issues:
- cri-integration and critest: require `--sysctl net.ipv6.conf.all.disable_ipv6=0` to avoid
  errors like `failed to set bridge addr: could not add IP address to "cni0": permission denied`

- critest: Often fails due to Docker Hub rate limits. Fix is coming in kubernetes-sigs/cri-tools PR 1053

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-01-03 20:19:38 +09:00
Akihiro Suda
5e84f08c4a
Vagrantfile: fix disk resize error with VirtualBox
Fix the following error with VirtualBox:
```
VirtualBox Provider:
* The following settings shouldn't exist: disk
```

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-01-03 20:13:42 +09:00
Akihiro Suda
88c8480a38
Merge pull request #7893 from AkihiroSuda/fix-7890
Fix TestUpdateContainerResources_Memory* on cgroup v2 hosts
2023-01-03 19:52:50 +09:00
Iceber Gu
778e8f2af4 Use the const labels.LabelUncompressed
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>
2023-01-03 18:29:21 +08:00
Akihiro Suda
a0b8401ea9
Merge pull request #7904 from dcantah/cri-misc-fixes
CRI: Comment cleanup/misc fixes
2023-01-03 16:08:54 +09:00
Derek McGowan
a5b979623e
Add lease to transfer to preserve streams during transfer
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-01-02 21:50:02 -08:00
Danny Canter
3f0edb249b CRI: Comment cleanup/misc fixes
Comments in initPlatform for Windows states that the options were
Linux specific. Additionally properly wrap an error after trying
to setup CDI on Linux.

Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-01-02 18:55:31 -08:00
Fu Wei
9a7c264d25
Merge pull request #5674 from dmcgowan/metadata-snapshot-publish 2023-01-03 09:23:48 +08:00
Fu Wei
93370c806b
Merge pull request #7887 from AkihiroSuda/vagrantfile-remove-setenforce-0 2023-01-03 08:49:25 +08:00
Derek McGowan
5e2b7c5b7a
Merge pull request #7894 from my-git9/cleanup/errdefs
reused package errdefs for error
2023-01-02 11:57:58 -08:00
Derek McGowan
1d43149c79
Merge pull request #7888 from AkihiroSuda/integration-images-switch-away-from-dockerhub
integration/images: switch away from Docker Hub to avoid rate limit
2023-01-02 11:33:54 -08:00