Commit Graph

10081 Commits

Author SHA1 Message Date
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
Claudiu Belu
24cec9be56 sandbox: Allows the sandbox to be deleted in NotReady state
The Pod Sandbox can enter in a NotReady state if the task associated
with it no longer exists (it died, or it was killed). In this state,
the Pod network namespace could still be open, which means we can't
remove the sandbox, even if --force was used.

Signed-off-by: Claudiu Belu <cbelu@cloudbasesolutions.com>
2021-09-02 03:40:56 -07:00
Daniel Canter
1dd0d59b73 go.mod: Update hcsshim to v0.8.21
This version brings in some bug fixes to layer handling. The actual fix isn't
present in the diff as it's not used here, but the Windows shim is built from
the tag present in go.mod, so the fix will be in the Windows shim on a new release
of Containerd if this tag is in.

Signed-off-by: Daniel Canter <dcanter@microsoft.com>
2021-08-31 15:09:35 -07:00
Mike Brown
e00f87f1dc
Merge pull request #5927 from adelina-t/ws_2022_image_update
Update Pause image in tests & config
2021-08-31 16:11:57 -05:00
Mike Brown
4bc5ca76e7
Merge pull request #5122 from mythi/non-root-containers-and-devices-v2
cri: Devices ownership from SecurityContext
2021-08-31 16:11:18 -05:00
Adelina Tuvenie
6d3d34b85d Update Pause image in tests & config
With the introduction of Windows Server 2022, some images have been updated
to support WS2022 in their manifest list. This commit updates the test images
accordingly.

Signed-off-by: Adelina Tuvenie <atuvenie@cloudbasesolutions.com>
2021-08-31 19:42:57 +03:00
Maksym Pavlenko
278176db15 Address issue forms feedback
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2021-08-30 11:46:27 -07:00
Phil Estes
44d5a7e26d
Merge pull request #5921 from ktock/fix-failed-precondition
Fix pull fails on unexpected EOF
2021-08-30 14:01:19 -04:00
Phil Estes
0d5223d700
Merge pull request #5845 from alexandref75/fix-dir-device-support
Fix dir support for devices
2021-08-30 13:59:13 -04:00
Alexandre Peixoto Ferreira
838afd2116 Adding testing of two devices
Signed-off-by: Alexandre Peixoto Ferreira <alexandref75@gmail.com>
2021-08-30 11:28:43 -05:00