Commit Graph

8923 Commits

Author SHA1 Message Date
Sebastiaan van Stijn
f6f8617367
go.mod: github.com/containerd/btrfs v0.0.0-20210316141732-918d888fb676
full diff: 404b914980...918d888fb6

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-03-16 15:33:23 +01:00
Sebastiaan van Stijn
460b35236e
go.mod: kubernetes v1.20.4
no changes in vendored code, but syncing with the latest v1.20.x
patch release.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-03-16 10:53:16 +01:00
Akihiro Suda
fef6bb8d33
Merge pull request #5204 from thaJeztah/overlayutils
move overlay-checks to an overlayutils package
2021-03-16 15:50:29 +09:00
Iceber Gu
5e484c9613
runtime/v2/runc: fix the defer cleanup of the NewContainer
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>
2021-03-16 11:41:17 +08:00
Derek McGowan
e6086d9c07
Prepare release notes for v1.5.0-beta.4
Signed-off-by: Derek McGowan <derek@mcg.dev>
2021-03-15 16:14:27 -07:00
Derek McGowan
34b7a5f094
Update mailmap
Signed-off-by: Derek McGowan <derek@mcg.dev>
2021-03-15 16:14:27 -07:00
Derek McGowan
2755ead927
Merge pull request #4978 from cpuguy83/certs_dir
Add support for using a host registry dir in cri
2021-03-15 13:47:03 -07:00
Sebastiaan van Stijn
ba8f9845ec
move overlay-checks to an overlayutils package
This allows using the utilities without importing the whole
snapshotter.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-03-15 19:18:50 +01:00
Brian Goff
7776e5ef2a Support adding devices by dir
This enables cases where devices exist in a subdirectory of /dev,
particularly where those device names are not portable across machines,
which makes it problematic to specify from a runtime such as cri.

Added this to `ctr` as well so I could test that the code at least
works.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2021-03-15 16:42:23 +00: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
Phil Estes
fad66f94ec
Merge pull request #5174 from fuweid/fix-5130
runtime: ignore file-already-closed error if dead shim
2021-03-15 10:38:41 -04:00
Phil Estes
bd4f468c62
Merge pull request #5186 from cpuguy83/fix_docker_cert_loading
Fix docker style cert loading.
2021-03-15 10:36:42 -04:00
Phil Estes
5461fa3a75
Merge pull request #5196 from Iceber/fix-rootfs
rootfs: fix the error handling of the snapshotter.Commit
2021-03-15 09:54:47 -04:00
Wei Fu
d895118c7c runtime/v2/runc: fix leaking socket path
When runC shimv2 starts, the StartShim interface will re-exec itself as
long-running process, which will read the `address` during initializing.

```happycase
Process

containerd-shim-runc-v1/v2 start             containerd-shim-runc-v1/v2

	initializing socket

	reexec containerd-shim-runc-v1/v2

	write address into file

						initializing

							read address

	write back to containerd daemon

						serving

						...

						remove address in Shutdown call
```

However, there is no synchronization after reexec. Then the data race is
like:

```leaking-case
Process

containerd-shim-runc-v1/v2 start             containerd-shim-runc-v1/v2

	initializing socket

	reexec containerd-shim-runc-v1/v2

						initializing

							read address

	write address into file

	write back to containerd daemon

						serving

						...

						fail to remove address
						because of empty address
```

The `address` should be writen into file first before reexec.

And if shutdown the whole service before cleanup temporary
resource (like socket file), the Shutdown caller will receive `ttrpc: closed`
sometime, which depends on go runtime scheduler. Then it also causes leaking
socket files.

Since the shimV2-Delete binary API must be called to cleanup shim temporary
resource and shimV2-runC-v1 doesn't support grouping multi containers in one,
it is safe to remove the socket file in the binary call for shimV2-runC-v1.
But for the shimV2-runC-v2 shim, we still cleanup socket in Shutdown.
Hopefully we can find a way to cleanup socket in shimV2-Delete binary
call.

Fix: #5173

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2021-03-15 18:32:00 +08:00
pacoxu
a76cefd124 plugin status should be skip, not error
Signed-off-by: pacoxu <paco.xu@daocloud.io>
2021-03-15 18:04:37 +08:00
Shiming Zhang
766e7953ab Change dgst to digest in debug
Signed-off-by: Shiming Zhang <wzshiming@foxmail.com>
2021-03-15 16:46:19 +08:00
Iceber Gu
4e8b2f309a
rootfs: fix the error handling of the createInitLayer
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>
2021-03-15 15:48:48 +08:00
Fu, Wei
6b410ba41f
Merge pull request #5197 from Iceber/fix-ctr-command
cmd/ctr: fix export command
2021-03-15 15:41:14 +08:00
Fu, Wei
06e6f45c31
Merge pull request #5198 from Iceber/fix-usage
cmd/ctr: use e.g. in the command usage
2021-03-15 15:37:39 +08:00
Iceber Gu
d3ad7f3908
cmd/ctr: use e.g. in the command usage
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>
2021-03-15 13:48:25 +08:00
Iceber Gu
231bbdc379
cmd/ctr: fix export command
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>
2021-03-15 13:22:56 +08:00
Madhav Jivrajani
8f863afd3a Use net.IP.IsLoopback() to match loopback addresses
- changed the `MatchLocalhost` function in remotes/docker/registry.go
	- Make use of SplitHostPort to split host and port number
- Added additional tests for modified code in remotes/docker/registry_test.go
- Note: this does not handle mathcing of IP addresses in octal, decimal or hex format or a mix of these.

