Commit Graph

10590 Commits

Author SHA1 Message Date
Fu Wei
e1ad779107
Merge pull request #5817 from dmcgowan/shim-plugins
Add support for shim plugins
2021-09-12 18:18:20 +08:00
Alakesh Haloi
91b64c58b1 add xfs support to devicemapper snapshotter
ext4 file system was supported before. This adds support for xfs as
well. Containerd config file can have fs_type as an additional option
with possible values as "xfs" and "ext4" for now. In future other
fstype support can be added. A snapshot created from a committed
snapshot inherits the file system type of the parent. Any new snapshots
that has no parent is created with the file system type indicated in
config. If there is no config for file system type is found, then
ext4 is assumed. This allows users to use xfs as an optional file system
type.

Signed-off-by: Alakesh Haloi <alakeshh@amazon.com>
2021-09-11 21:43:27 -07:00
Akihiro Suda
3d734d0345
Merge pull request #5976 from ukontainer/pr-continuity
vendor: update continuity for darwin support
2021-09-11 20:32:48 +09:00
Fu Wei
d9f921e4f0
Merge pull request #5906 from thaJeztah/replace_os_exec 2021-09-11 10:38:53 +08:00
Fu Wei
8766f2118c
Merge pull request #5972 from zouyee/labels 2021-09-11 09:42:43 +08:00
Fu Wei
94b86a6b97
Merge pull request #5966 from dmcgowan/fix-unexpected-eof-handling 2021-09-11 09:28:12 +08:00
Hajime Tazaki
8ff8b1b823 vendor: update continuity for darwin support
This picks a fix to properly handle images containing symlinks
inside which point to an unexisting file.

Signed-off-by: Hajime Tazaki <thehajime@gmail.com>
2021-09-11 08:32:37 +09:00
Phil Estes
6589876d20
Merge pull request #5964 from crosbymichael/cni-pref
add ip_pref CNI options for primary pod ip
2021-09-10 12:06:23 -04:00
Fu Wei
689a863efe
Merge pull request #5939 from scuzhanglei/privileged-device 2021-09-10 22:15:46 +08:00
Michael Crosby
1ddc54c00d
Merge pull request #5954 from claudiubelu/fix-sandbox-remove
sandbox: Allows the sandbox to be deleted in NotReady state
2021-09-10 10:12:34 -04:00
Michael Crosby
1efed43090
add ip_pref CNI options for primary pod ip
This fixes the TODO of this function and also expands on how the primary pod ip
is selected. This change allows the operator to prefer ipv4, ipv6, or retain the
ordering provided by the return results of the CNI plugins.

This makes it much more flexible for ops to configure containerd and how IPs are
set on the pod.

