Commit Graph

10248 Commits

Author SHA1 Message Date
Derek McGowan
591d7097e7
Merge pull request #6290 from gabriel-samfira/add-test-image-build-action
Integration: Add image build workflow
2021-11-30 13:51:24 -08:00
Maksym Pavlenko
f419d4a0ac
Merge pull request #6286 from aznashwan/windows-integration-separate-trigger
Integration: Separate Windows Periodic Tests workflow trigger.
2021-11-30 12:41:04 -08:00
Phil Estes
3d1c85d954
Merge pull request #6274 from gabriel-samfira/build-image-on-windows
Build volume test images on Windows
2021-11-30 09:49:08 -05:00
Phil Estes
2a36dcdda3
Merge pull request #6297 from adisky/patch-2
Add VMware TKG & TCE to Containerd adopters
2021-11-30 09:45:21 -05:00
Aditi Sharma
7a4415dd57 Add VMware TKG & TCE to Containerd adopters
Signed-off-by: Aditi Sharma <adi.sky17@gmail.com>
2021-11-30 12:29:19 +05:30
Derek McGowan
8757b92c76
Merge pull request #6293 from AkihiroSuda/fedora35
Vagrantfile: update to Fedora 35
2021-11-29 09:28:16 -08:00
Mike Brown
1fe214c22a
Merge pull request #6269 from estesp/test-ci-readme
Update README.md repo->org
2021-11-29 08:42:29 -06:00
Akihiro Suda
46892d3408
Vagrantfile: update to Fedora 35
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-11-29 16:13:32 +09:00
Akihiro Suda
2877865a94
Merge pull request #6278 from mxpv/resolve
Fix executable file not found when restoring shims
2021-11-29 13:33:12 +09:00
Maksym Pavlenko
9e7910ebdc
Merge pull request #6271 from fuweid/move_stdout_to_stderr
ctr/snapshots/diff: show media-type in stderr
2021-11-28 11:29:21 -08:00
Maksym Pavlenko
0d720ff9c9
Merge pull request #6289 from ManaSugi/add-ctr-caps
ctr: Add Linux Capabilities control flags
2021-11-28 11:26:50 -08:00
Maksym Pavlenko
7cfccdbad6
Merge pull request #6270 from fuweid/enhance_test_case
integration: add stats result in error message
2021-11-28 11:23:37 -08:00
Wei Fu
8de1117c99 integration: add stats result in error message
```
// from  https://github.com/containerd/containerd/pull/6150#issuecomment-974747473

container_stats_test.go:364:
        	Error Trace:	container_stats_test.go:364
        	Error:      	Received unexpected error:
        	            	unexpected stats length
        	            	github.com/containerd/containerd/integration.TestContainerListStatsWithIdSandboxIdFilter.func4
        	            		/home/runner/work/containerd/containerd/integration/container_stats_test.go:371
        	            	github.com/containerd/containerd/integration.Eventually
        	            		/home/runner/work/containerd/containerd/integration/main_test.go:324
        	            	github.com/containerd/containerd/integration.TestContainerListStatsWithIdSandboxIdFilter
        	            		/home/runner/work/containerd/containerd/integration/container_stats_test.go:364
        	            	testing.tRunner
        	            		/opt/hostedtoolcache/go/1.17.3/x64/src/testing/testing.go:1259
        	            	runtime.goexit
        	            		/opt/hostedtoolcache/go/1.17.3/x64/src/runtime/asm_amd64.s:1581
        	Test:       	TestContainerListStatsWithIdSandboxIdFilter
```

Add stats result for the purpose of debug.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2021-11-28 16:57:40 +08:00
Wei Fu
6681cc4b94 ctr/snapshots/diff: don't show the media-type in output
By default, diff subcommand will print tar(.gz) on stdout. If we print
the media-type in stdout, the output will create invalid tar(.gz) data.

```
// before
➜  containerd git:(move_stdout_to_stderr) sudo ctr snapshot diff sha256:9f54eef412758095c8079ac465d494a2872e02e90bf1fb5f12a1641c0d1bb78b > /tmp/1.tar
➜  containerd git:(move_stdout_to_stderr) file /tmp/1.tar
/tmp/1.tar: data

// after change
➜  containerd git:(move_stdout_to_stderr) make bin/ctr
+ bin/ctr
➜  containerd git:(move_stdout_to_stderr) sudo bin/ctr snapshot diff sha256:9f54eef412758095c8079ac465d494a2872e02e90bf1fb5f12a1641c0d1bb78b > /tmp/2.tar

➜  containerd git:(move_stdout_to_stderr) file /tmp/2.tar
/tmp/2.tar: gzip compressed data, original size modulo 2^32 75155456
```

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2021-11-28 10:38:42 +08:00
Kohei Tokunaga
a97564411c remotes: fix dockerPusher to handle abort correctly
`dockerPusher` provides `pushWriter` which implements `content.Writer`.
However, even if `pushWriter` become abort status (i.e. `Close()` is called
before `Commit()`), `dockerPusher` doesn't recognise that status and treats that
writer as on-going.
This behaviour doesn't allow the client to retry an aborted push.

