Commit Graph

9685 Commits

Author SHA1 Message Date
Hajime Tazaki
b8f3ebb03b vendor: update moby/sys for darwin support
The mount package of darwin requires to retrive mountinfo to check if
the target of unmount if still mounted or not.  Thus pull the upstreamed
version of moby/sys to support this operation.

Signed-off-by: Hajime Tazaki <thehajime@gmail.com>
2021-10-23 07:48:17 +09:00
Phil Estes
45e0e5a77e
Merge pull request #5926 from claudiubelu/import-add-platform-check
import: Raise error if the imported image is filtered out
2021-09-23 18:01:52 -04:00
Phil Estes
c5e23649df
Merge pull request #6043 from dmcgowan/fix-metadata-content-panic
Fix panic in metadata content writer on copy error
2021-09-23 17:42:11 -04:00
Phil Estes
c23f52af30
Merge pull request #6001 from cpuguy83/trace_exporter_plugin
Move tracing to plugin
2021-09-23 15:10:43 -04:00
Phil Estes
b23ec233a8
Merge pull request #5916 from claudiubelu/windows/image-import
ctr: Fixes Windows image import
2021-09-23 15:09:34 -04:00
Phil Estes
a4fa3a7162
Merge pull request #6017 from thaJeztah/fix_main_nomodules
update open go.opentelemetry.io v1.0.0 to fix import path
2021-09-23 15:07:41 -04:00
Derek McGowan
b9cf0d75a9
Fix panic in metadata content writer on copy error
The `createAndCopy` function is only called when `nw.w` is nil
in order to create a new writer and prepare it. The current code
is attempting to close `nw.w` when there is a copy error. The
correct behavior would be to close the new writer and not touch `nw.w`.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2021-09-23 10:29:52 -07:00
Derek McGowan
d0bedc5bd1
Merge pull request #5979 from TianTianBigWang/fix/err-string-fmt
fix error string format
2021-09-22 15:12:18 -07:00
Sebastiaan van Stijn
483d2e947f
go.mod: update opentelemetry modules to v1.0.0
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-09-22 16:24:17 +02:00
Maksym Pavlenko
483e23bdcd
Merge pull request #6036 from dmcgowan/add-mirror-action
Add github action to mirror image
2021-09-21 16:06:33 -07:00
Derek McGowan
f6c1e7ed8b
Merge pull request #6027 from alakesh/log-fix
add current process state to the error message
2021-09-21 14:35:33 -07:00
Brian Goff
084387e0b4 Move tracing to plugin
This just makes the implementation a little cleaner.
It also makes the trace exporter pluggable.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2021-09-21 21:19:46 +00:00
Phil Estes
6fd80dea34
Merge pull request #5991 from akhramov/freebsd/fix-tar-headers
FreeBSD: fix tar headers & the nil check on getxattr
2021-09-21 16:44:24 -04:00
Alakesh Haloi
16f3d67b5a add current process state to the error message
It will aid debugging if a procees delete fails, to figure out whether
it is paused or running.

Signed-off-by: Alakesh Haloi <alakeshh@amazon.com>
2021-09-21 13:29:57 -07:00
Derek McGowan
407d606941
Add github action to mirror image
Signed-off-by: Derek McGowan <derek@mcg.dev>
2021-09-21 13:23:51 -07:00
Phil Estes
03d1a0fa72
Merge pull request #6035 from kzys/virt-ip
gha: collect VMs' IP addresses
2021-09-21 15:46:27 -04:00
Kazuyoshi Kato
97df73004e gha: collect Vagrant VMs' IP addresses
To investigate #5748, this change collects Vagrant VMs' IP addresses.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2021-09-21 11:40:24 -07:00
Artem Khramov
2bffb5f9b2
FreeBSD: fix tar headers & the nil check on getxattr
On FreeBSD + zfs, stat call seem to return garbage in RDev for regular
files & folders. The value returned is large enough not to fit into
`Devmajor` & `Devminor` fields of the tar header. Fortunately, these
fields are required just for special devices.

