Commit Graph

501 Commits

Author SHA1 Message Date
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
Phil Estes
a152049d7d
Merge pull request #5163 from claudiubelu/test-windows
tests: Adds support for Windows cri-integration tests
2021-05-17 09:24:31 -04:00
Priyanka Saggu
b6a2517491
bump hcsshim version to v0.8.17
Signed-off-by: Priyanka Saggu <priyankasaggu11929@gmail.com>
2021-05-16 01:38:43 +05:30
Claudiu Belu
09a0c9471b tests: Adds support for Windows cri-integration tests
Currently, the cri-integration tests do not work on Windows due to various reasons.
One of the reasons is because all the tests are using Linux-specific images.
Previous commits refactored the image pulling / usage in the cri-integration tests,
making it easier to update, and easier to configure a custom registry to pull images
with Windows support.

For Windows runs, custom registries can be created, which will also contain Windows
images, and the cri-integration tests can be configured to use those registries by
specifying the "--repo-list" argument, a YAML file which will contain an alternative
mapping of the default registries. This is similar to how E2E tests are handled for
Windows runs in Kubernetes.

Some of the tests are Skipped, as they do not pass yet on Windows.

Windows does not collect inodes used stats, thus, the tests that were expecting non-zero
inodes stats were failing.

Signed-off-by: Claudiu Belu <cbelu@cloudbasesolutions.com>
2021-05-14 11:27:35 +00:00
Derek McGowan
fc4da9728e Pin integration test image for alpine
The latest tag is no longer available for alpine, pin
to the latest version rather than using latest

Signed-off-by: Derek McGowan <derek@mcg.dev>
2021-05-13 14:10:59 -04:00
Fu Wei
c7e4747cfb
Merge pull request #5313 from claudiubelu/pull-images-once
cri-integration tests: Pull images once
2021-05-13 11:10:52 +08:00
Sebastiaan van Stijn
e26fc84729
go.mod: cut circular dependency on github.com/containerd/containerd
This forces vendoring to only take dependencies of this repository to
be taken into account, effectively cutting the circular dependency (for
the vendored code), and to prevent depending on transitive dependencies
coming from older versions of containerd.

go mod does not allow using the main module as a local "replace" rule using
a path; see golang/go#45492 and golang/go#34417, so instead, an empty module
is used.

One change observed is that older versions containerd depended on an older
version of imgcrypt that had an "indirect" dependency on more current versions
of gopkg.in/yaml.v2 and prometheus/procfs.

For those, a temporary "indirect" dependency was added, until prometheus/client_golang
and kubernetes are updated.

from go mod graph (before):

    github.com/containerd/imgcrypt@v1.0.4-0.20210301171431-0ae5c75f59ba gopkg.in/yaml.v2@v2.4.0
    github.com/containerd/imgcrypt@v1.0.4-0.20210301171431-0ae5c75f59ba github.com/prometheus/procfs@v0.6.0

For some reason, some older versions of containerd are still taken into account,
causing satori/go.uuid to be added as "indirect" dependency, likely because some
modules have this dependency in their go.sum. This should likely disappear once
those plugins are updated to contain a current version of containerd.

    git grep 'github.com/satori/go.uuid'
    vendor/github.com/Microsoft/hcsshim/go.sum:github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
    vendor/github.com/containerd/aufs/go.sum:github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
    vendor/github.com/containerd/imgcrypt/go.sum:github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
    vendor/github.com/containerd/nri/go.sum:github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
    vendor/github.com/containerd/zfs/go.sum:github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-05-01 13:49:23 +02:00
Sebastiaan van Stijn
15e0bd513e
integration/client: go mod tidy
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-05-01 13:11:55 +02:00
Claudiu Belu
3187b6dc81 tests: Adds consumed memory stats test
We can check that the reported containers stats are not lower than it should
by using the resource-consumer image. This image contains stress / testlimit.exe
which can consume a specified amount of memory.

Signed-off-by: Claudiu Belu <cbelu@cloudbasesolutions.com>
2021-04-29 14:11:34 +00:00
Claudiu Belu
273c2bb168 tests: Prepull images used in tests
Most of the tests are pulling and deleting the same test images, which
can be quite inefficient, especially on Windows nodes, where the images
are larger than the Linux ones (a nanoserver Container image is ~250MB
in size). We can instead pull them only once, and reuse them. This will
reduce the test run time on Windows considerably.