This commit fixes this issue.
This commit also adds an test to ensure that the issue is fixed.

Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2021-11-26 13:43:01 +09:00
Gabriel Adrian Samfira
1698d061c3 Build volume test images on Windows
* Adds Windows dockerfile for volume-ownership image
  * Build volume-copy-up on Windows
  * Adds a helper tool that fetches the owner username and SID of
a file or folder
  * Adds README
  * Remove 2004 from Windows versions
  * Add ltsc2022 to Windows versions

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2021-11-25 09:54:35 +00:00
Gabriel Adrian Samfira
7ccd733d25 Add image build workflow
This change adds a new workflow that builds the volume test images
and pushes them to a remote registry.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2021-11-25 09:26:17 +00:00
Manabu Sugimoto
95b3ab2a4a ctr: Add Linux Capabilities control flags
This allows Linux Capabilities to be modified via `ctr`.

e.g.
```
$ sudo ./bin/ctr run --cap-add "CAP_SYS_ADMIN" --cap-drop "CAP_NET_RAW" \
--rm docker.io/library/busybox:latest foo cat /proc/self/status | grep Cap
CapInh: 00000000a82405fb
CapPrm: 00000000a82405fb
CapEff: 00000000a82405fb
CapBnd: 00000000a82405fb
CapAmb: 0000000000000000
```

Signed-off-by: Manabu Sugimoto <Manabu.Sugimoto@sony.com>
2021-11-25 14:50:43 +09:00
Akihiro Suda
ff1a105d7f
Merge pull request #6287 from samuelkarp/1.4-extended-docs
releases: mark 1.4 as Extended
2021-11-25 07:20:25 +09:00
Samuel Karp
3d318b3bb4
docs: mark 1.4 as Extended
Signed-off-by: Samuel Karp <skarp@amazon.com>
2021-11-24 10:19:26 -08:00
Samuel Karp
9a994877cc
docs: fix RELEASES.md gRPC API anchor
Signed-off-by: Samuel Karp <skarp@amazon.com>
2021-11-24 10:19:26 -08:00
Nashwan Azhari
0a25bc1aac Integration: Separate Windows Periodic Tests workflow trigger.
Following PR #6284, the Windows Periodic Workflow is prevented from
running on any repository outside of the original.

While this achieves the goal of preventing senseless Windows workflow
failures in contributors' forks, it makes running the workflow for
contributors (even manually) impossible.

This PR adds a separate workflow file which triggers the Windows
Integration workflow iff it is being run off of the original repository,
thus maintaining the upstream scheduling, while allowing contributors to
manually trigger the workflow on their forks if they so desire.

Signed-off-by: Nashwan Azhari <nazhari@cloudbasesolutions.com>
2021-11-24 18:18:14 +02:00
Phil Estes
0a284fcdbc
Merge pull request #6284 from jonyhy96/feat-ci-skip-fork
feat: skip ci for fork
2021-11-23 23:20:37 -05:00
haoyun
507bfc91ba feat: skip ci for fork
Signed-off-by: haoyun <yun.hao@daocloud.io>
2021-11-24 10:24:13 +08:00
Maksym Pavlenko
cf6f19cea0
Merge pull request #6280 from wzshiming/fix/close-with-seek-fail
content/local: Close the file if Seek fails
2021-11-23 12:38:17 -08:00
Phil Estes
72384a6531
Merge pull request #6268 from aznashwan/windows-ci-autodetect-az-cli
Integration: Remove explicit version passing to `azure/CLI`.
2021-11-23 12:44:35 -05:00
Shiming Zhang
9dfbcbbc48 content/local: Close the file if Seek fails
Signed-off-by: Shiming Zhang <wzshiming@foxmail.com>
2021-11-23 16:18:13 +08:00
Maksym Pavlenko
5015130f7a Fix executable file not found when restoring shims
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2021-11-22 17:46:03 -08:00
Phil Estes
51e60404ae
Merge pull request #6276 from sachaos/feature/fix-wrong-document-about-make-install-deps
Fix wrong make target on documentation
2021-11-22 16:50:07 -05:00
Takumasa Sakao
2b28dd363b Fix wrong make target on documentation
Signed-off-by: Takumasa Sakao <sakataku7@gmail.com>
2021-11-23 03:42:08 +09:00
Nashwan Azhari
cb1359fa8b Integration: Remove explicit version passing to azure/CLI.
In the Windows CI's periodic runs the `azure/CLI` GitHub action library
is leveraged to run various Azure-related commands.

