Commit Graph

10081 Commits

Author SHA1 Message Date
Adelina Tuvenie
9734b40393 Pin mingw to version 10.2.0
Signed-off-by: Adelina Tuvenie <atuvenie@cloudbasesolutions.com>
2021-10-04 16:44:31 +03:00
Adelina Tuvenie
d19af5afbf Update to golang 1.17.1
Signed-off-by: Adelina Tuvenie <atuvenie@cloudbasesolutions.com>
2021-10-04 16:44:22 +03:00
Adelina Tuvenie
3cb0ec01ec Install nssm
Signed-off-by: Adelina Tuvenie <atuvenie@cloudbasesolutions.com>
2021-10-04 16:44:06 +03:00
Maksym Pavlenko
64291df71b
Merge pull request #6079 from cpuguy83/correct_task_error
task service: return known error type
2021-10-01 15:26:49 -07:00
Derek McGowan
63b7e5771e
Merge pull request #5973 from Juneezee/deprecate-ioutil
refactor: move from io/ioutil to io and os package
2021-10-01 10:52:06 -07:00
Brian Goff
02e77bcdc1 task service: return known error type
Found this error in a docker daemon log classified as an "uknown" error.
Since we know what this is return the correct error type so it can be
handled.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2021-10-01 17:45:51 +00:00
Claudiu Belu
791e175c79 Windows: Fixes Windows containers with image volumes
Currently, there are few issues that preventing containers
with image volumes to properly start on Windows.

- Unlike the Linux implementation, the Container volume mount paths
  were not created if they didn't exist. Those paths are now created.

- while copying the image volume contents to the container volume,
  the layers were not properly deactivated, which means that the
  container can't start since those layers are still open. The layers
  are now properly deactivated, allowing the container to start.

- even if the above issue didn't exist, the Windows implementation of
  mount/Mount.Mount deactivates the layers, which wouldn't allow us
  to copy files from them. The layers are now deactivated after we've
  copied the necessary files from them.

- the target argument of the Windows implementation of mount/Mount.Mount
  was unused, which means that folder was always empty. We're now
  symlinking the Layer Mount Path into the target folder.

- hcsshim needs its Container Mount Paths to be properly formated, to be
  prefixed by C:. This was an issue for Volumes defined with Linux-like
  paths (e.g.: /test_dir). filepath.Abs solves this issue.

Signed-off-by: Claudiu Belu <cbelu@cloudbasesolutions.com>
2021-10-01 09:02:18 +00:00
Akihiro Suda
fbdcddedc0
Merge pull request #6076 from jonyhy96/cleanup-import
cleanup: import from k8s.io/utils/clock instead
2021-10-01 14:18:34 +09:00
Phil Estes
c76c9f2ccf
Merge pull request #6069 from jonyhy96/feat-grpc-options
feat: enable integration cri remote client to call with grpc calloptions
2021-09-30 15:49:50 -07:00
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