Additionally, some of the test images are currently hosted on dockerhub
(busybox image), which has introduced image ratelimiting in November 2020,
which means that test runners could potentially hit that limit faster with
the current implementation. This will reduce that risk.

Some tests are specifically deleting images, so we always have to ensure
that they are pulled.

Signed-off-by: Claudiu Belu <cbelu@cloudbasesolutions.com>
2021-04-28 09:43:39 +00:00
Claudiu Belu
5847340a7d tests: Refactors container image usage
Currently, the cri-integration tests do not work on Windows due to various reasons.
One of the reasons is because all the tests are using Linux-specific images. This
commit refactors the image pulling / usage in the cri-integration tests, making it
easier to update, and easier to configure the a custom registry to pull those images
from.

For Windows runs, custom registries can be created, which will also contain Windows
images, and the cri-integration tests can be configured to use those registries by
specifying the "--image-list" argument, a TOML file which will contain an alternative
mapping of the default images.

Signed-off-by: Claudiu Belu <cbelu@cloudbasesolutions.com>
2021-04-27 08:44:21 +00:00
Davanum Srinivas
2e4c1d4b74
Use the multi-arch version of the test images
volume-copy-up:2.0 and volume-ownership:2.0

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-04-25 17:49:57 -04:00
Davanum Srinivas
1b5d59dfe2
Add multi-arch support for test images
- Add a multi-arch image with linux/amd64 and linux/arm64 (limit to just
  what we are running in CI)
- Bump versions to 2.0 as 1.0 is the single-arch image
- Use `docker buildx` instead of just docker, so we don't need to build
  manifests by hand
- busybox now does not have `nogroup`, since the test needs it, switch
  over from busybox to ubuntu for just the volume-ownership image

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-04-23 15:07:33 -04:00
Derek McGowan
3ef337ae3a
Update containerd vendors to tags
Signed-off-by: Derek McGowan <derek@mcg.dev>
2021-04-19 10:59:29 -07:00
Akihiro Suda
d2d0afac05
Merge pull request #5385 from thaJeztah/bump_kubernetes_1.20.6 2021-04-19 23:42:33 +09:00
Sebastiaan van Stijn
5d79d3adbc
go.mod: update kubernetes to v1.20.6
Includes updated protos with the gogo/protobuf fixes for CVE-2021-3121
(https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-3121)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-04-19 09:43:25 +02:00
Sebastiaan van Stijn
1c03c377e5
go.mod: github.com/containerd/fifo v1.0.0
full diff: https://github.com/containerd/fifo/compare/115abcc95a1d...v1.0.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-04-19 09:27:45 +02:00
Sebastiaan van Stijn
12a2a21083
go.mod: github.com/google/uuid v1.2.0
full diff: https://github.com/google/uuid/compare/v1.1.2...v1.2.0

I did not switch to us the `uuid.NewString()` function; we are not currently using
`uuid.New()`, probably because it can `panic` in case an invalid UUID is produced;
in stead we are using `uuid.NewRandom()`, which is equivalent, but returns an
error instead.

Changes:

- v1.2.0: Add NewString()
  This release introduces the NewString() function which is the equivalent of
  uuid.New().String().
- v1.1.5: Syntactic cleanup
  There are no code changes. A missing period was add to a godoc comment and the
  linter was told to not complain that the results of hash.Write() are ignored
  (the function cannot fail)
- v1.1.4: Further error optimizations
  Do not allocate memory for errors (it is only one word)
- v1.1.3: Optimize error reporting
  Optimize length of time it takes to discover an input is bad by no longer using
  fmt.Errorf, which is quite slow. It now uses a custom error type that formats
  the string when the Error method is called rather than when generating the error.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-04-17 12:06:51 +02:00
Sebastiaan van Stijn
864a3322b3
go.mod: github.com/containerd/go-cni v1.0.2
full diff: https://github.com/containerd/go-cni/compare/v1.0.1...v1.0.2

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-04-14 09:09:18 +02:00
Derek McGowan
c381ea27bd
Merge pull request #5213 from thaJeztah/bump_typeurl
go.mod: github.com/containerd/typeurl v1.0.2
2021-04-13 20:31:25 -07:00
Derek McGowan
824b61075f
Merge pull request #5350 from thaJeztah/tagged_go_winio
go.mod: github.com/Microsoft/go-winio v0.4.17
2021-04-13 20:29:44 -07:00
Sebastiaan van Stijn
ee34caccb3
go.mod: github.com/Microsoft/go-winio v0.4.17
no code changes as this is the same commit, but now tagged:

https://github.com/Microsoft/go-winio/compare/5516f17a5958...v0.4.17

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-04-13 23:56:53 +02:00
Sebastiaan van Stijn
d478676d35
go.mod: github.com/containerd/imgcrypt v1.1.1
No code changes other than an updated changelog, and updating to
the tagged v1.1.1:

diff: https://github.com/containerd/imgcrypt/compare/0bed51b9522c...v1.1.1

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-04-13 23:41:44 +02:00
Sebastiaan van Stijn
1dd45d51c7
go.mod: github.com/containerd/typeurl v1.0.2
full diff: https://github.com/containerd/typeurl/compare/v1.0.1...v1.0.2

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-04-13 23:21:21 +02:00
Sebastiaan van Stijn
ce116d4c59
go.mod: github.com/containerd/imgcrypt v1.1.1-0.20210412181126-0bed51b9522c
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-04-13 01:06:38 +02:00
Sebastiaan van Stijn
c4778fe1b1
go.mod: github.com/containernetworking/plugins v0.9.1
full diff: https://github.com/containernetworking/plugins/compare/v0.8.6...v0.9.1

changes in vendored code:

- (in containernetworking/plugins): Fix race condition in GetCurrentNS
- (in containernetworking/cni): tighten up plugin-finding logic

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-04-12 22:10:06 +02:00
Davanum Srinivas
9ad087947d
Switch all our tests to version 2
Also warn when someone uses version 1

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-04-12 13:18:33 -04:00
Justin
d4fbff113d
Merge pull request #4399 from TBBle/wcow_compare_layers_to_tar
Implement windowsDiff.Compare to allow outputting OCI images
2021-04-12 09:49:50 -07:00
Paul "TBBle" Hampson
c7504987e6 Implement windowsDiff.Compare via hcsshim/pkg/ociwclayer
This parallels the implementation of windowsDiff.Apply, including
bouncing very briefly though archive.WriteDiff and then straight back
out into Windows-specific code.

It's mostly pulling existing mechanisms from non-Windows Compare or
Windows Apply, and highlights that there's probably a lot of scope for
refactoring on top of this.

Now the export-related integration tests pass CI on Windows.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2021-04-10 02:02:33 +10:00
Sebastiaan van Stijn
36bf3f0e8a
go.mod: github.com/Microsoft/hcsshim v0.8.16
full diff: https://github.com/microsoft/hcsshim/compare/v0.8.15...v0.8.16

also updating github.com/Microsoft/hcsshim/test to current master

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-04-09 09:12:12 +02:00
Michael Crosby
ceb08756a4
Merge pull request #5321 from thaJeztah/fix_oom_score_test
fix TestSetOOMScoreBoundaries and replace missing busybox image in CI
2021-04-08 14:54:50 -04:00
Wei Fu
21ebeef745 integration: use busybox:1.32.0 since latest is unavailable
```bash
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.30",
    "1.30.1",
    "1.31",
    "1.31.0",
    "1.31.1",
    "1.32.0"
  ]
]
```

The latest is gone. I think we should setup image in github container
registry for CI if possible.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2021-04-08 17:35:08 +08:00
Sebastiaan van Stijn
21a175860d
go.mod github.com/klauspost/compress v1.11.13
full diff: https://github.com/klauspost/compress/compare/v1.11.3...v1.11.13

adds arm64 decompression support, various performance improvements

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-04-07 19:15:59 +02:00
Sebastiaan van Stijn
1faca349ea
integration/client: rename package to "client"
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-03-30 16:21:36 +02:00
Sebastiaan van Stijn
6fc9e45000
synchronize replace rules in integration/client go.mod with main go.mod
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