To avoid possible desyncing between the auth libraries of `azure/Login`
and `azure/CLI` as described
[here](https://github.com/Azure/cli/issues/56#issuecomment-958705517),
this patch neglects to pass an explicit `azcliversion` to `azure/CLI` in
order to have it default to the Azure CLI version set up by `azure/Login`.

Signed-off-by: Nashwan Azhari <nazhari@cloudbasesolutions.com>
2021-11-22 20:15:36 +02:00
Fu Wei
b6b8facf15
Merge pull request #6272 from jonyhy96/fix-error-return 2021-11-22 17:35:56 +08:00
haoyun
fa6759ae53 fix: server error return
Signed-off-by: haoyun <yun.hao@daocloud.io>
2021-11-22 13:54:53 +08:00
Derek McGowan
1a88cf5242
Merge pull request #6267 from dmcgowan/prepare-v1.6.0-beta.3
Prepare release notes for v1.6.0-beta.3
2021-11-19 09:41:32 -08:00
Phil Estes
5e4b033ecd
Update README.md repo->org
Update wording; but really I'm trying to test something with CI
runs/automation.

Signed-off-by: Phil Estes <estesp@amazon.com>
2021-11-19 12:23:59 -05:00
Derek McGowan
db9c6fc722
Merge pull request #6254 from jonyhy96/feat-support-callopts
feat:support custom callopts on client side
2021-11-18 21:41:03 -08:00
Fu Wei
69822aa936
Merge pull request #6258 from wllenyj/fix-registry-panic 2021-11-19 13:35:46 +08:00
wanglei01
5f293d9ac4 [CRI] Fix panic when registry.mirrors use localhost
When containerd use this config:

```
[plugins."io.containerd.grpc.v1.cri".registry.mirrors]
  [plugins."io.containerd.grpc.v1.cri".registry.mirrors."localhost:5000"]
      endpoint = ["http://localhost:5000"]
```

Due to the `newTransport` function does not initialize the `TLSClientConfig` field.
Then use `TLSClientConfig` to cause nil pointer dereference

Signed-off-by: wanglei <wllenyj@linux.alibaba.com>
2021-11-19 10:56:46 +08:00
Maksym Pavlenko
af93ea7f1e
Merge pull request #6241 from jterry75/main
Add support for TMP override on toml
2021-11-18 16:43:51 -08:00
Derek McGowan
674b94c42b
Prepare release notes for v1.6.0-beta.3
Signed-off-by: Derek McGowan <derek@mcg.dev>
2021-11-18 16:21:19 -08:00
Derek McGowan
f5863e22f4
Update API version in go.mod
Signed-off-by: Derek McGowan <derek@mcg.dev>
2021-11-18 16:21:19 -08:00
Derek McGowan
5df9ec3665
Update release name to use consistent format
Signed-off-by: Derek McGowan <derek@mcg.dev>
2021-11-18 13:48:47 -08:00
Michael Crosby
aa2733c202
Merge pull request #6170 from olljanat/default-sysctls
CRI: Support enable_unprivileged_icmp and enable_unprivileged_ports options
2021-11-18 11:37:23 -05:00
haoyun
f8d734e406 fix: make max recv/send msg size setting default
Signed-off-by: haoyun <yun.hao@daocloud.io>
2021-11-18 09:54:31 +08:00
Derek McGowan
a776a27af5
Merge pull request from GHSA-5j5w-g665-5m35
images: validate document type before unmarshal
2021-11-17 10:54:25 -08:00
Derek McGowan
9afc778b73
Merge pull request #6111 from crosbymichael/latency-metrics
[cri] add sandbox and container latency metrics
2021-11-16 16:59:33 -08:00
Justin Terry
63895de455 Add support for TMP override on toml
When running containerd as a service it may be hard to
override the TMP location of the process. This is especially
true on Windows when running containerd in SCM. This change
allows you to set the 'temp' location in the config.toml when
the service starts up that overrides its TEMP/TMP/TMPDIR usage.

This is helpful on Linux as well but it primarily solves the
performance issue on Windows when running containerd across
volumes. IE: If you configure your data/root paths on a volume
other than the SystemDrive the snapshotter does a temporary unpack
on the SystemDrive and then has to copy contents of that data
to the snapshot folder on the destination volume. By alinging the
tmp with the destination it is a simple move operation instead of
a copy operation.

Signed-off-by: Justin Terry <jlterry@amazon.com>
2021-11-16 10:43:48 -08:00
Maksym Pavlenko
4aea5da858
Merge pull request #6255 from aznashwan/generalize-windows-ci-setup-user
Integration: Generalize Windows CI setup scripts for any username.
2021-11-16 10:12:01 -08:00
Phil Estes
7758cdc09a
Merge pull request #6253 from jonyhy96/feat-rwmutex
feat: use rwmutex instead
2021-11-16 11:39:29 -05:00
Nashwan Azhari
444ef2f6d7 Generalize Windows CI setup script for any user.
The current Windows CI setup script assumes it will always be run under
the `azureuser` username.

While this username is defined in the Windows CI GitHub action, the
current version of the script both exposes us to a future risk of
breaking should the CI action be changed, and is also unfriendly to
`curl | sh`-ing it for quick test environment setups.

This patch makes the Windows CI setup script work with any username
provided they have administrative privileges.

Signed-off-by: Nashwan Azhari <nazhari@cloudbasesolutions.com>
2021-11-16 17:30:40 +02:00