This change

* adds a check into `setHeaderForSpecialDevice` that the
  input header represents a special device. If it's not the case, we
  don't set the Devmajor & Devminor fields.

* fixes the nil check on `getxattr`: it never returns nils, but rather
  an empty slice instead

Signed-off-by: Artem Khramov <akhramov@pm.me>
2021-09-21 19:22:41 +03:00
Akihiro Suda
3393970dd7
Merge pull request #6033 from zouyee/continuity
bump continuity and console version  that remove pkg/errors
2021-09-22 00:49:49 +09:00
Akihiro Suda
90c6ff97a8
Merge pull request #5997 from ktock/deduped-ref
import: Add option to prevent duplicated digest image
2021-09-21 23:44:19 +09:00
zounengren
7854e0bffe bump continuity and console version that remove pkg/errors
Signed-off-by: Zou Nengren <zouyee1989@gmail.com>
2021-09-21 21:56:18 +08:00
Fu Wei
2e2956ba2d
Merge pull request #5998 from kaijchen/patch-1 2021-09-21 13:32:26 +08:00
Kaijie Chen
16d3f48a2e ctr namespaces: improve usage string
Signed-off-by: Kaijie Chen <chen@kaijie.org>
2021-09-21 12:26:29 +08:00
Akihiro Suda
ecbd7c6533
Merge pull request #6028 from zouyee/bump
bump console version to v1.0.3 that remove pkg/errors
2021-09-21 13:23:41 +09:00
zounengren
a68fb7addb bump console version to v1.0.3 that remove pkg/errors
Signed-off-by: Zou Nengren <zouyee1989@gmail.com>
2021-09-21 08:39:12 +08:00
Phil Estes
c16be1a5e2
Merge pull request #6032 from dmcgowan/update-integration-test-images 2021-09-20 18:46:24 -04:00
Derek McGowan
3e72e335fe
Use github images for integration tests
Signed-off-by: Derek McGowan <derek@mcg.dev>
2021-09-20 13:35:13 -07:00
Derek McGowan
d72d2794de
Merge pull request #5995 from wssccc/wssccc-patch-2
Fix typo
2021-09-20 11:37:51 -07:00
Fu Wei
7ddf5e52ba
Merge pull request #6012 from estesp/set-image-labels 2021-09-16 14:50:10 +08:00
Fu Wei
7d6e9773ac
Merge pull request #5970 from cpuguy83/cancel_on_signal 2021-09-16 09:26:22 +08:00
Brian Goff
2fecf5b02e Make sure exit signals trigger an exit during init
Some cases can cause the server initialization to block (namely running
a 2nd containerd instance by accident against the same root dir). In
this case there is no way to quit the daemon except with `kill -9`.

This changes context things so that server init is done in a goroutine
and we wait on a channel for it to be ready while we also wait for a
ctx.Done(), which will be cancelled if there is a termination signal.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2021-09-15 22:14:46 +00:00
Phil Estes
f40df3d72b
Enable image config labels in ctr and CRI container creation
Signed-off-by: Phil Estes <estesp@amazon.com>
2021-09-15 15:31:19 -04:00
Phil Estes
d081457ba4
Merge pull request #5974 from claudiubelu/hanging-task-delete-fix
task delete: Closes task IO before waiting
2021-09-15 11:30:23 -04:00
Phil Estes
40c7d1d168
Merge pull request #5985 from AkihiroSuda/crun-1.0
CI: bump up crun to 1.0
2021-09-15 10:24:48 -04:00
Kohei Tokunaga
6875aa5d37 import: Add option to skip creating digest image
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2021-09-15 20:20:57 +09:00
Fu Wei
da6b0efccd
Merge pull request #5982 from AkihiroSuda/clone3 2021-09-15 14:27:47 +08:00
Akihiro Suda
f700ae8732
CI: bump up crun to 1.0
Release notes: https://github.com/containers/crun/releases

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-09-15 14:45:06 +09:00
Akihiro Suda
55923daa9f
seccomp: support "clone3" (return ENOSYS unless SYS_ADMIN is granted)
clone3 is explicitly requested to give ENOSYS instead of the default EPERM, when CAP_SYS_ADMIN is unset.
See moby/moby PR 42681 (thanks to berrange).