asdlkjasdlkj

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-03-30 16:21:28 +02:00
Phil Estes
effe226d9d
Merge pull request #5258 from fuweid/checkpoint-on-pause-state
task: allow checkpoint on pause state
2021-03-26 09:44:04 -04:00
Sebastiaan van Stijn
61c7490368
integration/util: remove dependency on k8s.io/klog/v2
Having this log should not be critical, and removing it allows
using this package without pulling in the explicit dependency
on k8s.io/klog.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-03-25 15:09:03 +01:00
Paul "TBBle" Hampson
1fd3d12f93 go mod tidy the client integration test module
Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2021-03-25 05:26:24 +11:00
Wei Fu
72b7f4bab1 task: allow checkpoint on pause state
task.Checkpoint should check status of container before handle
checkpoint. If the container has been paused, task.Checkpoint should
handle checkpoint and leave it paused.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
Signed-off-by: Baijia <baijia.wr@antfin.com>
2021-03-24 16:37:39 +08:00
Phil Estes
33776ada04
Use specific image for user namespaces tests
Due to the lack of an existing /proc dir in the rootfs of busybox, there
seems to be a race between the mount of /proc and whether the root dir
is already readonly? May need investigation, but for now use an image
that has a /proc dir existing.

Signed-off-by: Phil Estes <estesp@amazon.com>
2021-03-19 22:51:32 -04:00
Michael Crosby
f7bd43c137
Merge pull request #5216 from estesp/testimage-429
Switch test image to a non rate-limited manifest list
2021-03-19 15:02:47 -04:00
Michael Crosby
e0c94bb269
Merge pull request #4708 from kzys/enable-criu
Re-enable CRIU tests by not using overlayfs snapshotter
2021-03-19 14:23:05 -04:00
Phil Estes
6e343f25e8
Switch test image to a non rate-limited manifest list
Signed-off-by: Phil Estes <estesp@amazon.com>
2021-03-18 14:07:32 -04:00
Michael Crosby
3f98a6d2d3
Merge pull request #5211 from pacoxu/pause/3.5
upgrade pause image to 3.5 for non-root
2021-03-18 11:43:59 -04:00
Kazuyoshi Kato
8731888ec0 Re-enable CRIU tests by not using overlayfs snapshotter
While the issue hasn't been fixed in the kernel yet, we can workaround
the issue by not using overlayfs snapshotter.

The newly added step runs all tests that match /TestCheckpoint/.
So, TestCRWithImagePath has been renamed to match the regexp.

Fixes #3930.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2021-03-16 16:48:30 -07:00
Sebastiaan van Stijn
4e76bcf061
gofmt -s -w all the things
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-03-16 21:29:41 +01:00
pacoxu
ffff688663 upgrade pause image to 3.5 for non-root
Signed-off-by: pacoxu <paco.xu@daocloud.io>
2021-03-16 23:20:35 +08:00
Phil Estes
a1138182d5
Merge pull request #5180 from dmcgowan/lint-enforce-comments
Fix exported comments enforcer in CI
2021-03-15 10:50:06 -04:00
Paul "TBBle" Hampson
5cfc4a80d4 Enable some image-pull tests on Windows
Now that they are using a multi-arch image, they should work on Windows
like they work elsewhere.

This also means non-AMD64 platforms do this test with their native
platform version, not the linux/amd64 platform version.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2021-03-13 13:11:02 +11:00
Paul "TBBle" Hampson
b375f90128 Use k8s.gcr.io/pause:3.4.1 in pull-only tests
This reduces the need to pull random images from docker.io, and should
greatly reduce the tendancy to hit their hourly rate-limit during
integration test runs.

TestImagePullSomePlatforms uses k8s.gcr.io/pause:3.2 so that it does not
see the content pulled by TestImagePullAllPlatforms. This image is
multi-arch, but not multi-os.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2021-03-13 13:08:12 +11:00
Paul "TBBle" Hampson
bcc02002a2 go mod tidy after containerd moved to hcsshim v0.8.15
Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2021-03-13 12:38:36 +11:00
Derek McGowan
35eeb24a17
Fix exported comments enforcer in CI
Add comments where missing and fix incorrect comments

Signed-off-by: Derek McGowan <derek@mcg.dev>
2021-03-12 08:47:05 -08:00
Davanum Srinivas
6a4aa1e2e7
Separate go module for client tests
Will help us drop dependency to github.com/Microsoft/hcsshim/test in the
main go.mod

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-03-11 19:27:45 -05:00
Iceber Gu
f37ae8fc35
move to v3.4.1 for the pause image
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>
2021-03-07 15:21:20 +08:00
Chris Fregly
80e1d98f6b fix: issue #5032
Signed-off-by: Chris Fregly <cfregly@ibm.com>
2021-02-17 18:21:17 -08:00
Mike Brown
c876b15b54 getting cri integration up and running
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2020-10-19 10:02:05 -05:00
Maksym Pavlenko
3d02441a79 Refactor pkg packages
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2020-10-08 17:30:17 -07:00
Maksym Pavlenko
3508ddd3dd Refactor CRI packages
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2020-10-07 14:45:57 -07:00
Derek McGowan
b22b627300
Move cri server packages under pkg/cri
Organizes the cri related server packages under pkg/cri

