Commit Graph

8778 Commits

Author SHA1 Message Date
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
Mike Brown
6565c640be
Merge pull request #1407 from dims/update-opencontainers/selinux-to-1.3.3
Update to a released version of opencontainers/selinux (1.3.3)
2020-02-28 14:56:49 -06: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
Mike Brown
d4d6b3a0fc
Merge pull request #1340 from lumjjb/enc-node-model
Implement node key model for image encryption
2020-02-28 10:49:36 -06: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
3d4c597bdc
Update to a released version of opencontainers/selinux (1.3.3)
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-02-28 11:43:02 -05: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
Brandon Lum
8d5a8355d0 Updated docs and code for default nil behavior
Signed-off-by: Brandon Lum <lumjjb@gmail.com>
2020-02-27 23:42:03 +00: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
Brandon Lum
808ae59cf6 Update vendors to versioning
Signed-off-by: Brandon Lum <lumjjb@gmail.com>
2020-02-24 22:08:31 +00: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
Brandon Lum
7a24da0375 Updated docs and encryption.md -> decryption.md
Signed-off-by: Brandon Lum <lumjjb@gmail.com>
2020-02-24 20:45:57 +00:00
Brandon Lum
c5209cd679 Updated doc based on changes requested
Signed-off-by: Brandon Lum <lumjjb@gmail.com>
2020-02-24 20:45:57 +00:00
Brandon Lum
ffcef9dc32 Addressed nits
Signed-off-by: Brandon Lum <lumjjb@gmail.com>
2020-02-24 20:45:57 +00:00
Brandon Lum
8df431fc31 Defer multitenant key model to image auth discussion
Signed-off-by: Brandon Lum <lumjjb@gmail.com>
2020-02-24 20:45:57 +00:00
Brandon Lum
c43a7588f6 Refactor encrypted opts and added unit test
Signed-off-by: Brandon Lum <lumjjb@gmail.com>
2020-02-24 20:45:57 +00:00
Brandon Lum
ac8ec18813 bump imgcrypt commit version
Signed-off-by: Brandon Lum <lumjjb@gmail.com>
2020-02-24 20:45:57 +00:00
Brandon Lum
f0579c7b4d Implmented node key model for image encryption
Signed-off-by: Brandon Lum <lumjjb@gmail.com>
2020-02-24 20:45:57 +00: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
Mike Brown
f4b3cdb892
Merge pull request #1399 from mikebrow/pause-image-update
move to v3.2 for the pause image
2020-02-20 10:45:16 -06: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
Akihiro Suda
c23ed3befc
Merge pull request #1402 from thaJeztah/bump_crypto
vendor: golang.org/x/crypto 1d94cc7ab1c630336ab82ccb9c9cda72a875c382
2020-02-20 16:43:27 +09: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
Sebastiaan van Stijn
98ce6c022e
vendor: golang.org/x/crypto 1d94cc7ab1c630336ab82ccb9c9cda72a875c382
full diff: 60c769a6c5...1d94cc7ab1

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-02-19 12:44:01 +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
Derek McGowan
724d0eb859
Merge pull request #4039 from AkihiroSuda/no-zfs
support building with BUILDTAGS="no_zfs no_aufs"
2020-02-18 11:39:38 -08:00
Akihiro Suda
8e685f78cf support building with BUILDTAGS="no_zfs no_aufs"
These plugins do not always need to be built-in.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-02-19 01:52:03 +09:00
Phil Estes
3fe22817ab
Merge pull request #4037 from thaJeztah/update_mailmap
Update mailmap
2020-02-18 09:38:56 -05:00
Sebastiaan van Stijn
61596169bb
Update .mailmap
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-02-18 10:24:08 +01:00