Commit Graph

9238 Commits

Author SHA1 Message Date
Akihiro Suda
14316794ad
Merge pull request #5454 from estesp/cp-5411 2021-05-06 02:18:34 +09:00
Furkan
7d70992d33
tests: add test for adaptor
I noticed AdaptInfo missing test cases. I think this
func a bit important to test since we use this func
in other packages like content, store (walking), etc.

Signed-off-by: Furkan Turkal <furkan.turkal@trendyol.com>
Signed-off-by: Furkan <furkan.turkal@trendyol.com>
2021-05-05 17:39:39 +03:00
Kevin Parsons
e120261ee3
windows: Use GetFinalPathNameByHandle for ResolveSymbolicLink
This change splits the definition of pkg/cri/os.ResolveSymbolicLink by
platform (windows/!windows), and switches to an alternate implementation
for Windows. This aims to fix the issue described in containerd/containerd#5405.

The previous implementation which just called filepath.EvalSymlinks has
historically had issues on Windows. One of these issues we were able to
fix in Go, but EvalSymlinks's behavior is not well specified on
Windows, and there could easily be more issues in the future, so it
seems prudent to move to a separate implementation for Windows.

The new implementation uses the Windows GetFinalPathNameByHandle API,
which takes a handle to an open file or directory and some flags, and
returns the "real" name for the object. See comments in the code for
details on the implementation.

I have tested this change with a variety of mounts and everything seems
to work as expected. Functions that make incorrect assumptions on what a
Windows path can look like may have some trouble with the \\?\ path
syntax. For instance EvalSymlinks fails when given a \\?\UNC\ path. For
this reason, the resolvePath implementation modifies the returned path
to translate to the more common form (\\?\UNC\server\share ->
\\server\share).

Signed-off-by: Kevin Parsons <kevpar@microsoft.com>
(cherry picked from commit b0d3b35b28)
Signed-off-by: Phil Estes <estesp@gmail.com>
2021-05-05 10:00:14 -04:00
Phil Estes
1e8ec32698
Merge pull request #5411 from kevpar/win-evalsymlinks
windows: Use GetFinalPathNameByHandle for ResolveSymbolicLink
2021-05-05 09:52:13 -04:00
Phil Estes
93725cdb2e
Merge pull request #5448 from Dentrax/fix/doc-client-import
doc: add missing namespaces package
2021-05-05 09:50:14 -04:00
Furkan
0b786908c0
doc: add missing namespaces package
Currently, we can not reproduce the given Namespaces
section examples written in the README, since it's
not clear to which package should we import to.

Signed-off-by: Furkan Turkal <furkan.turkal@trendyol.com>
2021-05-04 22:04:01 +03:00
Kevin Parsons
b0d3b35b28 windows: Use GetFinalPathNameByHandle for ResolveSymbolicLink
This change splits the definition of pkg/cri/os.ResolveSymbolicLink by
platform (windows/!windows), and switches to an alternate implementation
for Windows. This aims to fix the issue described in containerd/containerd#5405.

The previous implementation which just called filepath.EvalSymlinks has
historically had issues on Windows. One of these issues we were able to
fix in Go, but EvalSymlinks's behavior is not well specified on
Windows, and there could easily be more issues in the future, so it
seems prudent to move to a separate implementation for Windows.

The new implementation uses the Windows GetFinalPathNameByHandle API,
which takes a handle to an open file or directory and some flags, and
returns the "real" name for the object. See comments in the code for
details on the implementation.

I have tested this change with a variety of mounts and everything seems
to work as expected. Functions that make incorrect assumptions on what a
Windows path can look like may have some trouble with the \\?\ path
syntax. For instance EvalSymlinks fails when given a \\?\UNC\ path. For
this reason, the resolvePath implementation modifies the returned path
to translate to the more common form (\\?\UNC\server\share ->
\\server\share).

Signed-off-by: Kevin Parsons <kevpar@microsoft.com>
2021-05-04 11:55:11 -07:00
Enrico Weigelt, metux IT consult
9ea25634bd Makefile: allow overriding go command by environment
This is required for environments/build systems where a specific
go version / command needs to be used.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2021-05-04 20:39:47 +02:00
Fu Wei
cbdc094d33
Merge pull request #5445 from mikebrow/update-seccomp
update seccomp version
2021-05-05 00:33:14 +08:00
Akihiro Suda
c27cbc6617
Merge pull request #5436 from bwh-mind/ppc32
Update golang.org/x/sys to add linux/ppc support
2021-05-05 01:14:22 +09:00
Phil Estes
53e1577845
Merge pull request #5441 from thaJeztah/dont_loop_da_loop
go.mod: cut circular dependency on github.com/containerd/containerd
2021-05-04 10:40:26 -04:00
Mike Brown
c1a35232d8
Merge pull request #5446 from Random-Liu/fix-auth-config
Fix different registry hosts referencing the same auth config.
2021-05-04 06:21:02 -05:00
Lantao Liu
81402e4758 Fix different registry hosts referencing the same auth config.
Signed-off-by: Lantao Liu <lantaol@google.com>
2021-05-03 17:42:57 -07:00
Mike Brown
b56527cb7e update seccomp version
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2021-05-03 19:36:16 -05:00
Derek McGowan
8c906ff108
Merge pull request #5443 from dmcgowan/prepare-1.5.0
Prepare 1.5.0 release notes
2021-05-03 13:52:36 -07:00
Derek McGowan
553bb7b6b7
Prepare 1.5.0 release notes
Signed-off-by: Derek McGowan <derek@mcg.dev>
2021-05-03 09:32:52 -07:00
Aditi Sharma
8014d9fee0 Skip TLS verification for localhost
Signed-off-by: Aditi Sharma <adi.sky17@gmail.com>
2021-05-03 10:21:54 +05:30
Ben Hutchings
b538d8f1a1 Update golang.org/x/sys to add linux/ppc support
This package as recently updated to add support for Linux on
32-bit PowerPC (ppc), implemented by gccgo.

