Commit Graph

5909 Commits

Author SHA1 Message Date
Sebastiaan van Stijn
5607b23b0f
vendor.conf: move some imports to match position with containerd/cri
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-07 13:18:47 +01:00
Maksym Pavlenko
3868dd7540
Merge pull request #4087 from crosbymichael/cgroups-exports
export cgroups collectors
2020-03-06 11:44:44 -08:00
Michael Crosby
97ca1be067
Merge pull request #4058 from tedyu/get-process
Avoid allocating slice for finding Process
2020-03-06 13:16:18 -05:00
zyu
e3ab8bda60 Avoid allocating slice for finding Process
Signed-off-by: zyu <yuzhihong@gmail.com>
2020-03-06 09:51:26 -08:00
Michael Crosby
1239f54035 export cgroups collectors
This makes it easier to extend the collectors to be used by external code and
task managers

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2020-03-06 12:51:22 -05:00
Michael Crosby
aac6a51ee7
Merge pull request #4059 from fuweid/me-upstream-release-status
RELEASES.md: update release status
2020-03-06 11:45:57 -05:00
Michael Crosby
35a8de8996
Merge pull request #4080 from mxpv/opts
Pass snapshotter opts from client Pull
2020-03-06 10:26:28 -05:00
Wei Fu
8c9e84174d RELEASES.md: update release status
1. Update release status
2. Add Extended state for release v1.2

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2020-03-06 10:29:39 +08:00
Maksym Pavlenko
936b7b0043
Merge pull request #4085 from thaJeztah/update_crypto
vendor: bump golang.org/x/crypto bac4c82f6975
2020-03-05 16:36:11 -08:00
Sebastiaan van Stijn
e0a8fe7cb6
vendor: bump golang.org/x/crypto bac4c82f6975
This version contains a fix for CVE-2020-9283, but the code-path
is not in use in this repository.

Updating the dependency in case people are concerned that we
use a version of the dependency that doesn't have the fix.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-05 22:14:32 +01:00
Phil Estes
0131015594
Merge pull request #4084 from crosbymichael/kill-all-check
[carry] Check error return from json.Unmarshal
2020-03-05 16:04:54 -05:00
Maksym Pavlenko
233d61f51c
Merge pull request #4083 from crosbymichael/resource-opts
Add linux resource oci.SpecOpts
2020-03-05 12:20:22 -08:00
Ted Yu
a687d3a36d Check error return from json.Unmarshal
Signed-off-by: Ted Yu <yuzhihong@gmail.com>
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2020-03-05 13:38:08 -05:00
Michael Crosby
a3ca8a0dfc Add linux resource oci.SpecOpts
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2020-03-05 13:02:10 -05:00
Maksym Pavlenko
54fd2cba49
Merge pull request #4081 from crosbymichael/info-spec
Add ctr c info --spec flag to output spec
2020-03-05 09:54:41 -08:00
Michael Crosby
00e6be9f45 Add ctr c info --spec flag to output spec
This flag makes it easy to view only the OCI spec for the container.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2020-03-05 12:10:14 -05:00
Maksym Pavlenko
3be12fe1c0 Do not loose snapshotter options
Pass snapshotter options in recursive applyLayers calls.

Signed-off-by: Maksym Pavlenko <makpav@amazon.com>
2020-03-02 13:48:41 -08:00
Maksym Pavlenko
8cddb5f91d Pass snapshotter opts during Pull
For remote snapshotter cases it's quite often there is need to pass extra info
from client (for instance - registry URL to query remote layer from, credentials, etc).

This commit slightly extends WithPullSnapshotter to pass extra labels to a snapshotter.

Signed-off-by: Maksym Pavlenko <makpav@amazon.com>
2020-03-02 13:45:40 -08:00
Maksym Pavlenko
ca66f3dd5d
Merge pull request #4076 from kevpar/windows-cri-support
Enable CRI plugin for Windows builds as well
2020-02-29 21:55:11 -08:00
Eric Ren
a3685262fe snapshots/devmapper: do not stop snapshot GC when one snapshot removing fails
Snapshots GC takes use of pruneBranch() function to remove snapshots,
but GC will stop if snapshotter.Remove() returns error and the error
number is not ErrFailedPrecondition. This results in thousands of
dm snapshots not deleted if one snapshot is not deleted, due to
errors like "contains a filesystem in use".