Signed-off-by: Michael Crosby <michael@thepasture.io>
2021-09-10 10:04:21 -04:00
zounengren
16cd6ed137 Additional integration tests for pulling image with labels
Signed-off-by: Zou Nengren <zouyee1989@gmail.com>
2021-09-10 20:16:57 +08:00
scuzhanglei
756f4a3147 cri: add devices for privileged container
Signed-off-by: scuzhanglei <greatzhanglei@gmail.com>
2021-09-10 10:16:26 +08:00
Fu Wei
a4d64e5e00
Merge pull request #5969 from crosbymichael/pin-pbuild 2021-09-10 07:48:48 +08:00
Derek McGowan
55c55b0711
Merge pull request #5965 from crosbymichael/ctd-metric
Add metric exposing build version&revision
2021-09-09 14:47:35 -07:00
Michael Crosby
9954147c03
pin protobuild version to tag
Signed-off-by: Michael Crosby <michael@thepasture.io>
2021-09-09 15:26:25 -04:00
Derek McGowan
2458afeb13
Fix content copy to not ignore unexpected EOF
Signed-off-by: Derek McGowan <derek@mcg.dev>
2021-09-09 10:01:51 -07:00
Michael Crosby
6bec0d39b0
use a const metric for build_info
Signed-off-by: Michael Crosby <michael@thepasture.io>
2021-09-09 12:20:14 -04:00
Nicolas Chariglione
ae27a6b05c Add metric exposing build version&revision
Signed-off-by: Nicolas Chariglione <nicolas.chariglione@gmail.com>
2021-09-09 11:59:22 -04:00
Fu Wei
d58542a9d1
Merge pull request #5627 from payall4u/payall4u/cri-support-cgroup-v2 2021-09-09 23:10:33 +08:00
Michael Crosby
d040ca3845
Merge pull request #5861 from kzys/restart-monitor
integration: investigate TestRestartMonitor's failure
2021-09-09 10:56:40 -04:00
Michael Crosby
5e32e9d855
Merge pull request #5917 from mxpv/issue_forms
Use issue forms for bug reporting
2021-09-09 10:53:52 -04:00
Derek McGowan
b01cad3b56
Merge pull request #5945 from fuweid/fix_5900
cri: patch update image labels
2021-09-08 09:14:52 -07:00
Phil Estes
99987f2a5e
Merge pull request #5936 from ukontainer/feature-darwin-runtime-shim
darwin: runtime support
2021-09-08 09:34:27 -04:00
Phil Estes
bdb41f6079
Merge pull request #5858 from levinxo/patch-1
Update RELEASES.md
2021-09-08 09:30:38 -04:00
Phil Estes
5540fc4280
Merge pull request #5949 from wzshiming/fix/write-diff
archive: Add WriteDiff error logs
2021-09-08 09:28:49 -04:00
Phil Estes
bef14adfd9
Merge pull request #5958 from zouyee/dail
replace deprecated Dialer with ContextDialer
2021-09-08 09:28:18 -04:00
Akihiro Suda
b06d0a3e0d
Merge pull request #5951 from adelina-t/ws_2022_job
Add WS2022 support in Windows Periodic tests
2021-09-08 22:06:40 +09:00
zounengren
8e850bc0fe replace deprecated Dail with DailContext
Signed-off-by: Zou Nengren <zouyee1989@gmail.com>
2021-09-08 06:41:33 +08:00
Phil Estes
ff75f7d489
Merge pull request #5943 from AdamKorcz/fuzz13
Content fuzzer: Clean up temp store dir
2021-09-07 12:43:38 -04:00
Phil Estes
0ae5c41f1b
Merge pull request #5944 from zouyee/deprecated
using Hosts replace deprecated field
2021-09-07 10:15:50 -04:00
Phil Estes
132aa56ee7
Merge pull request #5947 from kerthcet/feature/upgrade-pause-image-to-3.6
fix document non-synchronous
2021-09-07 10:12:42 -04:00
Adelina Tuvenie
aeea697d84 Add WS2022 support in Windows Periodic tests
Some extra steps were added for WS2022 in accordance with
the published image on Azure:
- Install Container Feature & reboot VM
- Create NAT network

Temporarily we skip critest steps for WS2022 until all test images
are updated in that project.

Signed-off-by: Adelina Tuvenie <atuvenie@cloudbasesolutions.com>
2021-09-07 15:42:58 +03:00
Claudiu Belu
55faa5e93d task delete: Closes task IO before waiting
After containerd restarts, it will try to recover its sandboxes,
containers, and images. If it detects a task in the Created or
Stopped state, it will be removed. This will cause the containerd
process it hang on Windows on the t.io.Wait() call.

Calling t.io.Close() beforehand will solve this issue.

Additionally, the same issue occurs when trying to stopp a sandbox
after containerd restarts. This will solve that case as well.

Signed-off-by: Claudiu Belu <cbelu@cloudbasesolutions.com>
2021-09-07 02:17:01 -07:00
Claudiu Belu
f42513112f integration: Adds Windows HostProcess tests
Windows HostProcess containers can run containerized workloads on a Windows host.
These containers operate as normal processes but have access to the host network
namespace, storage, and devices when given the appropriate user privileges.

HostProcess containers support the ability to run as one of the following Windows
service accounts: LocalSystem, LocalService, NetworkService.

Signed-off-by: Claudiu Belu <cbelu@cloudbasesolutions.com>
2021-09-07 00:30:28 -07:00
Shiming Zhang
ccc5ee3038 archive: Add WriteDiff error logs
Signed-off-by: Shiming Zhang <wzshiming@foxmail.com>
2021-09-06 18:04:17 +08:00
kerthcet
820bd92690 fix document non-synchronous in crictl.md
Signed-off-by: kerthcet <kerthcet@gmail.com>
2021-09-06 17:47:46 +08:00
Wei Fu
2bcd6a4e88 cri: patch update image labels
The CRI-plugin subscribes the image event on k8s.io namespace. By
default, the image event is created by CRI-API. However, the image can
be downloaded by containerd API on k8s.io with the customized labels.
The CRI-plugin should use patch update for `io.cri-containerd.image`
label in this case.