Signed-off-by: Ben Hutchings <ben.hutchings@essensium.com>
2021-05-03 00:48:09 +02:00
Mike Brown
b59e29773c adds description for hosts.toml
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2021-05-02 00:46:41 +00: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
Iceber Gu
98f5922b5e plugin: optimize the check for the last registration
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>
2021-04-30 23:32:04 +08:00
Maksym Pavlenko
df0cc5bd18
Merge pull request #5437 from dmcgowan/revert-arm64-release-builds
Revert arm64 release builds
2021-04-29 20:17:18 -07:00
Derek McGowan
15d9703d61
Remove ARM64 releases from release notes
Signed-off-by: Derek McGowan <derek@mcg.dev>
2021-04-29 15:07:05 -07:00
Derek McGowan
5d2e8e86d7
Revert "Release artifacts for Linux ARM64"
This reverts commit cdd0758534.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2021-04-29 15:05:59 -07:00
Derek McGowan
7942ae68b1
Revert "Specify seccomp target arch for CC"
This reverts commit 969ec89493.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2021-04-29 15:05:54 -07:00
Michael Crosby
32005190c0
Merge pull request #5431 from AkihiroSuda/go113
CI: allow Go 1.13 for Docker/Moby compatibility
2021-04-29 14:07:07 -04:00
Phil Estes
4196fb2b1f
Merge pull request #5427 from claudiubelu/tests/measure-consumed-stats
tests: Adds consumed memory stats test
2021-04-29 12:58:24 -04:00
Phil Estes
8d2ce532ff
Merge pull request #5428 from AkihiroSuda/fedora34
Vagrantfile: update to Fedora 34
2021-04-29 10:51:20 -04: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
Derek McGowan
f0b4258904
Merge pull request #5429 from cpuguy83/fix_libseccomp_cc
Specify seccomp target arch for CC
2021-04-28 12:00:04 -07:00
Brian Goff
969ec89493 Specify seccomp target arch for CC
seccomp's build scripts require setting the target arch that will be
built when cross compiling.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2021-04-28 17:07:44 +00:00
Michael Crosby
4dc758d0c9
Merge pull request #5433 from AkihiroSuda/deprecate-aufs
Deprecate built-in aufs snapshotter
2021-04-28 12:20:26 -04: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
Akihiro Suda
c19b7b64d3
RELEASES.md: recommend alternatives for deprecated features
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-04-28 15:56:34 +09:00
Akihiro Suda
8a62aa1c30
Deprecate built-in aufs snapshotter
aufs was removed from Ubuntu kernel in Ubuntu 21.04, so deprecate the
built-in aufs snapshotter.

The aufs snapshotter can be still maintained as a non-builtin snapshotter.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-04-28 15:50:01 +09:00
Akihiro Suda
4e7915f801
CI: allow Go 1.13 for Docker/Moby compatibility
Docker/Moby still uses Go 1.13 for building containerd binaries.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-04-28 14:09:31 +09:00
Phil Estes
feee16e0e3
Merge pull request #5403 from claudiubelu/cri-integration-images
tests: Refactors container image usage
2021-04-27 14:18:25 -04:00
Akihiro Suda
8e589e873d
Vagrantfile: update to Fedora 34
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-04-27 23:54:38 +09: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
Derek McGowan
b0fb8a5a04
Merge pull request #5400 from dmcgowan/prepare-1.5.0
Prepare v1.5.0-rc.3 release notes
2021-04-26 15:48:51 -07:00
Derek McGowan
9f43eade62
Prepare v1.5.0-rc.3 release notes
Signed-off-by: Derek McGowan <derek@mcg.dev>
2021-04-26 12:01:47 -07:00
Derek McGowan
6b9d4281ce
Merge pull request #5329 from hakman/release-linux-arm64
Release artifacts for Linux ARM64
2021-04-26 11:56:24 -07:00
Phil Estes
04f73e3f8a
Merge pull request #5421 from dims/use-the-multi-arch-versions-of-test-images
Use the multi-arch versions of the test images
2021-04-26 11:01:04 -04:00
Phil Estes
e46a4b3c64
Merge pull request #5423 from dims/test-build-image-script
prow needs some additional setup for docker buildx
2021-04-26 08:24:04 -04:00
Davanum Srinivas
4c7b960cb4
prow needs some additional setup for docker buildx
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-04-25 22:12:52 -04: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
Phil Estes
56f1b3fef8
Merge pull request #5419 from dims/script-to-build-images
Add script to build test images
2021-04-24 16:46:00 -04:00
Phil Estes
05a6533730
Merge pull request #5420 from dims/integration-tests-needs-lsof
integration tests needs lsof
2021-04-24 16:44:28 -04:00
Davanum Srinivas
4e00c4b65f
integration tests needs lsof
We need/use `lsof` in integration tests:
https://github.com/containerd/containerd/blob/master/integration/client/container_linux_test.go#L493

`TestShimDoesNotLeakPipes` fails if `lsof` is not present

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-04-24 07:49:48 -04:00