So return ErrFailedPrecondition error number in Remove() function where
appropriate, and let GC process go on collecting other snapshots.

Fix: #3923
Signed-off-by: Eryu Guan <eguan@linux.alibaba.com>
Signed-off-by: Eric Ren <renzhen.rz@linux.alibaba.com>
2020-02-29 13:32:48 +08:00
Eric Ren
b6bf7b97c2 devmapper: async remove device using Cleanup
Fix: #3923
Signed-off-by: Eric Ren <renzhen@linux.alibaba.com>
2020-02-29 13:32:48 +08:00
Phil Estes
3a1c6a260a
Merge pull request #4073 from dims/update-opencontainers/selinux-to-1.3.3
Update to a released version of opencontainers/selinux (1.3.3)
2020-02-28 17:45:44 -05:00
Kevin Parsons
c7eec0c178 Fix file header in builtins_cri.go
Signed-off-by: Kevin Parsons <kevpar@microsoft.com>
2020-02-28 14:34:13 -08:00
Phil Estes
269015e31c
Merge pull request #4072 from thaJeztah/update_gotest_tools_v3
vendor: update gotest.tools v3.0.2
2020-02-28 13:00:41 -05:00
Sebastiaan van Stijn
f2edc6f164
vendor: update gotest.tools v3.0.2
full diff: https://github.com/gotestyourself/gotest.tools/compare/v2.3.0...v3.0.2

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-02-28 17:47:20 +01:00
Davanum Srinivas
026e43806a
Update to a released version of opencontainers/selinux (1.3.3)
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-02-28 11:34:40 -05:00
Maksym Pavlenko
4d242818bf
Merge pull request #4053 from AkihiroSuda/vendor-grpc-20200225
vendor protobuf & grpc (GoGoProtoPackageIsVersion3)
2020-02-27 11:59:59 -08:00
Phil Estes
669f516b0e
Merge pull request #4062 from tedyu/start-shim-defer
Use named error return for service#StartShim
2020-02-27 13:23:31 -05:00
Ted Yu
f8ade8debd Use named error return for service#StartShim
Signed-off-by: Ted Yu <yuzhihong@gmail.com>
2020-02-27 06:18:05 -08:00
Phil Estes
536d7ef92d
Merge pull request #4066 from thaJeztah/choco_progress
AppVeyor: disable download progress on choco installs
2020-02-27 08:38:42 -05:00
Sebastiaan van Stijn
985b26f2f9
AppVeyor: disable download progress on choco installs
Downloading packages is quite noisy in the logs. This patch disables
the download progress output, which should save +/- 4000 lines of
output.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-02-27 12:03:06 +01:00
Derek McGowan
06b284026d
Merge pull request #4063 from tedyu/namespace-path
fix killall when use pidnamespace
2020-02-26 23:08:31 -08:00
Ted Yu
4105135e36 fix killall when use pidnamespace
Signed-off-by: Ted Yu <yuzhihong@gmail.com>
2020-02-26 20:56:49 -08:00
Phil Estes
ebec675a8d
Merge pull request #3802 from vladimiroff/unify-dialers
Unify dialer implementations
2020-02-26 16:54:22 -05:00
Kiril Vladimiroff
4dd75be2b9
Unify dialer implementations
Instead of having several dialer implementations, leave only one in
`pkg/dialer` and call it from `pkg/ttrpcutil`, `runtime/v(1|2)/shim`
which had their own

Closes #3471.