Signed-off-by: Derek McGowan <derek@mcg.dev>
2020-10-07 13:09:37 -07:00
Derek McGowan
1c60ae7f87
Use local version of cri packages
Signed-off-by: Derek McGowan <derek@mcg.dev>
2020-10-07 10:59:40 -07:00
Derek McGowan
07c98d0bf1 Fix lint in Unix environments
Signed-off-by: Derek McGowan <derek@mcg.dev>
2020-10-05 17:46:01 -07:00
Derek McGowan
77cf032195 Enable golangci on Windows
Signed-off-by: Derek McGowan <derek@mcg.dev>
2020-10-01 09:01:16 -07:00
Derek McGowan
a3c0e8859c Align lint checks with containerd
Signed-off-by: Derek McGowan <derek@mcg.dev>
2020-09-30 23:17:46 -07:00
Mike Brown
4549b94eca gofmt cleanup
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2020-07-04 15:54:29 -05:00
Abhishek Kulkarni
287c52d1c6 Forcibly stop running containers before removal
Signed-off-by: Abhishek Kulkarni <abd.kulkarni@gmail.com>
2020-07-04 15:49:00 -05:00
Davanum Srinivas
cbb7c28f19
Add copyright headers
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-06-22 14:49:13 -04:00
Davanum Srinivas
6007c354a6
Copy kubernetes/pkg/kubelet/util
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-06-22 14:48:25 -04:00
Davanum Srinivas
bb828a9f84
Make copy of pkg/kubelet/cri/remote
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-06-22 14:00:08 -04:00
Davanum Srinivas
41f184f15b
Update vendor.conf to kubernetes 1.19.0-beta.2
update streaming import path
switch remote package path

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-06-22 08:44:49 -04:00
Mike Brown
1b60224e2e use containerd/project header test
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2020-04-22 19:35:37 -05:00
Sebastiaan van Stijn
a3e7f68fa5
vendor: update kubernetes v1.18.0-beta.1
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-06 16:18:37 +01:00
Mike Brown
c9ed98462d move to v3.2 for the pause image
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2020-02-14 12:55:52 -06:00
darfux
5cccd008a0 integration: Add container restart test
Add an integration test case to test whether a runtime can restart a
container properly.

Signed-off-by: Li Yuxuan <liyuxuan04@baidu.com>
2019-12-12 10:23:15 +08:00
Lantao Liu
2ce0bb0926 Update code for latest containerd.
Signed-off-by: Lantao Liu <lantaol@google.com>
2019-10-09 18:05:20 -07:00
Lantao Liu
2a9a982ae3 Fix integration test for golang 1.13
Signed-off-by: Lantao Liu <lantaol@google.com>
2019-10-09 10:51:02 -07:00
Lantao Liu
35eb96d901 Update deployment and integration test
Signed-off-by: Lantao Liu <lantaol@google.com>
2019-09-18 17:21:37 -07:00
Lantao Liu
9bf53555a0 Use golangci-lint.
Signed-off-by: Lantao Liu <lantaol@google.com>
2019-08-07 01:20:52 -07:00
Lantao Liu
7665f4ac22 Rename the test binary to containerd-test.
Signed-off-by: Lantao Liu <lantaol@google.com>
2019-08-02 15:43:06 -07:00
Lantao Liu
ba8788c6b9 Update kubernetes dependency to 1.15.0.
Signed-off-by: Lantao Liu <lantaol@google.com>
2019-07-31 23:52:03 -07:00
Lantao Liu
199ee362e8 Update test and run test containerd in a different directory.
Signed-off-by: Lantao Liu <lantaol@google.com>
2019-06-12 11:18:55 -07:00
lifupan
47fc645682 Integration test task.Delete fix
task.Delete() will try to kill the task before delete it,
but once the task is killed, the TaskExit event will also
tigger another task.Delete() which would conflict with this
test task.Delete(). To avoid this conflict, kill the task instead
of Delete it, and let TaskExit trigger task.Delete().

