Commit Graph

10422 Commits

Author SHA1 Message Date
haoyun
049042382c fix: update vendor
Signed-off-by: haoyun <yun.hao@daocloud.io>
2021-09-30 23:49:46 +08:00
haoyun
5c2426a7b2 cleanup: import from k8s.io/utils/clock/testing instead
Signed-off-by: haoyun <yun.hao@daocloud.io>
2021-09-30 23:34:56 +08:00
haoyun
6484fab1e0 cleanup: import from k8s.io/utils/clock instead
Signed-off-by: haoyun <yun.hao@daocloud.io>
2021-09-30 23:27:20 +08:00
haoyun
d16942cf16 feat: enable cri remote client to call with grpc calloptions
Signed-off-by: haoyun <yun.hao@daocloud.io>
2021-09-30 23:02:53 +08:00
Derek McGowan
a06a0990ec
Merge pull request #6074 from mikebrow/cleanup
cleanup k8s ansible yaml (carry for #5713)
2021-09-29 13:40:31 -07:00
Claudiu Belu
ca35f4e820 Windows: Cleanup rm- prefixed layers
Some layers might be prefixed with rm-, which will result
in an error when converting that string into an integer.

Signed-off-by: Claudiu Belu <cbelu@cloudbasesolutions.com>
2021-09-29 12:46:35 -07:00
jayonlau
f6b7e07fd3 cleanup k8s ansible yaml (carry for https://github.com/jayonlau <jayonlau@gmail.com>)
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2021-09-29 14:25:32 -05:00
Derek McGowan
f90ebaf1ce
Merge pull request #6070 from jonyhy96/feat-import-platform
feat: support import image for specific platform
2021-09-29 11:49:03 -07:00
Mike Brown
96fda588b9
Merge pull request #6065 from dmcgowan/mirror-action-custom-tag
Update mirror images to take target image name
2021-09-29 10:21:59 -05:00
jonyhy
933ddaa6f8 fix: wrong flag type
Signed-off-by: jonyhy <yun.hao@daocloud.io>
2021-09-29 16:22:51 +08:00
jonyhy
da16d492cd feat: support import image for specific platform
Signed-off-by: jonyhy <yun.hao@daocloud.io>
2021-09-29 14:00:17 +08:00
Derek McGowan
d132691f10
Merge pull request #6059 from jonyhy96/feat-cmd-flag
fix: make exec-id flag required in exec command
2021-09-28 19:15:54 -07:00
Derek McGowan
67b8831461
Update mirror images to take target image name
Allow overwriting the target tag to support mirror images from multiple
sources under our single namespace.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2021-09-28 14:08:46 -07:00
jonyhy
e6ddffc2af fix: make exec-id flag required in exec command
Signed-off-by: jonyhy <yun.hao@daocloud.io>
2021-09-28 18:19:32 +08:00
Maksym Pavlenko
0f27a423ef
Merge pull request #6052 from ktock/uncompress-compression-pkg
images: enable converter to uncompress zstd
2021-09-27 22:16:09 -07:00
Derek McGowan
6416cc35c1
Merge pull request #5922 from zouyee/replace
replace deprecated function with Domain and Path
2021-09-27 10:14:57 -07:00
Kohei Tokunaga
09c9270fee images: enable converter to uncompress zstd
Currently uncompress converter only supports gzip. This commit fixes it to
support zstd as well.

Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2021-09-27 11:08:44 +09:00
Phil Estes
5162238c7d
Merge pull request #5853 from claudiubelu/integration/windows-hostprocess
integration: Adds Windows HostProcess tests
2021-09-26 20:35:00 -04:00
zounengren
694a007543 replace deprecated function
Signed-off-by: Zou Nengren <zouyee1989@gmail.com>
2021-09-27 04:29:46 +08:00
Fu Wei
f40df655cd
Merge pull request #6047 from ktock/fix-build-main 2021-09-26 23:12:36 +08:00
Claudiu Belu
2bc77b8a28 Adds Windows resource limits support
This will allow running Windows Containers to have their resource
limits updated through containerd. The CPU resource limits support
has been added for Windows Server 20H2 and newer, on older versions
hcsshim will raise an Unimplemented error.

Signed-off-by: Claudiu Belu <cbelu@cloudbasesolutions.com>
2021-09-25 13:20:55 -07:00
Kohei Tokunaga
2244540628 Fix main branch build is broken
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2021-09-25 11:48:14 +09:00
Derek McGowan
22beecb7d9
Merge pull request #6003 from cpuguy83/add_otel_log_hook
Add open telemetry logging hook for logrus
2021-09-24 17:21:46 -07:00
Derek McGowan
efc90baf58
Merge pull request #6023 from dcantah/fix-lcow-withusername
Change `oci.WithUser` behavior for LCOW
2021-09-24 17:15:11 -07:00
Derek McGowan
7c621e1fcc
btrfs: reduce permissions on plugin directories
Disallow traversal into directories that may contain
unpacked or mounted image filesystems.

Signed-off-by: Derek McGowan <derek@mcg.dev>
Signed-off-by: Samuel Karp <skarp@amazon.com>
2021-09-24 11:57:58 -07:00
Phil Estes
4921fb6b63
Merge pull request #5946 from zouyee/errors
switch usage directly to errdefs.(ErrAlreadyExists and ErrNotFound)
2021-09-24 11:45:57 -04:00
zounengren
fcffe0c83a switch usage directly to errdefs.(ErrAlreadyExists and ErrNotFound)
Signed-off-by: Zou Nengren <zouyee1989@gmail.com>
2021-09-24 18:26:58 +08: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
Samuel Karp
6886c6a2ec
v1 runtime: reduce permissions for bundle dir
Bundle directory permissions should be 0700 by default.  On Linux with
user namespaces enabled, the remapped root also needs access to the
bundle directory.  In this case, the bundle directory is modified to
0710 and group ownership is changed to the remapped root group.

Port of the same change for the v2 runtime

Signed-off-by: Samuel Karp <skarp@amazon.com>
2021-09-22 16:13:10 -07:00
Samuel Karp
7d56b24f1a
v2 runtime: reduce permissions for bundle dir
Bundle directory permissions should be 0700 by default.  On Linux with
user namespaces enabled, the remapped root also needs access to the
bundle directory.  In this case, the bundle directory is modified to
0710 and group ownership is changed to the remapped root group.

Signed-off-by: Samuel Karp <skarp@amazon.com>
2021-09-22 16:13:09 -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
Claudiu Belu
7a7a9a282c integration: Adds test for multilayer image import
This test will make sure there aren't any issues with multilayered
images during import. Keep in mind that in the case of multilayered
images, they have to be unpacked first in order to be usable.

Signed-off-by: Claudiu Belu <cbelu@cloudbasesolutions.com>
2021-09-22 10:03:16 -07:00
Wei Fu
f7658e37d9 runtime: should fail fast if dial error on shim
In linux platform, the shim server always listens on the socket before
the containerd task manager dial it. It is unlikely that containerd task
manager should handle reconnect because the shim can't restart. For this
case, the containerd task manager should fail fast if there is ENOENT or
ECONNREFUSED error.

And if the socket file is deleted during cleanup the exited task, it
maybe cause that containerd task manager takes long time to reload the
dead shim. For that task.v2 manager, the race case is like:

```
TaskService.Delete
  TaskManager.Delete(runtime/v2/manager.go)
    shim.delete(runtime/v2/shim.go)
      shimv2api.Shutdown(runtime/v2/task/shim.pb.go)

      <- containerd has been killed or restarted somehow

      bundle.Delete
```

The shimv2api.Shutdown will cause that the shim deletes socket file
(containerd-shim-runc-v2 does). But the bundle is still there. During
reloading, the containerd will wait for the socket file appears again
in 100 seconds. It is not reasonable. The Reconnect should prevent this
case by fast fail.

Closes: #5648.
Fixes: #5597.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2021-09-23 00:00:28 +08: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
Brian Goff
45c3453a7c Add open telemetry logging hook for logrus
This adds valuable logging data to the open telemetry traces.

When the trace is not recording we don't bother doing anything as it is
relatively expensive to convert logrus data to otel just due to the
nature of how logrus works.

The way this works is that we now set a context on the logrus.Entry that
gets passed around which the hook then uses to determine if there is an
active span to forward the logs to.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2021-09-21 21:19:28 +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