Commit Graph

8778 Commits

Author SHA1 Message Date
songjiayang
5867c88832 Refactor dockerResolver to make code simple
1.add resolveDockerBase helper
2.dockerBase header copy with header.Clone()

Signed-off-by: songjiayang <songjiayang@jd.com>
2020-09-14 11:38:05 +08:00
Wei Fu
a536d06cba
Merge pull request #1573 from mikebrow/update-cni-config
update cni config version
2020-09-12 11:32:20 +08:00
Phil Estes
bb6590da80
Merge pull request #4559 from bsdnet/master
Refractor the script to work in both python2 and python3
2020-09-11 22:39:01 -04:00
Derek McGowan
9efd738181
Merge pull request #4546 from cpuguy83/consume_shim_log
Always consume shim logs
2020-09-11 14:37:05 -07:00
Roy Yang
9e094abd08 Refractor the script to work in both python2 and python3
Signed-off-by: Roy Yang <royyang@google.com>
2020-09-11 13:53:33 -07:00
Mike Brown
53cdd2e0c3 update cni config version
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2020-09-11 14:36:42 -05:00
Sebastiaan van Stijn
d1c8d98658
update to golang 1.15.2
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-09-11 09:21:25 +02:00
Akshat Kumar
61da6986c0 Cleanup open pipes if logging binary fails to start
Signed-off-by: Akshat Kumar <kshtku@amazon.com>
2020-09-10 20:06:51 -07:00
Mike Brown
14c861cf33
Merge pull request #1571 from kinvolk/mauricio/update-slack-link
README: Update slack reference to CNCF
2020-09-10 13:55:42 -05:00
Brian Goff
dab7bd0c45 Always consume shim logs
These fifos fill up if unconsumed, so always consume them.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2020-09-10 10:23:29 -07:00
Phil Estes
bc4c381399
Merge pull request #4550 from thaJeztah/bump_cgroups
vendor: containerd/cgroups 0b889c03f102012f1d93a97ddd3ef71cd6f4f510
2020-09-10 10:46:50 -04:00
Phil Estes
5d7aa0cb65
Merge pull request #4549 from ukontainer/fix-missing-sha256
fix `make test` failure of missing sha256 package
2020-09-10 10:46:10 -04:00
Akihiro Suda
c862000ab9
Merge pull request #4548 from darfux/ret_error_if_metric_fails
ctr: Return error if task.Metrics fails
2020-09-10 20:00:33 +09:00
Sebastiaan van Stijn
d44673eb28
vendor: containerd/cgroups 0b889c03f102012f1d93a97ddd3ef71cd6f4f510
full diff: 318312a373...0b889c03f1

Relevant changes:

- v1/stats: add all fields of memory.oom_control
- memory: remove wrong memory.kmem.limit_in_bytes check

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-09-10 12:33:43 +02:00
Hajime Tazaki
f4741fb8c5 fix make test failure of missing sha256 package
Fixes: c50ff694 ("refactor(native): separate init from implementation")

Signed-off-by: Hajime Tazaki <thehajime@gmail.com>
2020-09-10 18:50:49 +09:00
Li Yuxuan
bdb5b2ce47 ctr: Return error if task.Metrics fails
Signed-off-by: Li Yuxuan <liyuxuan04@baidu.com>
2020-09-10 16:42:35 +08:00
Mauricio Vásquez
a07a37558d README: Update slack reference to CNCF
Signed-off-by: Mauricio Vásquez <mauricio@kinvolk.io>
2020-09-09 17:55:27 -05:00
Yohei Ueda
b582da4438
Set masked and readonly paths based on default Unix spec
The default values of masked and readonly paths are defined
in populateDefaultUnixSpec, and are used when a sandbox is
created.  It is not, however, used for new containers.  If
a container definition does not contain a security context
specifying masked/readonly paths, a container created from
it does not have masked and readonly paths.

This patch applies the default values to masked and
readonly paths of a new container, when any specific values
are not specified.

Fixes #1569

