Commit Graph

8706 Commits

Author SHA1 Message Date
Maksym Pavlenko
04df60d106
Merge pull request #4858 from samuelkarp/freebsd-native-snapshotter
Support the native snapshotter on FreeBSD
2021-01-11 09:52:56 -08:00
Wei Fu
846cb963cc runtime/v2: should use defer ctx to cleanup
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2021-01-11 23:22:38 +08:00
Phil Estes
75c2646229
Merge pull request #4902 from mxpv/losetup
[Carry] mount: handle loopback mount
2021-01-08 16:18:37 -05:00
Maksym Pavlenko
d7ec6e9e89
Merge pull request #4917 from AkihiroSuda/demote-introspection-log-level
introspection: demote log level
2021-01-08 12:32:11 -08:00
Sebastiaan van Stijn
2374178c9b
pkg/cri/server: optimizations in unmountRecursive()
Use a PrefixFilter() to get only the mounts we're interested in,
which removes the need to manually filter mounts from the mountinfo
results.

Additional optimizations can be made, as:

> ... there's a little known fact that `umount(MNT_DETACH)` is actually
> recursive in Linux, IOW this function can be replaced with
> `unix.Umount(target, unix.MNT_DETACH)` (or `mount.UnmountAll(target, unix.MNT_DETACH)`
>  (provided that target itself is a mount point).

e8fb2c392f (r535450446)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-01-08 17:32:01 +01:00
Sebastiaan van Stijn
7572919201
mount: remove remaining uses of mount.Self()
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-01-08 17:31:59 +01:00
Sebastiaan van Stijn
474abe5723
mount: remove unused mount.PID()
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-01-08 17:31:57 +01:00
Sebastiaan van Stijn
f6a0ec7c0a
mount.CleanupTempMounts() use github.com/moby/sys/mountinfo
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-01-08 17:31:55 +01:00
Sebastiaan van Stijn
43578a9d6e
mount: mount.PID(), mount.Self(): change signature to return pointers
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-01-08 17:31:53 +01:00
Sebastiaan van Stijn
fb464b94d3
mount: replace mountinfo handling with moby/sys/mountinfo
Trying to reduce duplicated effort in maintaining a mountinfo
parser, this patch replaces the local implementation with the
implementation in github.com/moby/sys, which is actively maintained
and contains various optimizations.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-01-08 17:31:50 +01:00
Akihiro Suda
a9cc2a7720
introspection: demote log level
Demote `Info("remote introspection plugin filters")` to `Debug()`

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-01-08 19:24:43 +09:00
Maksym Pavlenko
7c6d710bcf
Merge pull request #4911 from dims/reduce-clutter-of-log-entries-during-process-exec
[CRI] Reduce clutter of log entries during process execution
2021-01-07 15:43:12 -08:00
Maksym Pavlenko
092f9e607a
Merge pull request #4909 from fenggw-fnst/work
Fix typo in comment
2021-01-06 10:26:49 -08:00
Davanum Srinivas
1f5b84f27c
[CRI] Reduce clutter of log entries during process execution
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-01-06 13:09:03 -05:00
Guangwen Feng
3e7bb721d4 Fix typo in comment
Signed-off-by: Guangwen Feng <fenggw-fnst@cn.fujitsu.com>
2021-01-06 17:01:29 +08:00
Akihiro Suda
18ad79d328
Merge pull request #4907 from mxpv/headers
Add copyright header to proto files
2021-01-06 05:32:30 +09:00
Maksym Pavlenko
b236a9337d
Merge pull request #4896 from AkihiroSuda/export-skip-non-distributable
export: add --skip-non-distributable
2021-01-05 11:08:09 -08:00
Maksym Pavlenko
c1b01eabc0 Add copyright header to proto files
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2021-01-05 10:44:07 -08:00
Maksym Pavlenko
eb1649225d Refactor loseup test
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2021-01-05 10:06:02 -08:00
Maksym Pavlenko
5d1955ac26
Merge pull request #4899 from zhsj/cri-install-doc
docs: point cri release tarball to github release page
2021-01-04 14:52:46 -08:00
Maksym Pavlenko
c5fa0298c1 Address loop dev PR comments #4178
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2021-01-04 10:44:29 -08:00
Peng Tao
b7026236f4 snapshot/devmapper: use losetup in mount package
No need to use the private losetup command line wrapper package.
The generic package provides the same functionality.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2021-01-04 10:15:04 -08:00
Peng Tao
9e42070169 mount: handle loopback mount
If a mount has specified `loop` option, we need to handle it on our
own instead of passing it to the kernel. In such case, create a
loopback device, attach the mount source to it, and mount the loopback
device rather than the mount source.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2021-01-04 10:14:55 -08:00
Muhammad Kaisar Arkhan
380b52652c Bring OpenBSD support
Signed-off-by: Muhammad Kaisar Arkhan <hi@yukiisbo.red>
2021-01-04 14:43:48 +01:00
Shengjing Zhu
91dc69ee43 docs: point cri release tarball to github release page
Signed-off-by: Shengjing Zhu <zhsj@debian.org>
2021-01-03 17:50:40 +08:00
Wei Fu
602af6f677
Merge pull request #4895 from AkihiroSuda/remove-redundant-secreport
ISSUE_TEMPLATE: remove redundant "report a security issue" button
2021-01-03 12:21:46 +08:00
Akihiro Suda
e2e2c5737d
export: add --skip-non-distributable
The flag skips adding non-distributable blobs such as Windows layers to archive.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-01-01 06:32:01 +09:00
Akihiro Suda
d50de11ce6
ISSUE_TEMPLATE: remove redundant "report a security issue" button
"report a security issue" button was shown redundantly in https://github.com/containerd/containerd/issues/new/choose

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-01-01 05:23:54 +09:00
Derek McGowan
9067796ce4
Merge pull request #4891 from tianon/generic-arm-vector
Refactor platforms.Only with a "platformVector" helper
2020-12-29 09:49:09 -08:00
Tianon Gravi
9072b09145 Refactor platforms.Only with a "platformVector" helper
This improves the hard-coded list of ARM fallbacks in the `platform.Only` implementation (by doing a descending loop over variant numbers instead, which is all the hard-coded list was doing).

Making this a separate function can then more easily be recursive later for handling an `arm64`->`arm` fallback (or similar), but I think it makes the code a lot more clear too (so we're calculating a vector of platforms separately from building a matcher object).

This also makes a minor adjustment in `TestImagePullWithDistSourceLabel` which had an implicit assumption that `platforms.Only` would only ever result in a single suitable manifest, which isn't strictly true (and is likely failing as-is when run on any 32bit `arm` system that's `v6` or higher, which this fixes 😅).

Signed-off-by: Tianon Gravi <admwiggin@gmail.com>
2020-12-28 14:11:14 -08:00
Phil Estes
7a2720f5e0
Merge pull request #4879 from tianon/platforms-only-test
Add platforms.Only test
2020-12-28 16:20:51 -05:00
Akihiro Suda
9d98f882b9
Merge pull request #4859 from dcantah/update-hcsshim-winio
Update hcsshim and go-winio vendoring
2020-12-28 22:40:11 +09:00
Phil Estes
cf62a557a8
Merge pull request #4882 from AkihiroSuda/issue-question-guide
add guidance about GitHub Discussions
2020-12-24 13:11:45 -05:00
Akihiro Suda
9a7bb7e40a
add guidance about GitHub Discussions
Add `.github/ISSUE_TEMPLATE/config.yml` to clarify where is the right place (in the most cases) to ask questions.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-12-24 18:21:04 +09:00
Tianon Gravi
66a3f2cbc7 Add platforms.Only test
This adds a test for `platforms.Only` (previously untested, as far as I can tell).

Signed-off-by: Tianon Gravi <admwiggin@gmail.com>
2020-12-23 14:54:16 -08:00
Phil Estes
178e9a1012
Merge pull request #4866 from zhsj/doc-fix
Update BUILDING.md after moving to Go modules and various other small docs update
2020-12-23 08:23:24 -05:00
Phil Estes
ac5ca3a41e
Merge pull request #4841 from AdamKorcz/fuzz1
Add two fuzzers to integrate containerd into OSS-fuzz
2020-12-23 08:03:04 -05:00
Samuel Karp
b624486c84
native: support for FreeBSD
Signed-off-by: Samuel Karp <me@samuelkarp.com>
2020-12-22 21:26:04 -08:00
Samuel Karp
d6baafa75f
mount: basic support for FreeBSD
Signed-off-by: Samuel Karp <me@samuelkarp.com>
2020-12-22 21:26:04 -08:00
Shengjing Zhu
5988bfc1ef docs: Various typo found by codespell
Signed-off-by: Shengjing Zhu <zhsj@debian.org>
2020-12-22 13:22:16 +08:00
Shengjing Zhu
b4c604692e docs: Move autocomplete distribution section next to install section
Signed-off-by: Shengjing Zhu <zhsj@debian.org>
2020-12-22 13:22:16 +08:00
Shengjing Zhu
1cc3c7f4a2 docs: Remove appveyor badge
No longer used

Signed-off-by: Shengjing Zhu <zhsj@debian.org>
2020-12-22 13:22:16 +08:00
Shengjing Zhu
454e540330 docs: Tweak installing btrfs dependency on Debian/Ubuntu
Signed-off-by: Shengjing Zhu <zhsj@debian.org>
2020-12-22 13:22:16 +08:00
Shengjing Zhu
13917b03dc docs: Update command in BUILDING after moving to go modules
Signed-off-by: Shengjing Zhu <zhsj@debian.org>
2020-12-22 13:22:16 +08:00
Michael Crosby
dc207b654d
Merge pull request #4860 from masters-of-cats/pr-process-not-found-err
Return GRPC not found error instead of plain one
2020-12-21 10:25:11 -05:00
AdamKorcz
3698bc4ff1 Added 2 fuzzers
Signed-off-by: AdamKorcz <adam@adalogics.com>
2020-12-19 12:59:52 +00:00
Daniel Canter
a551492e99 Update hcsshim and go-winio vendoring
* Update hcsshim to v0.8.14
* Update go-winio to v0.4.16

This brings in some vhd package changes from winio, and the compute storage api bindings for
the shim. This is to facilitate some coming functionality for the windows snapshotter
as well as possibly for future work down the line for the windows differ.

Signed-off-by: Daniel Canter <dcanter@microsoft.com>
2020-12-18 16:56:29 -08:00
Georgi Sabev
7451dd1ed1 Return GRPC not found error instead of plain one
When the shim returns a plain error when a process does not exist,
the server is unable to recognise its GRPC status code and assumes
UnknownError. This is awkward for containerd client users as they are
unable to recognise the actual reason for the error.

When the shim returns a NotFound GRPC error, it is properly translated
by the server and clients receive a proper NotFound error instead of
Unknown

Please note that we (CF Garden) would like to have the eventual fix backported to 1.4 as well.

Co-authored-by: Danail Branekov <danailster@gmail.com>

Signed-off-by: Danail Branekov <danailster@gmail.com>
Signed-off-by: Georgi Sabev <georgethebeatle@gmail.com>
2020-12-18 15:33:48 +02:00
Phil Estes
ce7024558f
Merge pull request #4863 from crosbymichael/log-dir
[cri] ensure log dir is created
2020-12-18 07:06:38 -05:00
Phil Estes
070b698449
Merge pull request #4845 from skaegi/oom_score-max
Add bounds on max oom_score_adj value for AdjustOOMScore
2020-12-17 16:22:46 -05:00