Commit Graph

289 Commits

Author SHA1 Message Date
Sebastiaan van Stijn
9c455ded61
go.mod: github.com/moby/sys/symlink v0.2.0
full diff: https://github.com/moby/sys/compare/symlink/v0.1.0...symlink/v0.2.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-11-05 13:05:38 +01:00
Sebastiaan van Stijn
fa12f4e696
go.mod: golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359
full diff: ed5796bab1...69cdffdb93

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-11-05 13:03:15 +01:00
Derek McGowan
54c0cdae60
Update TestRestartMonitor expected time check
Use the time for the last non-running status to determine
whether the restart did not occur as expected. The
current timestamp only accounts for when the running
status was seen, however, the restart would have always
occurred in between the previous check and latest check.
Therefore, it makes more sense to use the previous check
to determine whether a failure was seen from the restart
monitor not restarting as expected.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2021-11-04 09:42:58 -07:00
Maksym Pavlenko
b5b83e0512
Merge pull request #5918 from mxpv/shim-manager
Decouple task manager
2021-11-04 16:29:52 +02:00
David Porter
b69bbe25ac Vendor latest k8s.io/cri-api and netlink
* Bump k8s.io/cri-api to latest version - v0.23.0-alpha.4
* Vendor github.com/vishvananda/netlink for network stats

Signed-off-by: David Porter <porterdavid@google.com>
2021-11-03 17:52:05 -07:00
Derek McGowan
1e36eaf11f
Merge pull request #6200 from bobbypage/restart_integration_test
test: Add grace period for restart monitor test
2021-11-03 14:53:09 -07:00
Phil Estes
fd07d74d6d
Merge pull request #6179 from claudiubelu/integration/enable-test-runtime-handler
integration: Enables TestRuntimeHandler for Windows
2021-11-03 14:14:33 -07:00
David Porter
9bfec3980b test: Add grace period for restart monitor test
restart monitor test was failing due to occasionally taking past the
deadline on windows tests. Add a small additional grace period to
deflake the test.

Signed-off-by: David Porter <porterdavid@google.com>
2021-11-03 14:07:11 -07:00
Maksym Pavlenko
6fa1bb4a5c Fix build after rebase
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2021-11-01 09:22:50 -07:00
Maksym Pavlenko
2cec3a34b1 Migrate task directory
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2021-11-01 07:37:01 -07:00
Maksym Pavlenko
a3d298193c Fix backward compatibility with old task shims
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2021-11-01 07:37:01 -07:00
Maksym Pavlenko
7c4ead285d Add task manager
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2021-11-01 07:36:58 -07:00
Claudiu Belu
fb4432c24a integration: Enables TestVolumeCopyUp for Windows
The image that the test is used for Windows has busybox included,
which means we can use sleep.

Signed-off-by: Claudiu Belu <cbelu@cloudbasesolutions.com>
2021-10-07 19:30:42 -07:00
Claudiu Belu
0ba3532f54 integration: Enables TestRuntimeHandler for Windows
Signed-off-by: Claudiu Belu <cbelu@cloudbasesolutions.com>
2021-10-07 18:20:59 -07:00
Derek McGowan
d97b40c300
Merge pull request #6085 from claudiubelu/integration/enables-windows-tests
integration: Enable some tests for Windows
2021-10-28 13:30:23 -07:00
Claudiu Belu
6020189003 integration: Enable some tests for Windows
Some of the tests in containerd/integration/client/ are not
currently being run on Windows, even though they can pass.

Signed-off-by: Claudiu Belu <cbelu@cloudbasesolutions.com>
2021-10-13 16:04:46 +03:00
Claudiu Belu
830b3c26ec integration: Enable some tests for Windows (part 2)
Some of the tests that are currently running only on Linux can be made
to run on Windows with a few changes.

Signed-off-by: Claudiu Belu <cbelu@cloudbasesolutions.com>
2021-10-07 08:13:01 -07:00
Claudiu Belu
96018b7db9 vendor: Updates go-cni
This update will allow us to forcefully delete a Windows sandbox if its
endpoint cannot be found anymore.