Signed-off-by: lifupan <lifupan@gmail.com>
2019-05-08 12:28:22 +08:00
Lantao Liu
4b4182cf59 Do not assume there is no duplicated elements in arrays.
Signed-off-by: Lantao Liu <lantaol@google.com>
2019-03-28 13:05:55 -07:00
Lantao Liu
1a0228d520 Do not SIGKILL container if container stop is cancelled.
Signed-off-by: Lantao Liu <lantaol@google.com>
2019-03-27 00:49:41 -07:00
haiyanmeng
9dea9d39f5
Add RuntimeHandler into PodSandbox and PodSandboxStatus
The upstream CRI change: https://github.com/kubernetes/kubernetes/pull/73833

Signed-off-by: Haiyan Meng <haiyanmeng@google.com>
2019-02-27 16:49:35 -08:00
Haiyan Meng
035ce6c975
Update test based on new PullImage CRI.
Signed-off-by: Haiyan Meng <haiyanmeng@google.com>
2019-02-26 12:43:54 -08:00
Lantao Liu
089d4fbfb8 Set /etc/hostname.
Signed-off-by: Lantao Liu <lantaol@google.com>
2019-02-12 00:18:00 -08:00
Lantao Liu
f8b3450847 Add integration test for unknown state
Signed-off-by: Lantao Liu <lantaol@google.com>
2019-02-05 11:56:24 -08:00
Lantao Liu
9a455daf4d Don't use string when there is a constant.
Signed-off-by: Lantao Liu <lantaol@google.com>
2019-01-24 11:45:16 -08:00
Lantao Liu
879dc6ae25 Add integration test.
Signed-off-by: Lantao Liu <lantaol@google.com>
2019-01-23 18:14:34 -08:00
Lantao Liu
5c40fd9585 Move no metadata test
Signed-off-by: Lantao Liu <lantaol@google.com>
2019-01-09 00:12:53 -08:00
Lantao Liu
76c5b20339
Merge pull request #1019 from teawater/add_test
Add integration test for RunPodSandbox and CreateContainer
2019-01-08 11:12:53 -08:00
Hui Zhu
ab84e3914d Add integration test for RunPodSandbox and CreateContainer
Fixes: #1009