Signed-off-by: Yohei Ueda <yohei@jp.ibm.com>
2020-09-09 23:13:05 +09:00
Jakob
ab5d93187c cr: fix checkpoint from image getting skipped
Fix restoring from a checkpoint image always getting skipped when no checkpoint image path is set. As one restores either from an image OR a path, this makes no sense.

Signed-off-by: Jakob Schrettenbrunner <dev@schrej.net>
2020-09-08 16:44:03 +00:00
Phil Estes
d43d546a8d
Merge pull request #4540 from pbxqdown/master
Fix ctr command typo.
2020-09-08 08:31:01 -04:00
Qian Xiao
469b637358 Fix ctr command typo.
Signed-off-by: Qian Xiao <heyheyco@gmail.com>
2020-09-07 15:50:52 -07:00
Wei Fu
fabebe5d55
Merge pull request #4530 from tianon/rpi-armv6
Add RPi1/RPi0 workaround
2020-09-06 11:49:13 +08:00
Wei Fu
7ce23867e3
Merge pull request #4532 from cpuguy83/forward_signal_not_found
Fix some signal forwarder issues
2020-09-06 11:41:51 +08:00
Brian Goff
899b4e3cb5 Ignore SIGURG signals in signal forwarder
Starting with go1.14, the go runtime hijacks SIGURG but with no way to
not send to other signal handlers.

In practice, we get this signal frequently.
I found this while testing out go1.15 with ctr and multiple execs with
only `echo hello`. When the process exits quickly, if the previous
commit is not applied, you end up with an error message that it couldn't
forward SIGURG to the container (due to the process being gone).

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2020-09-04 16:19:31 -07:00
Brian Goff
6650510836 Exit signal forward if process not found
Previously the signal loop can end up racing with the process exiting.
Intead of logging and continuing the loop, exit early.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2020-09-04 16:17:00 -07:00
Tianon Gravi
2055e12953 Add RPi1/RPi0 workaround
On the very popular Raspberry Pi 1 and Zero devices, the CPU is actually ARMv6, but the chip happens to support the feature bit the kernel uses to differentiate v6/v7, so it gets reported as "CPU architecture: 7" and thus fails to run many of the images that get pulled.

To account for this very popular edge case, this also checks "model name" which on these chips will begin with "ARMv6-compatible" -- we could also check uname, but getCPUInfo is already handy, low overhead, and mirrors the code before this.

Signed-off-by: Tianon Gravi <admwiggin@gmail.com>
2020-09-04 14:19:37 -07:00
Derek McGowan
d4e78200d6
Merge pull request #4518 from knight42/feat/btrfs-config-root-path
feat(snapshot::btrfs): config root_path
2020-09-03 11:12:27 -07:00
Derek McGowan
445e26fff4
Merge pull request #4517 from knight42/feat/native-config-root-path
feat(snapshot::native): config root_path
2020-09-03 11:10:37 -07:00
Phil Estes
a5c6381558
Merge pull request #4523 from errordeveloper/master
Log unexpected responses
2020-09-03 11:00:55 -04:00
Ilya Dmitrichenko
2de55060ee
Log unexpected responses
This accomplishes a few long-standing TODO items, but also helps users
in showing exact registry error messages

Signed-off-by: Ilya Dmitrichenko <errordeveloper@gmail.com>
2020-09-03 14:52:11 +01:00
Phil Estes
43394312cb
Merge pull request #4525 from shishir-a412ed/seccomp
ctr: CLI Flag (seccomp-profile) for setting custom seccomp profile.
2020-09-03 09:14:30 -04:00
Jian Zeng
c50ff694f0
refactor(native): separate init from implementation
Part of #4513

Signed-off-by: Jian Zeng <anonymousknight96@gmail.com>
2020-09-03 19:58:31 +08:00
Jian Zeng
98b0b2a7c6
feat: make native root_path configurable
Part of #4514

Signed-off-by: Jian Zeng <anonymousknight96@gmail.com>
2020-09-03 19:58:05 +08:00
Jian Zeng
a52daa26ae
refactor(btrfs): separate init from implementation
Part of #4513