Fixes: #6135

Signed-off-by: Claudiu Belu <cbelu@cloudbasesolutions.com>
2021-10-06 05:35:53 -07:00
Derek McGowan
0d0fb68589
Merge pull request #6149 from ukontainer/vendor-moby-sys
vendor: update moby/sys for darwin support
2021-10-25 15:20:10 -07:00
Hajime Tazaki
b8f3ebb03b vendor: update moby/sys for darwin support
The mount package of darwin requires to retrive mountinfo to check if
the target of unmount if still mounted or not.  Thus pull the upstreamed
version of moby/sys to support this operation.

Signed-off-by: Hajime Tazaki <thehajime@gmail.com>
2021-10-23 07:48:17 +09:00
Derek McGowan
45c5298700
Merge pull request #6144 from dmcgowan/prepare-v1.6.0-beta.1
Prepare v1.6.0-beta.1
2021-10-22 14:39:38 -07:00
Derek McGowan
37720fc6fd
Update api vendor
Signed-off-by: Derek McGowan <derek@mcg.dev>
2021-10-22 13:37:45 -07:00
zounengren
a217b5ac8f bump CNI to spec v1.0.0
Signed-off-by: zounengren <zouyee1989@gmail.com>
2021-10-22 10:58:40 +08:00
Brian Goff
294143bf38 Inject otel traces to grpc client.
This uses the global trace provider.
If a trace provider is not set, a no-op provider is used.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2021-10-21 16:08:15 +00:00
zounengren
1f1cad3912 io/ioutil package has been deprecated in Go 1.16 that replaces io/ioutil functions
Signed-off-by: Zou Nengren <zouyee1989@gmail.com>
2021-10-13 09:18:31 +08:00
Derek McGowan
63b7e5771e
Merge pull request #5973 from Juneezee/deprecate-ioutil
refactor: move from io/ioutil to io and os package
2021-10-01 10:52:06 -07:00
Akihiro Suda
fbdcddedc0
Merge pull request #6076 from jonyhy96/cleanup-import
cleanup: import from k8s.io/utils/clock instead
2021-10-01 14:18:34 +09:00
haoyun
6484fab1e0 cleanup: import from k8s.io/utils/clock instead
Signed-off-by: haoyun <yun.hao@daocloud.io>
2021-09-30 23:27:20 +08:00
haoyun
d16942cf16 feat: enable cri remote client to call with grpc calloptions
Signed-off-by: haoyun <yun.hao@daocloud.io>
2021-09-30 23:02:53 +08:00
Kohei Tokunaga
09c9270fee images: enable converter to uncompress zstd
Currently uncompress converter only supports gzip. This commit fixes it to
support zstd as well.

Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2021-09-27 11:08:44 +09:00
Phil Estes
5162238c7d
Merge pull request #5853 from claudiubelu/integration/windows-hostprocess
integration: Adds Windows HostProcess tests
2021-09-26 20:35:00 -04:00
Claudiu Belu
2bc77b8a28 Adds Windows resource limits support
This will allow running Windows Containers to have their resource
limits updated through containerd. The CPU resource limits support
has been added for Windows Server 20H2 and newer, on older versions
hcsshim will raise an Unimplemented error.