Signed-off-by: Kiril Vladimiroff <kiril@vladimiroff.org>
2020-02-26 23:29:04 +02:00
Akihiro Suda
8e448bb279 vendor protobuf & grpc
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-02-26 10:57:05 +09:00
Phil Estes
9b4967bd6b
Merge pull request #4048 from fuweid/me-use-new-ctx-to-cleanup
bugfix: cleanup dangling shim by brand new context
2020-02-24 16:52:15 -05:00
Phil Estes
3b9f2e8540
Merge pull request #4051 from rancher/selinux
Use spec's mountLabel when mounting the rootfs
2020-02-24 16:51:21 -05:00
Darren Shepherd
c134a9befa Use spec's mountLabel when mounting the rootfs
In NewContainer if a SnapshotKey is used and the spec has
a mountLabel specified, that mountLabel should be used to mount
the rootfs.

Signed-off-by: Darren Shepherd <darren@rancher.com>
2020-02-24 10:04:05 -07:00
Phil Estes
2c5279e820
Merge pull request #4049 from fuweid/me-fix-flaky-testcase
cleanup the image synchronously for Usage case
2020-02-21 12:04:55 -05:00
Wei Fu
1d888ad6a6 cleanup the image synchronously for Usage case
TestImageIsUnpacked will unpacked docker.io/library/busybox:latest with
linux/amd64 platform. If the TestImageUsage doesn't wait for cleanup
finish (snapshotter is cleanup by gc asynchronously) and fetch image,
the Usage(ctx) will get 10767844 bytes(manifestUsage + snapshotUsage).

However, the manifestUsage is 9466142 bytes. That is why we got the
error:

```
Expected actual usage to equal manifest reported usage of 9466142:
got 10767844
```

This commit is to make sure that the image has been cleanup fully.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2020-02-22 00:02:33 +08:00
Wei Fu
18e581dd91 bugfix: cleanup dangling shim by brand new context
When there is timeout or cancel for create container, killShim will fail
because of canceled context. The shim will be dangling and unmanageable.

Need to use new context to do cleanup.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2020-02-21 16:49:58 +08:00
Justin Terry (SF)
fed8890e93 Enable CRI plugin for Windows builds as well
The builtins_cri_linux.go file only being included for _linux builds which
means that the builds for Windows do not contain the CRI plugin. This can
be disabled for either platform with the no_cri tag.

Signed-off-by: Justin Terry (SF) <juterry@microsoft.com>
2020-02-20 22:00:49 -08:00
Phil Estes
0e08405433
Merge pull request #4046 from darfux/cancel_shim_log_ctx_by_onclose
v2: Cancel shim log ctx when ttrpc is closed
2020-02-20 17:14:14 -05:00
Li Yuxuan
84464b801f v2: Cancel shim log ctx when ttrpc is closed
The background context aovids shim blocking when the ctx is cancelled
unexpectedly during shim start. But if the shim exits unexpectedly
before opening the pipe, the fd will never be closed.
`onCloseWithShimLog` makes sure that the shim log fd is closed properly
once the shim disconnects.

Signed-off-by: Li Yuxuan <liyuxuan04@baidu.com>
2020-02-20 23:20:10 +08:00
Maksym Pavlenko
986d06785c
Merge pull request #4042 from thaJeztah/bump_crypto
vendor: golang.org/x/crypto 1d94cc7ab1c630336ab82ccb9c9cda72a875c382
2020-02-19 14:21:24 -08:00
Phil Estes
7f0bccf1a0
Merge pull request #4041 from elboulangero/remove-executable-bit-on-api-txt-files
Remove the executable bit for api/*.txt files
2020-02-19 10:04:41 -05:00
Sebastiaan van Stijn
f3652d0682
vendor: golang.org/x/crypto 1d94cc7ab1c630336ab82ccb9c9cda72a875c382
full diff: 69ecbb4d6d...1d94cc7ab1

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-02-19 12:47:59 +01:00
Arnaud Rebillout
773adf7ab6 Remove the executable bit for api/*.txt files
These are text files so there's no reason these files are executable,
unless I'm missing something? Maybe it's something that doesn't show on
a Windows filesystem, only on Linux or macOS, hence nobody noticed?

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
2020-02-19 16:32:52 +07:00
Derek McGowan
986f294187
Merge pull request #3942 from hs0210/work
Add unit test for func in filter.go
2020-02-18 12:05:22 -08:00