Without this commit, rawhide image does not work:
```console
$ sudo ctr run --rm --net-host --seccomp registry.fedoraproject.org/fedora:rawhide foo /usr/bin/curl google.com
curl: (6) getaddrinfo() thread failed to start
```

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-09-15 14:44:45 +09:00
wssccc
8596d11886 Fix typo
Signed-off-by: Ng Yang <wssccc@qq.com>
2021-09-15 03:13:25 +00:00
Akihiro Suda
493220b719
Merge pull request #5990 from estesp/update-go-1.17.1
Update to Go 1.17.1
2021-09-15 03:52:28 +09:00
Phil Estes
73dbbf5bfa
Update to Go 1.17.1
Signed-off-by: Phil Estes <estesp@amazon.com>
2021-09-14 09:12:00 -04:00
Akihiro Suda
cbf9d88c9e
Merge pull request #5987 from wllenyj/ci
CI: Switch to available latest images
2021-09-14 22:10:52 +09:00
Zilong Wang
498e5b27f7 fix error string format
Signed-off-by: zilong.wang <zilong.wang@daocloud.io>
2021-09-14 18:17:27 +08:00
wllenyj
6d961f9673 CI: Switch to available latest images
`mirror.gcr.io/library/busybox:1.32` is unavailable.

```console
$ curl -s https://mirror.gcr.io//v2/library/busybox/tags/list | jq '.tags'
[
      "1.26.2",
      "1.27.2",
      "1.28",
      "1.29",
      "1.29.2",
      "1.29.3",
      "1.30",
      "1.30.1",
      "1.31",
      "1.31.0",
      "1.31.1",
      "1.32.0"
]
```

Signed-off-by: wllenyj <wllenyj@linux.alibaba.com>
2021-09-14 11:59:19 +08:00
Phil Estes
8493cd1a50
Merge pull request #5610 from alakesh/xfs-support-devmapper
add xfs support to devicemapper snapshotter
2021-09-13 15:20:29 -04:00
Claudiu Belu
e087b47e98 import: Raise error if the imported image is filtered out
During import, if an image does not match the host's platform,
it won't have any children labels set, which will result in the
Garbage Collector deleting its content later, resulting in an
unusable image. In this case, we should fail early.

This can still be bypassed by using ctr import --all-platforms.

Signed-off-by: Claudiu Belu <cbelu@cloudbasesolutions.com>
2021-09-13 11:19:48 -07:00
Phil Estes
8cf06feac4
Merge pull request #5956 from claudiubelu/windows/fixes-task-delete-force
Fixes task kill --force on Windows
2021-09-13 10:26:00 -04:00
Fu Wei
e1ad779107
Merge pull request #5817 from dmcgowan/shim-plugins
Add support for shim plugins
2021-09-12 18:18:20 +08:00
Alakesh Haloi
91b64c58b1 add xfs support to devicemapper snapshotter
ext4 file system was supported before. This adds support for xfs as
well. Containerd config file can have fs_type as an additional option
with possible values as "xfs" and "ext4" for now. In future other
fstype support can be added. A snapshot created from a committed
snapshot inherits the file system type of the parent. Any new snapshots
that has no parent is created with the file system type indicated in
config. If there is no config for file system type is found, then
ext4 is assumed. This allows users to use xfs as an optional file system
type.

Signed-off-by: Alakesh Haloi <alakeshh@amazon.com>
2021-09-11 21:43:27 -07:00
Akihiro Suda
3d734d0345
Merge pull request #5976 from ukontainer/pr-continuity
vendor: update continuity for darwin support
2021-09-11 20:32:48 +09:00