Signed-off-by: Claudiu Belu <cbelu@cloudbasesolutions.com>
2021-09-25 13:20:55 -07:00
Derek McGowan
c5947557d8
Add error message to in TestContainerdRestart integration test
Signed-off-by: Derek McGowan <derek@mcg.dev>
2021-10-11 08:23:31 -07:00
Derek McGowan
18d483b236
Update cgroups to v1.0.2
Signed-off-by: Derek McGowan <derek@mcg.dev>
2021-10-08 17:48:33 -07:00
Derek McGowan
cb6fb93af5
Merge pull request #6011 from crosbymichael/schedcore
add runc shim support for sched core
2021-10-08 10:42:16 -07:00
Derek McGowan
60ffa3ff7d
Merge pull request #5579 from claudiubelu/integration/restart-containerd
integration: Enables Windows containerd restart test
2021-10-08 10:33:10 -07:00
Michael Crosby
f1054dbbde
fix integration client vendor
Signed-off-by: Michael Crosby <michael@thepasture.io>
2021-10-08 16:20:21 +00:00
Daniel Canter
46b152f81b vendor: Bump hcsshim to 0.9.0
This change bumps hcsshim to 0.9.0. Main thing this tag contains is support for
Kubernetes Host Process containers
See: https://kubernetes.io/docs/tasks/configure-pod-container/create-hostprocess-pod/

Signed-off-by: Daniel Canter <dcanter@microsoft.com>
2021-10-07 21:00:35 -07:00
Phil Estes
e648fa2e81
Merge pull request #5933 from claudiubelu/integration/import-multilayer
integration: Adds test for multilayer image import
2021-10-07 14:09:25 -04:00
Derek McGowan
2d48b6a864
Merge pull request #6031 from fuweid/carry-5648
runtime: should fail fast if dial error on shim
2021-10-07 09:43:10 -07:00
zounengren
3a713811be run gofmt with Go 1.17
Signed-off-by: Zou Nengren <zouyee1989@gmail.com>
2021-10-07 20:16:59 +08:00
Brian Goff
1ee2bff0e0 Update go otel 1.0.1
This fixes the issue with the usage of the deprecated attribute.Any
function that original caused build issues.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2021-10-06 00:42:56 +00:00
Kohei Tokunaga
2244540628 Fix main branch build is broken
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2021-09-25 11:48:14 +09:00
Claudiu Belu
7a7a9a282c integration: Adds test for multilayer image import
This test will make sure there aren't any issues with multilayered
images during import. Keep in mind that in the case of multilayered
images, they have to be unpacked first in order to be usable.

Signed-off-by: Claudiu Belu <cbelu@cloudbasesolutions.com>
2021-09-22 10:03:16 -07:00
Wei Fu
f7658e37d9 runtime: should fail fast if dial error on shim
In linux platform, the shim server always listens on the socket before
the containerd task manager dial it. It is unlikely that containerd task
manager should handle reconnect because the shim can't restart. For this
case, the containerd task manager should fail fast if there is ENOENT or
ECONNREFUSED error.

And if the socket file is deleted during cleanup the exited task, it
maybe cause that containerd task manager takes long time to reload the
dead shim. For that task.v2 manager, the race case is like:

```
TaskService.Delete
  TaskManager.Delete(runtime/v2/manager.go)
    shim.delete(runtime/v2/shim.go)
      shimv2api.Shutdown(runtime/v2/task/shim.pb.go)

      <- containerd has been killed or restarted somehow

      bundle.Delete
```

The shimv2api.Shutdown will cause that the shim deletes socket file
(containerd-shim-runc-v2 does). But the bundle is still there. During
reloading, the containerd will wait for the socket file appears again
in 100 seconds. It is not reasonable. The Reconnect should prevent this
case by fast fail.

Closes: #5648.
Fixes: #5597.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2021-09-23 00:00:28 +08:00
Eng Zer Jun
50da673592
refactor: move from io/ioutil to io and os package
The io/ioutil package has been deprecated as of Go 1.16, see
https://golang.org/doc/go1.16#ioutil. This commit replaces the existing
io/ioutil functions with their new definitions in io and os packages.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2021-09-21 09:50:38 +08:00
Derek McGowan
3e72e335fe
Use github images for integration tests
Signed-off-by: Derek McGowan <derek@mcg.dev>
2021-09-20 13:35:13 -07:00
wllenyj
6d961f9673 CI: Switch to available latest images
`mirror.gcr.io/library/busybox:1.32` is unavailable.