Fixes: #5900

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2021-09-05 18:48:26 +08:00
zounengren
789abc9367 using Hosts replace deprecated field
Signed-off-by: Zou Nengren <zouyee1989@gmail.com>
2021-09-05 11:52:46 +08:00
Claudiu Belu
57e10439d9 Fixes task kill --force on Windows
Process.Kill might still return an IsNotFound error, even if it
actually killed the process. We should wait for the process to
finish in the first place. Otherwise, when querying the task's
status, we might still see it running, resulting in an error.

Signed-off-by: Claudiu Belu <cbelu@cloudbasesolutions.com>
2021-09-04 13:54:46 -07:00
Claudiu Belu
abf4de4985 integration: Enables Windows containerd restart test
The test sets container's Linux.SecurityContext.NamespaceOptions.Pid = NamespaceMode_CONTAINER,
which will ensure that the container keeps running even if the sandbox container dies. We do
not have that option on Windows.

Adds additional logging in the test, so it is easier to figure out which assertion failed.

Signed-off-by: Claudiu Belu <cbelu@cloudbasesolutions.com>
2021-09-04 13:52:33 -07:00
AdamKorcz
96ec0b6f34 content fuzzer: Clean up tempdir
Signed-off-by: AdamKorcz <adam@adalogics.com>
2021-09-04 13:41:11 +01:00
Phil Estes
61a46e9fdd
Merge pull request #5929 from dcantah/update-hcsshim-0.8.21
go.mod: Update hcsshim to v0.8.21
2021-09-03 08:45:41 -04:00
Fu Wei
dd8b6ee3fb
Merge pull request #5937 from kolyshkin/riscv-pie 2021-09-03 13:52:29 +08:00
Kir Kolyshkin
eb2530be84 Makefile.linux: build on riscv with PIE
Since go 1.16, -buildmode=pie is supported on riscv [1],
so let's remove the platform from the exclusion list.

This reverts commit e34bf08e58.

[1] https://golang.org/doc/go1.16#riscv

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2021-09-02 20:06:40 -07:00
Claudiu Belu
6b0b64a51a ctr: Fixes Windows image import
A previous commit made the Windows containerd/platforms.Default stricter
by requiring the OS Version to have a similar OS Version as the node's OS Version.

However, tar images (from docker save) do not have any OS Version information,
causing the containerd/import.Import's images.FilterPlatforms to filter out the image
entirely, which means that the images.SetChildrenLabels doesn't get to label
any children, which in turn will cause the Garbage Collector to remove content
related to the image.

This sets a default platform for the imported image if it's a Windows image which
doesn't have any OSVersion information, or if there's no platform information at
all.

Signed-off-by: Claudiu Belu <cbelu@cloudbasesolutions.com>
2021-09-02 19:27:28 -07:00
Hajime Tazaki
a43fa9f284 darwin: runtime support
This commit attemts to support containerd on darwin platform.  With an
external runtime shim, ctr run should work with, for instance,
--runtime=io.containerd.runu.v1.  An example of runtime and shim is
managed under different repository (github.com/ukontainer/runu/).

Signed-off-by: Hajime Tazaki <thehajime@gmail.com>
2021-09-03 09:48:21 +09:00
Hajime Tazaki
5dd38792a8 darwin: use the default values for socketRoot variable
Since the /run directory on macOS is read-only, darwin containerd should
use a different directory.  Use the pre-defined default values instead
to avoid this issue.

Fixes: bd908acab ("Use path based unix socket for shims")
Signed-off-by: Hajime Tazaki <thehajime@gmail.com>
2021-09-03 09:48:21 +09:00
Fu Wei
1dfd8a279e
Merge pull request #5932 from dcantah/ctr-exec-add-cwd 2021-09-02 20:42:36 +08:00
Daniel Canter
27046a9e06 Fix cwd flag for ctr tasks exec
It seems like the cwd flag isn't used anywhere for ctr tasks exec. This change
just sets the cwd field on the spec for the execed process if a new one was
asked for, otherwise it will continue using whatever was on the containers spec.

Signed-off-by: Daniel Canter <dcanter@microsoft.com>
2021-09-02 03:59:56 -07:00