Fixes: #5129

Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>
2021-03-15 09:57:01 +05:30
Wei Fu
eabd9b98b6 runtime: ignore file-already-closed error if dead shim
fix: #5130

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2021-03-15 12:18:26 +08:00
Maksym Pavlenko
e231b955dd
Merge pull request #5154 from estesp/zero-len
Better error when handling a descriptor of size zero
2021-03-14 15:40:39 -07:00
Maksym Pavlenko
5b7f2657d7
Merge pull request #5184 from thaJeztah/fixate_buildtags
Prevent runc inheriting BUILDTAGS from containerd
2021-03-13 22:32:01 -08:00
Phil Estes
f6a9942733
Better error when handling a descriptor of size zero
Signed-off-by: Phil Estes <estesp@amazon.com>
2021-03-13 22:48:55 -05:00
Phil Estes
92009ad7a3
Merge pull request #5164 from errordeveloper/master
Improve unexpected response error handling
2021-03-13 22:05:53 -05:00
Phil Estes
6f94b156fa
Merge pull request #5189 from TBBle/reduce-load-on-ratelimited-docker.io
Reduce load on ratelimited docker.io
2021-03-13 22:05:15 -05:00
Phil Estes
42266dadcf
Merge pull request #5182 from thaJeztah/bump_go_runc
go.mod: github.com/containerd/go-runc v0.0.0-20201020171139-16b287bc67d0
2021-03-13 22:01:56 -05:00
Sebastiaan van Stijn
bd2c0898aa
go.mod: github.com/containerd/go-runc v0.0.0-20201020171139-16b287bc67d0
full diff: 7016d3ce23...16b287bc67

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-03-13 20:12:12 +01:00
Derek McGowan
1432839310
Merge pull request #5185 from thaJeztah/update_imgcrypt
go.mod: update containerd/imgcrypt, containerd/aufs, containerd/zfs
2021-03-13 09:55:14 -08:00
Sebastiaan van Stijn
24a8b460e7
go.mod: github.com/containerd/zfs v0.0.0-20210313052028-2233970b74b1
full diff: 11e8f1707f...2233970b74

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-03-13 10:45:23 +01:00
Sebastiaan van Stijn
f0b6bcb775
go.mod: github.com/containerd/aufs v0.0.0-20210313051948-ffdde1490233
full diff: 76a6863f29...ffdde14902

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-03-13 10:41:46 +01: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
Brian Goff
b0b6d9aa03 Add support for using a host registry dir in cri
This will be used instead of the cri registry config in the main config
toml.

---

Also pulls in changes from containerd/cri@d0b4eecbb3

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2021-03-12 22:42:22 +00:00
Brian Goff
1fd99e24a2 Fix docker style cert loading.
The certs dir parsing was skipping over files instead of reading them,
as such the certs would never load.

It was also stating the file name rather than the full path for cert
pairs.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2021-03-12 22:42:20 +00:00
Sebastiaan van Stijn
fcab1fe537
go.mod: github.com/containerd/imgcrypt 7ed62a527887
full diff: 0ae5c75f59...7ed62a5278

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-03-12 19:16:37 +01:00
Sebastiaan van Stijn
55a9bbc033
Prevent runc inheriting BUILDTAGS from containerd
Both runc and containerd use BUILDTAGS to customize go build-tags.

When building containerd with custom build-tags, runc inherited
those, causing the default to be overwritten, e.g.;

    make BUILDTAGS=no_btrfs cri-cni-release
    (in script/setup/install-runc)

    HEAD is now at 12644e61 VERSION: release 1.0.0~rc93
    make[1]: Entering directory '/tmp/tmp.ZJzc2KtI0A/runc'
    go build -trimpath "-mod=vendor" "-buildmode=pie"  -tags "no_btrfs" -ldflags "-X main.gitCommit="12644e614e25b05da6fd08a38ffa0cfe1903fdec" -X main.version=1.0.0-rc93 " -o runc .
                                                   ^^^^^^^^^^^^^^^^

This patch brings back the BUILDTAGS make-var in the runc-install
script, which fixates the buildtags to our defaults.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-03-12 18:37:18 +01:00
Derek McGowan
8cf669ce34
Fix unsupported files exporting functions for apparmor and seccomp
Signed-off-by: Derek McGowan <derek@mcg.dev>
2021-03-12 08:47:05 -08: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
Derek McGowan
9d5c1165a6
Merge pull request #5178 from estesp/go-1.16.2
Update to Go 1.16.2
2021-03-12 08:23:18 -08:00
Derek McGowan
031775ee5e
Merge pull request #5179 from dims/document-the-runtime-public-method
Document the Runtime public method
2021-03-12 08:20:16 -08:00
Davanum Srinivas
b446ed1ca8
Document the Runtime public method
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-03-12 10:29:04 -05:00
Phil Estes
a2f5a9d43a
Merge pull request #5101 from dims/drop-github.com/Microsoft/hcsshim/test
Move *_test.go in root directory to integration/client
2021-03-12 10:07:54 -05:00
Phil Estes
8cbef0fade
Update to Go 1.16.2
Signed-off-by: Phil Estes <estesp@amazon.com>
2021-03-12 09:59:01 -05:00
Kazuyoshi Kato
437b7f71ba ci: log the status of GitHub Actions' VM at the end
To investigate issues like #4969, it would be helpful to understand
the status of the VM at the end.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2021-03-11 16:52:57 -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
Derek McGowan
d8208e2e37
Merge pull request #5170 from dims/switch-zuul-merge-mode 2021-03-11 14:52:35 -08:00