```console
$ curl -s https://mirror.gcr.io//v2/library/busybox/tags/list | jq '.tags'
[
      "1.26.2",
      "1.27.2",
      "1.28",
      "1.29",
      "1.29.2",
      "1.29.3",
      "1.30",
      "1.30.1",
      "1.31",
      "1.31.0",
      "1.31.1",
      "1.32.0"
]
```

Signed-off-by: wllenyj <wllenyj@linux.alibaba.com>
2021-09-14 11:59:19 +08:00
Claudiu Belu
e087b47e98 import: Raise error if the imported image is filtered out
During import, if an image does not match the host's platform,
it won't have any children labels set, which will result in the
Garbage Collector deleting its content later, resulting in an
unusable image. In this case, we should fail early.

This can still be bypassed by using ctr import --all-platforms.

Signed-off-by: Claudiu Belu <cbelu@cloudbasesolutions.com>
2021-09-13 11:19:48 -07:00
Phil Estes
a4fa3a7162
Merge pull request #6017 from thaJeztah/fix_main_nomodules
update open go.opentelemetry.io v1.0.0 to fix import path
2021-09-23 15:07:41 -04:00
Derek McGowan
d0bedc5bd1
Merge pull request #5979 from TianTianBigWang/fix/err-string-fmt
fix error string format
2021-09-22 15:12:18 -07:00
Sebastiaan van Stijn
483d2e947f
go.mod: update opentelemetry modules to v1.0.0
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-09-22 16:24:17 +02:00
zounengren
7854e0bffe bump continuity and console version that remove pkg/errors
Signed-off-by: Zou Nengren <zouyee1989@gmail.com>
2021-09-21 21:56:18 +08:00
Zilong Wang
498e5b27f7 fix error string format
Signed-off-by: zilong.wang <zilong.wang@daocloud.io>
2021-09-14 18:17:27 +08: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
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
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
Michael Crosby
d040ca3845
Merge pull request #5861 from kzys/restart-monitor
integration: investigate TestRestartMonitor's failure
2021-09-09 10:56:40 -04: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
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
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
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
Sebastiaan van Stijn
2ac9968401
replace uses of os/exec with golang.org/x/sys/execabs
Go 1.15.7 contained a security fix for CVE-2021-3115, which allowed arbitrary
code to be executed at build time when using cgo on Windows. This issue also
affects Unix users who have “.” listed explicitly in their PATH and are running
“go get” outside of a module or with module mode disabled.

This issue is not limited to the go command itself, and can also affect binaries
that use `os.Command`, `os.LookPath`, etc.