Signed-off-by: Hui Zhu <teawater@hyper.sh>
2019-01-08 12:05:48 +08:00
Lantao Liu
f0f68c1032 Add test for shared pid multi-process container stop.
Signed-off-by: Lantao Liu <lantaol@google.com>
2019-01-04 13:16:29 -08:00
Lantao Liu
ec6a1eab11
Merge pull request #991 from Random-Liu/remove-container-lifecycle-image-dependency
Remove container lifecycle image dependency
2018-12-07 17:03:57 -08:00
Lantao Liu
82d8c9bcfa Add integration test.
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-12-07 10:40:21 -08:00
Lantao Liu
30fa71573f Test that CRI plugin should not see image in other namespaces.
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-12-06 02:28:37 -08:00
Mike Brown
64b067d93f fix integration test
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2018-11-08 17:53:47 -06:00
Lantao Liu
775bc6e5f4 Update integration test.
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-10-24 11:00:25 -07:00
Lantao Liu
84775d2c10 Add integration test.
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-10-11 10:32:19 -07:00
Archana Shinde
54b1c00b3b test: Fix compile error with go1.10.2
Replace Skip with Skipf in the intergration test.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2018-10-08 11:43:53 -07:00
Lantao Liu
0580ce45fd Update test based on new CRI.
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-10-05 11:01:20 -07:00
Lantao Liu
6905460b85 Add integration test
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-09-27 11:37:26 -07:00
Lantao Liu
46b8f4290b
Merge pull request #912 from Random-Liu/add-hostname-env-integration-test
Add hostname env integration test.
2018-09-17 10:42:46 -07:00
Lantao Liu
c7c68993c7 Add hostname env integration test.
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-09-16 20:32:18 -07:00
Lantao Liu
51ee6ea6dc Add integration test
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-09-13 16:31:32 -07:00
Lantao Liu
bf551b9c4c Add integration test.
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-06-14 14:24:17 -07:00
Lantao Liu
c55776377f Fix empty volume ownership.
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-06-11 08:40:35 +00:00
Lantao Liu
0faff1c22f Fix ctr cri timeout.
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-06-05 01:24:28 +00:00
Lantao Liu
06f53b4838 Add unix:// prefix for socket addresses used by CRI remote client.
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-04-20 17:36:25 -07:00
Lantao Liu
f0655ecfe0 Use pause image from new source.
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-03-26 07:11:41 +00:00
Nitesh Konkar
6a542c596b Bump pause container to multi-arch gcr.io/google-containers/pause:3.1
Signed-off-by: Nitesh Konkar <niteshkonkar@in.ibm.com>
2018-03-22 05:44:12 +00:00
Lantao Liu
387da59ee5 Rename all variables to remove "cricontainerd".
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-03-19 21:59:32 +00:00
Lantao Liu
e1fe1abff0 Use github.com/pkg/errors
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-03-17 02:24:38 +00:00
Mike Brown
d4e7154625 move links for cri-containerd to cri
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2018-03-13 17:06:26 -05:00
Lantao Liu
f0a500a390 Use direct function call.
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-03-13 04:51:19 +00:00
Lantao Liu
05bcc3e88c Update makefile and all integration test
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-03-05 21:45:20 +00:00
Lantao Liu
09294fca40 Add generic restart test.
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-02-27 18:21:09 +00:00
Lantao Liu
9b2d2a203c Add initial wait for health-monitor and use pkill -x.
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-02-14 18:51:22 +00:00
Lantao Liu
6900cbdada Use mountpoint as image fs identifier.
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-02-09 07:46:49 +00:00
Lantao Liu
46fc92f65f Use new namespace mode and support shared pid namespace.
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-02-08 03:10:57 +00:00
Lantao Liu
605b4a7b6a Update imports
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-02-08 02:45:44 +00:00
Lantao Liu
df58d6825d Avoid containerd access as much as possible.
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-01-25 23:36:00 +00:00
Lantao Liu
4e9ca399e1 Use containerd plugin config.
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-01-19 02:25:03 +00:00
Lantao Liu
a9d846af23 Upgrade test framework to talk to containerd sock.
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-01-18 18:51:18 +00:00
Lantao Liu
3d68005c04 Replace glog with logrus
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-01-17 21:57:31 +00:00
Lantao Liu
794543065a Add script to automatically update containerd with newest cri plugin.
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-01-15 06:54:55 +00:00
Lantao Liu
8782f18d50 Add integration test for volume copy up.
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-01-11 19:10:52 +00:00
Lantao Liu
025ffe551f Rename kubernetes-incubator/cri-containerd to containerd/cri-containerd.
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-01-10 22:35:33 +00:00
Lantao Liu
f4c572fba7 Add restart test for sandbox recovery.
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-12-11 21:21:08 +00:00
Lantao Liu
9a9550d7db Fix typos.
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-12-04 18:35:05 +00:00
yanxuean
fa8593ffa0 Add intergration test for truncindex
fix #343

Signed-off-by: yason <yan.xuean@zte.com.cn>
2017-12-01 10:06:21 +08:00
Lantao Liu
76268ea242 Do not remove sandbox when netns is not closed.
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-11-21 01:22:19 +00:00
Lantao Liu
6ab809f712 Should not be able to create existing sandbox/container.
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-11-20 04:05:14 +00:00
yanxuean
12bbbc0edc add unit test for listcontainer and listpodsandbox
Signed-off-by: yanxuean <yan.xuean@zte.com.cn>
2017-11-07 15:57:29 +08:00
yanxuean
6234337459 Add truncindex for filter in List and Stat
fix #344
Signed-off-by: yanxuean <yan.xuean@zte.com.cn>
2017-11-06 16:47:43 +08:00
Lantao Liu
7f11eff42d Add integration test for image load
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-10-27 21:51:04 +00:00
Lantao Liu
e78c85f76b Use new container update function
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-10-06 17:57:26 +00:00
Lantao Liu
ecd1638293 Add integration test
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-10-03 06:03:54 +00:00
Abhinandan Prativadi
853804bd8e Adding integration test for container stats
Signed-off-by: Abhinandan Prativadi <abhi@docker.com>
2017-09-26 12:03:15 -07:00
Lantao Liu
8fb57da18e Add integration test framework
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-09-25 21:02:30 +00:00