Commit Graph

9017 Commits

Author SHA1 Message Date
Paul "TBBle" Hampson
785ac3ab71 Ensure request.header is never nil
Header.Clone() will return `nil` if called on a nil object.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2021-01-13 05:46:50 +11:00
Mike Brown
550b4949cb
Merge pull request #4700 from mikebrow/cri-security-profile-update
CRI security profile update for CRI graduation
2021-01-12 12:21:56 -06:00
Phil Estes
3b6a386803
Merge pull request #4528 from tianon/platforms-compare
Add amd64->386 fallback
2021-01-12 11:38:36 -05:00
Phil Estes
e62d03b61a
Merge pull request #4578 from thaJeztah/use_moby_sys
mount: replace mountinfo handling with moby/sys/mountinfo
2021-01-12 11:33:28 -05:00
Phil Estes
9db6aa625d
Merge pull request #4302 from songjiayang/update-docker-resolver
Refactor dockerResolver with resolveDockerBase helper
2021-01-12 11:15:06 -05:00
Liu Hua
86277395cf signal: do not print message when dealing with SIG_PIPE
If we print message when SIG_PIPE occuers in signal handler.
There is a loop {print->SIG_PIPE->print->SIG_PIPE...}, which consume
a lot of cpu time. So do not print message in this situaiton.

Signed-off-by: Liu Hua <weldonliu@tencent.com>
2021-01-12 12:34:53 +08:00
Maksym Pavlenko
a4f4a43110
Merge pull request #4916 from stefanberger/streamproc_env_vars
Allow passing environent variables to StreamProcessors
2021-01-11 16:34:12 -08:00
Tianon Gravi
5fa5f15de5 Add amd64->386 fallback
Signed-off-by: Tianon Gravi <admwiggin@gmail.com>
2021-01-11 16:18:19 -08:00
Derek McGowan
6bf5650450
Merge pull request #4923 from fuweid/fix-wrong-context
runtime/v2: should use defer ctx to cleanup
2021-01-11 15:34:47 -08:00
Stefan Berger
1917ca5f79 Allow passing environent variables to StreamProcessors
Add support for an 'env' field to the StreamProcessor configuration
and append the environment variables found there to the os.Environ()
array.
The env field takes environment variables in the form of key=value.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2021-01-11 13:15:12 -05:00
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
weixian.cxy
d649174037 standard makefile,fix not work no macos
Signed-off-by: timchenxiaoyu <837829664@qq.com>
2021-01-04 09:37:56 +08: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