Signed-off-by: Jian Zeng <anonymousknight96@gmail.com>
2020-09-03 19:54:18 +08:00
Jian Zeng
4154235735
feat: make btrfs root_path configurable
Part of #4514

Signed-off-by: Jian Zeng <anonymousknight96@gmail.com>
2020-09-03 19:52:13 +08:00
Shishir Mahajan
1eae524df6 ctr: CLI Flag (seccomp-profile) for setting custom seccomp profile.
Signed-off-by: Shishir Mahajan <smahajan@roblox.com>
2020-09-02 16:13:11 -07:00
Derek McGowan
cbb4e43763
Merge pull request #4524 from crosbymichael/cri-kata
update cri to 35e623e6bf
2020-09-02 11:27:54 -07:00
Michael Crosby
a2b4745f7d update cri to 35e623e6bf
This includes changes for kata or other kvm based runtimes with selinux support.

Signed-off-by: Michael Crosby <michael@thepasture.io>
2020-09-02 09:46:35 -05:00
Michael Crosby
d2f2733e00
Merge pull request #4508 from mikebrow/readme-update-slack
add help wanted, update slack
2020-09-02 10:18:54 -04:00
Michael Crosby
dedf423b9c
Merge pull request #4519 from cpuguy83/shim_exec_p_debug
shimv1: downgrade poroccess missing log to debug
2020-09-02 10:17:21 -04:00
Derek McGowan
35e623e6bf
Merge pull request #1561 from crosbymichael/kata-se
Handle KVM based runtimes with selinux
2020-09-01 13:12:11 -07:00
Brian Goff
5f9d15eaac shimv1: downgrade poroccess missing log to debug
This `Info` log shows up for all exec processes that use the v1 shim
with Docker because Docker deletes the process once it receives the exit
event from containerd.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2020-09-01 10:31:41 -07:00
Mike Brown
6f4fe8245f add help wanted, update slack
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2020-08-31 12:41:28 -05:00
Phil Estes
efa0e80913
Merge pull request #4506 from dmcgowan/refactor-overlay-plugin
Separate overlay implementation from plugin
2020-08-27 08:48:58 -04:00
Derek McGowan
70ffb12c1b
Separate overlay implementation from plugin
Put the overlay plugin in a separate package to allow the overlay package to be
used without needing to import and initialize the plugin.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2020-08-26 18:50:51 -07:00
Michael Crosby
d715d00906 Handle KVM based runtimes with selinux
Signed-off-by: Michael Crosby <michael@thepasture.io>
2020-08-26 21:38:03 -04:00
Derek McGowan
1a89feb5d7
Merge pull request #4505 from ashrayjain/aj/configurable-root
Add configurable overlayfs path
2020-08-26 18:31:16 -07:00
Akshat Kumar
4cc99e57a7 Remove unnecessary logging binary helpers and add godoc
Signed-off-by: Akshat Kumar <kshtku@amazon.com>
2020-08-26 09:15:02 -07:00
Ashray Jain
5ed177a2da Add configurable overlayfs path
This allows configuring the location of the overlayfs snapshotter by
adding the following in config.toml
```
[plugins]
  [plugins.overlayfs]
    root_path = "/custom_location"
```

This is useful to isolate disk i/o for overlayfs from the rest of
containerd and prevent containers saturating disk i/o from negatively
affecting containerd operations and cause timeouts.

Signed-off-by: Ashray Jain <ashrayj@palantir.com>
2020-08-26 16:08:10 +01:00
Akshat Kumar
7a9fbec5fb Add logging binary support when terminal is true
Currently the shims only support starting the logging binary process if the
io.Creator Config does not specify Terminal: true. This means that the program
using containerd will only be able to specify FIFO io when Terminal: true,
rather than allowing the shim to fork the logging binary process. Hence,
containerd consumers face an inconsistent behavior regarding logging binary
management depending on the Terminal option.

Allowing the shim to fork the logging binary process will introduce consistency
between the running container and the logging process. Otherwise, the logging
process may die if its parent process dies whereas the container will keep
running, resulting in the loss of container logs.

Signed-off-by: Akshat Kumar <kshtku@amazon.com>
2020-08-25 17:28:29 -07:00