From the related blogpost (ttps://blog.golang.org/path-security):

> Are your own programs affected?
>
> If you use exec.LookPath or exec.Command in your own programs, you only need to
> be concerned if you (or your users) run your program in a directory with untrusted
> contents. If so, then a subprocess could be started using an executable from dot
> instead of from a system directory. (Again, using an executable from dot happens
> always on Windows and only with uncommon PATH settings on Unix.)
>
> If you are concerned, then we’ve published the more restricted variant of os/exec
> as golang.org/x/sys/execabs. You can use it in your program by simply replacing

This patch replaces all uses of `os/exec` with `golang.org/x/sys/execabs`. While
some uses of `os/exec` should not be problematic (e.g. part of tests), it is
probably good to be consistent, in case code gets moved around.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-08-25 18:11:09 +02:00
Fu Wei
ebe8f8c6be
Merge pull request #5899 from AkihiroSuda/runc-v1.0.2
bump up runc v1.0.2
2021-08-24 23:04:36 +08:00
Fu Wei
6fa9588531
Merge pull request #5903 from AkihiroSuda/gofmt117
Run `go fmt` with Go 1.17
2021-08-24 23:01:41 +08:00
Akihiro Suda
e185167677
go.mod: update runc to v1.0.2
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-08-23 23:24:45 +09:00
Sebastiaan van Stijn
4292969106
go.mod: github.com/pelletier/go-toml v1.9.3
full diff: https://github.com/pelletier/go-toml/compare/v1.8.1...v1.9.3

- v1.9.3: Clarify license and comply with Apache 2.0
- v1.9.2: Add Encoder.CompactComments to omit extra new line
- v1.9.1: Fix empty trees line counting

v1.9.0
-------------------

The highlight of this version is that the whole toml.Tree structure has been made
public in a backward compatible way. This allows everyone using v1.x to fully
access the data and metadata in the tree to extend the library.

This is hopefully the last release in the v1.x track, as go-toml v2 is the main
focus of development.

What's new

- TOML 1.0.0-rc.3
- Improved default tag for durations
- Provide Tree and treeValue public aliases
- Expose MarshalOrder
- Value string representation public function

Fixed bugs

- Do not allow T-prefix on local dates
- toml.Unmarshaler supports leaf nodes
- Fix date lexer to only support 4-digit year
- Fix ToMap for tables in mixed-type arrays
- Fix ToMap for tables in nested mixed-type arrays
- Support literal multiline marshal

Performance

- Remove date regexp
- Remove underscore regexps

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-08-23 15:38:29 +02:00
Akihiro Suda
d3aa7ee9f0
Run go fmt with Go 1.17
The new `go fmt` adds `//go:build` lines (https://golang.org/doc/go1.17#tools).

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-08-22 09:31:50 +09:00
Kazuyoshi Kato
f7b1ceb9f6 integration: investigate TestRestartMonitor's failure
- task.Kill() might fail in theory
- Giving a longer timeout may help us understand whether the failure is
  a timing issue or not.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2021-08-19 11:38:53 -07:00
Kazuyoshi Kato
acb81bbdaf integration: fix TestContainerPids
task.Pids returns the task's processes, but the order is not guaranteed.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2021-08-19 09:56:22 -07:00
Daniel Canter
e634f04d8c go.mod: update kubernetes to v1.22.0
This brings in some cri api changes for cgroups, Windows pod sandbox security
context changes and some new fields for the Windows version of a privileged
container.

This also unfortunately bumps the prometheus client, grpc middleware, bolt
and klog :(

Signed-off-by: Daniel Canter <dcanter@microsoft.com>
2021-08-09 16:16:54 -04:00
Derek McGowan
6f027e38a8
Remove redundant build tags
Remove build tags which are already implied by the name of the file.
Ensures build tags are used consistently

Signed-off-by: Derek McGowan <derek@mcg.dev>
2021-08-05 22:27:46 -07:00
Alakesh Haloi
3c5424454b [otel-tracing] vendor and go modules changes
This tracks all the vendor file changes and changes to go modules due
to OpenTelemetry support

Signed-off-by: Alakesh Haloi <alakeshh@amazon.com>
2021-08-04 14:25:12 -07:00
Jayme Howard
ce437864b2 mergo: Upgrade to 0.3.12 to fix panic
Signed-off-by: Jayme Howard <g.prime@gmail.com>

Run `go mod tidy`

Signed-off-by: Jayme Howard <g.prime@gmail.com>

Follow correct procedure by running `make vendor`

Signed-off-by: Jayme Howard <g.prime@gmail.com>
2021-07-29 12:20:09 -05:00
Derek McGowan
caf9e256b7
Merge pull request #5693 from kzys/sigrtmin
Support SIGRTMIN+n signals
2021-07-27 11:58:57 -07:00
Derek McGowan
6d31cdda50
Merge pull request #5716 from dims/add-new-go-module-for-api-directory
Introduce a new go module - containerd/api for use in standalone clients
2021-07-27 09:37:10 -07:00
Davanum Srinivas
494b940f14
Introduce a new go module - containerd/api for use in standalone clients
In containerd 1.5.x, we introduced support for go modules by adding a
go.mod file in the root directory. This go.mod lists all the things
needed across the whole code base (with the exception of
integration/client which has its own go.mod). So when projects that
need to make calls to containerd API will pull in some code from
containerd/containerd, the `go mod` commands will add all the things
listed in the root go.mod to the projects go.mod file. This causes
some problems as the list of things needed to make a simple API call
is enormous. in effect, making a API call will pull everything that a
typical server needs as well as the root go.mod is all encompassing.
In general if we had smaller things folks could use, that will make it
easier by reducing the number of things that will end up in a consumers
go.mod file.

Now coming to a specific problem, the root containerd go.mod has various
k8s.io/* modules listed. Also kubernetes depends on containerd indirectly
via both moby/moby (working with docker maintainers seperately) and via
google/cadvisor. So when the kubernetes maintainers try to use latest
1.5.x containerd, they will see the kubernetes go.mod ending up depending
on the older version of kubernetes!

So if we can expose just the minimum things needed to make a client API
call then projects like cadvisor can adopt that instead of pulling in
the entire go.mod from containerd. Looking at the existing code in
cadvisor the minimum things needed would be the api/ directory from
containerd. Please see proof of concept here:
github.com/google/cadvisor/pull/2908

To enable that, in this PR, we add a go.mod file in api/ directory. we
split the Protobuild.yaml into two, one for just the things in api/
directory and the rest in the root directory. We adjust various targets
to build things correctly using `protobuild` and also ensure that we
end up with the same generated code as before as well. To ensure we
better take care of the various go.mod/go.sum files, we update the
existing `make vendor` and also add a new `make verify-vendor` that one
can run locally as well in the CI.

Ideally, we would have a `containerd/client` either as a standalone repo
or within `containerd/containerd` as a separate go module. but we will
start here to experiment with a standalone api go module first.

Also there are various follow ups we can do, for example @thaJeztah has
identified two tasks we could do after this PR lands:

github.com/containerd/containerd/pull/5716#discussion_r668821396

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-07-27 07:34:59 -04:00
Derek McGowan
b5b5dcc273
Merge pull request #5162 from claudiubelu/integration-test-images
integration: Windows volume-copy-up images
2021-07-26 17:29:40 -07:00
Kazuyoshi Kato
1d3d08026d Support SIGRTMIN+n signals
systemd uses SIGRTMIN+n signals, but containerd didn't support the signals
since Go's sys/unix doesn't support them.

This change introduces SIGRTMIN+n handling by utilizing moby/sys/signal.

Fixes #5402.

https://www.freedesktop.org/software/systemd/man/systemd.html#Signals

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2021-07-26 09:36:43 -07:00
Kazuyoshi Kato
00d52bb159 integration: log all processes to investigate the test failure
The test is failing on
https://github.com/containerd/containerd/runs/3129202049#step:10:43.

I'd like to know whether the order of the array is the cause, or
the result is completely off.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2021-07-21 16:54:04 -07:00
Akihiro Suda
a12c7bd1cf
go.mod: runc v1.0.1
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-07-18 20:39:34 +09:00
Derek McGowan
18321f539c
Move loop check to before sleep
Signed-off-by: Derek McGowan <derek@mcg.dev>
2021-07-13 12:07:21 -07:00
Derek McGowan
2e8a572dfd
Add timestamp to flaky restart monitor test
Signed-off-by: Derek McGowan <derek@mcg.dev>
2021-07-13 12:07:21 -07:00
Akihiro Suda
55fd2ab5d6
integration/client: go mod tidy
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-07-13 14:36:02 +09:00
Maksym Pavlenko
d38c186d9d
Merge pull request #5578 from claudiubelu/integration/failed-container
test integration: Adds a test that restarts a failed container
2021-07-09 12:08:20 -07:00
Phil Estes
cf600abecc
Merge pull request #5619 from mikebrow/cri-add-v1-proxy-alpha
[CRI] move up to CRI v1 and support v1alpha in parallel
2021-07-09 14:07:24 -04:00
Claudiu Belu
16deba098c integration: Windows volume-copy-up images
For Windows, the container image's OS version must closely match the host's OS version.
For this reason, we need to add the --os-version annotation in image manifest lists,
so the Windows nodes can pull the appropriate image from the list.

Previously, the docker manifest CLI did not have the capability to set the --os-version,
it, but it has been introduced in docker 20.10.0.

We're also adding busybox.exe in the image, so we can run Linux commands inside the
container, so the tests will be simpler.

When building Windows images, a docker buildx builder needs to be created and used. When
building Windows images with docker buildx, the flag --output=type=registry is required,
otherwise it cannot be referenced on a Linux node.

Signed-off-by: Claudiu Belu <cbelu@cloudbasesolutions.com>
2021-06-30 11:19:54 +00:00
Mike Brown
a5c417ac06 move up to CRI v1 and support v1alpha in parallel
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2021-06-28 09:34:12 -05:00
Claudiu Belu
04ab4418fd test integration: Adds a test that restarts a failed container
If a container failed to start due to a bad command, the container could not be
recreated with a proper command in its stead. Adds a test that verifies this scenario.

Signed-off-by: Claudiu Belu <cbelu@cloudbasesolutions.com>
2021-06-25 10:33:38 +00:00
Akihiro Suda
e1f28659bc
Merge pull request #5287 from claudiubelu/cri-integration-cleanup
Cri integration cleanup
2021-06-25 12:42:33 +09:00
Davanum Srinivas
d9694b2976
Sync integration/go.mod with root go.mod
the root go.mod no longer pins these two imports to specific versions

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-06-21 16:32:07 -04:00
ktock
cd33c007ce CI: Switch to available latest images
`mirror.gcr.io/library/busybox:1.32.0` is unavailable.

```console
$ curl -s https://mirror.gcr.io//v2/library/busybox/tags/list | jq '.tags'
[
  "1.26.2",
  "1.27.2",
  "1.28",
  "1.29",
  "1.29.2",
  "1.29.3",
  "1.30",
  "1.30.1",
  "1.31",
  "1.31.0",
  "1.31.1",
  "1.32",
  "latest"
]
```

`mirror.gcr.io/library/alpine:3.13` is unavailable.

```console
$ curl -s https://mirror.gcr.io//v2/library/alpine/tags/list | jq '.tags'
[
  "20200428",
  "3",
  "3.10",
  "3.11",
  "3.12",
  "3.12.0",
  "3.12.1",
  "3.13.5",
  "3.3",
  "3.4",
  "3.6",
  "3.7",
  "3.8",
  "3.9",
  "latest"
]
```

Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2021-06-21 14:54:50 +09:00
Davanum Srinivas
01585595a5
update integration/client go.sum
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-06-07 09:12:41 -04:00
Claudiu Belu
cabe677369 tests: Use EnsureImageExists for image pulling
A previous commit introduced EnsureImageExists, which ensures that a particular image
already exists. It also deduplicates the image pulling code. Some tests missed this
update.

Signed-off-by: Claudiu Belu <cbelu@cloudbasesolutions.com>
2021-06-03 16:02:42 +00:00
Claudiu Belu
a78bdf22df tests: Refactors PodSandbox creation
Most of the tests creating and using Pod Sandboxes in the same way. We can create
a common function that will do that for us, so we can have less duplicated code,
and make it easier to add new tests in the future.

Signed-off-by: Claudiu Belu <cbelu@cloudbasesolutions.com>
2021-06-03 16:02:38 +00:00
Claudiu Belu
93e268f625 tests: Symlink volume tests
There was a known issue regarding how the symlink files mounted as
volumes were being handled on Windows. This commit adds tests that
will check against those issue to ensure there won't be any
regressions.

Signed-off-by: Claudiu Belu <cbelu@cloudbasesolutions.com>
2021-06-03 13:26:22 +00:00
Ma Xinjian
e1c845df50 Fix small typo
Signed-off-by: Ma Xinjian <maxj.fnst@fujitsu.com>
2021-05-24 11:49:55 +08:00
Priyanka Saggu
ec28288f45
bump runc version to v1.0.0-rc95
Signed-off-by: Priyanka Saggu <priyankasaggu11929@gmail.com>
2021-05-19 17:24:56 +05:30