Commit Graph

11307 Commits

Author SHA1 Message Date
Sebastiaan van Stijn
25fada0cc7
Dockerfile.test: skip curl, gcc, git and make install
These are already installed by default in the golang image.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-07-17 14:06:11 +02:00
Sebastiaan van Stijn
546538971c
install-critools: make sure DESTDIR exists
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-07-17 14:00:58 +02:00
Fu Wei
e830c5364c
Merge pull request #5737 from thaJeztah/remove_redundant_check
runtime: runc v2: remove redundant validation
2021-07-15 23:06:45 +08:00
Sebastiaan van Stijn
dbef1d56d7
runtime: runc v2: remove redundant validation
cgroupsv2.LoadManager() already performs VerifyGroupPath(), and returns
an error if the path is invalid, so this check is redundant.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-07-14 23:24:31 +02:00
Phil Estes
34fb8d8967
Merge pull request #5727 from dmcgowan/test-monitor-restart-grace
Add timestamp to flaky restart monitor test
2021-07-13 16:18:57 -04:00
Derek McGowan
18321f539c
Move loop check to before sleep
Signed-off-by: Derek McGowan <derek@mcg.dev>
2021-07-13 12:07:21 -07:00
Derek McGowan
2e8a572dfd
Add timestamp to flaky restart monitor test
Signed-off-by: Derek McGowan <derek@mcg.dev>
2021-07-13 12:07:21 -07:00
Derek McGowan
d527926cd5
Merge pull request #5722 from AkihiroSuda/go1.16.6
Update Go to 1.16.6
2021-07-13 11:48:20 -07:00
Akihiro Suda
55fd2ab5d6
integration/client: go mod tidy
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-07-13 14:36:02 +09:00
Akihiro Suda
e72046f86b
Update Go to 1.16.6
Release notes: https://golang.org/doc/devel/release#go1.16

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-07-13 14:05:37 +09:00
Phil Estes
cbdebd18eb
Merge pull request #4447 from kzys/grpc-error
client: surface a connection error more clearly
2021-07-12 15:12:06 -04:00
Phil Estes
b6aa5a48bd
Merge pull request #5712 from coryb/docker-push-close-body
Fix missing Body.Close() calls on push to docker remote
2021-07-12 14:23:14 -04:00
Derek McGowan
bc4e416c88
Add test for archive breakout test for lchmod
Signed-off-by: Derek McGowan <derek@mcg.dev>
2021-07-12 11:10:45 -07:00
Akihiro Suda
a8ef1fc488
Merge pull request #5710 from fuweid/cri-cleanup
remove pkg/cri/platforms package
2021-07-12 13:23:25 +09:00
coryb
894b6ae39b Fix missing Body.Close() calls on push to docker remote
Discovered this while using HTTP tracing via OpenTelemetry inside of
buildkitd, where the trace spans were not being reported for the
registry PUT http requests.  The spans are only reported on the Close
for the Body, after adding these Close calls, the spans are reported as
expected.

Signed-off-by: coryb <cbennett@netflix.com>
2021-07-11 08:14:57 -07:00
Wei Fu
ac75071b49 remove pkg/cri/platforms package
The package is a duplicate of platforms. No need to maintain
pkg/cri/platforms.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2021-07-10 10:14:27 +08:00
Fu Wei
51f2ce92fc
Merge pull request #5709 from cpuguy83/custom_client
Allow WithServices to use custom implementations
2021-07-10 09:23:07 +08:00
Brian Goff
0a8802df67 Allow WithServices to use custom implementations
Before this change, for several of the services that `WithServices`
handles, only the grpc client is supported.
Now, for instance, one can use an `images.Store` directly instead of
only an `imagesapi.StoreSlient`.

Some of the methods have been renamed to satisfy the difference between
using a grpc `<Foo>Client` vs the main interface.

I did not see a good candidate for TaskService so have left that mostly
unchanged.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2021-07-09 23:30:40 +00:00
Maksym Pavlenko
0dcffc3ee1
Merge pull request #5673 from dcantah/hcsshim-0.8.18
[Vendor] Update hcsshim to 0.8.18
2021-07-09 12:11:03 -07:00
Maksym Pavlenko
d38c186d9d
Merge pull request #5578 from claudiubelu/integration/failed-container
test integration: Adds a test that restarts a failed container
2021-07-09 12:08:20 -07:00
Phil Estes
cf600abecc
Merge pull request #5619 from mikebrow/cri-add-v1-proxy-alpha
[CRI] move up to CRI v1 and support v1alpha in parallel
2021-07-09 14:07:24 -04:00
Derek McGowan
9fa7d15077
Merge pull request #5682 from kzys/gha-fork
gha: make release workflow work in forks
2021-07-09 11:04:00 -07:00
Derek McGowan
31d78444e0
Merge pull request #5666 from wllenyj/plugin_test
Add unit test for plugin
2021-07-09 10:44:32 -07:00
Phil Estes
aefbe7c1cb
Merge pull request #5700 from AkihiroSuda/test-cri-in-userns
Dockerfile.test: add "cri-in-userns" (aka rootless) test stage
2021-07-09 09:25:28 -04:00
Fu Wei
71c1dc6615
Merge pull request #5676 from dmcgowan/update-for-distribution-spec-1.0 2021-07-09 16:14:45 +08:00
Akihiro Suda
aefabe5462
Dockerfile.test: add "cri-in-userns" (aka rootless) test stage
The `cri-in-userns` stage is for testing "CRI-in-UserNS", which should be used in conjunction with "Kubelet-in-UserNS":
https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/2033-kubelet-in-userns-aka-rootless

This feature is mostly expected to be used for `kind` and `minikube`.

Requires Rootless Docker/Podman/nerdctl with cgroup v2 delegation: https://rootlesscontaine.rs/getting-started/common/cgroup2/
(Rootless Docker/Podman/nerdctl prepares the UserNS, so we do not need to create UserNS by ourselves)

Usage:
```
podman build --target cri-in-userns -t cri-in-userns -f contrib/Dockerfile.test .
podman run -it --rm --privileged cri-in-userns
```

The stage is tested on CI with Rootless Podman on Fedora 34 on Vagrant.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-07-09 14:50:04 +09:00
Akihiro Suda
0573e22e37
Merge pull request #5702 from dmcgowan/archive-cleanup-lchmod
archive: cleanup lchmod logic
2021-07-09 10:02:41 +09:00
Derek McGowan
53835221f6
Cleanup lchmod logic in archive
Move to single lchmod interface mirroring other implementations.
Separate logic for freebsd which supports symlink no follow flag.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2021-07-08 13:44:28 -07:00
Mike Brown
d1c1051927 use fu wei's suggeted interface pick for marshaling
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2021-07-07 15:45:45 -05:00
Mike Brown
14962dcbd2 add alpha version
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2021-07-06 11:40:20 -05:00
Kazuyoshi Kato
4c6e4a06ff gha: make release workflow work in forks
Fixes #5098.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2021-07-02 16:16:02 -07:00
Kazuyoshi Kato
73d28ddeb2 client: surface a connection error more clearly
gRPC-Go recently added grpc.WithReturnConnectionError() which improves
the situation of #2576.

Permission errors:

  % ./bin/ctr t ls
  ctr: failed to dial "/run/containerd/containerd.sock": connection error: desc = "transport: error while dialing: dial unix /run/containerd/containerd.sock: connect: permission denied"
  %

Non-existent sockets:

  % ./bin/ctr -a notfound t ls
  ctr: failed to dial "notfound": context deadline exceeded: connection error: desc = "transport: error while dialing: dial unix://notfound: timeout"
  %

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2021-07-02 14:56:04 -07:00
Maksym Pavlenko
7eceeb950b
Merge pull request #5571 from adelina-t/win_set_specific_go_version
Install specific golang version in Windows CI.
2021-07-02 14:54:58 -07:00
Derek McGowan
a7ad6b3be5
Add support for registry host path override
Adds support for mirrors which are non-compliant with the
OCI distribution specification but have previously mirrored
content with a namespace prefix after the API root `/v2`.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2021-07-02 09:48:27 -07:00
wanglei01
3a0b9ec6bb Add unit test for plugin
Signed-off-by: wanglei <wllenyj@linux.alibaba.com>
2021-07-02 18:43:34 +08:00
Derek McGowan
95c708572f
Update documenation for OCI distribution 1.0
Signed-off-by: Derek McGowan <derek@mcg.dev>
2021-07-01 17:24:08 -07:00
Daniel Canter
a81f05f360 [Vendor] Update hcsshim to 0.8.18
0.8.18 contains a fix for shim delete behavior, please see:
microsoft/hcsshim#1041

There's no new vendored files as nothing from hcsshim/cmd/containerd-shim-runhcs-v1
gets imported here but for containerd releases the runhcs shim binary is built from whatever
commit is vendored into containerd.

Signed-off-by: Daniel Canter <dcanter@microsoft.com>
2021-06-30 17:08:40 -07:00
Claudiu Belu
16deba098c integration: Windows volume-copy-up images
For Windows, the container image's OS version must closely match the host's OS version.
For this reason, we need to add the --os-version annotation in image manifest lists,
so the Windows nodes can pull the appropriate image from the list.

Previously, the docker manifest CLI did not have the capability to set the --os-version,
it, but it has been introduced in docker 20.10.0.

We're also adding busybox.exe in the image, so we can run Linux commands inside the
container, so the tests will be simpler.

When building Windows images, a docker buildx builder needs to be created and used. When
building Windows images with docker buildx, the flag --output=type=registry is required,
otherwise it cannot be referenced on a Linux node.

Signed-off-by: Claudiu Belu <cbelu@cloudbasesolutions.com>
2021-06-30 11:19:54 +00:00
zwtop
63fe34add6 grpc config add options tcp_tls_ca
Signed-off-by: zwtop <wang.zhan@smartx.com>
2021-06-30 10:58:32 +08:00
Phil Estes
25d7f907c0
Merge pull request #5660 from BigVan/main
Add ctr command label in NewContainerOpts
2021-06-29 15:03:43 -04:00
Mike Brown
a5c417ac06 move up to CRI v1 and support v1alpha in parallel
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2021-06-28 09:34:12 -05:00
Yifan Yuan
bda7b58666 feat: Add snapshotter label to the new snapshot for container.
add '--snapshotter-labels' in ctr run and ctr c create
which can pass labels to snappshotter on preparing new
snapshot.

Pass command label to snapshotter can help it determine
which kind of writable snapshots should be provide.

For some snapshotter, such as overlaybd:
  ( https://github.com/alibaba/accelerated-container-image ),
it can provide 2 kind of writable snapshot (overlayfs dir or
 blockdevice) by command label values.

Signed-off-by: Yifan Yuan <tuji.yyf@alibaba-inc.com>
2021-06-28 20:08:01 +08:00
Maksym Pavlenko
0bd2a86b1b
Merge pull request #5655 from kzys/dm-log
snapshot/devmapper: log exported methods correctly
2021-06-25 10:06:11 -07:00
Akihiro Suda
e72a56a1e9
Merge pull request #5662 from thaJeztah/fix_destdir
Makefile: fix DESTDIR and PREFIX concatenation
2021-06-25 23:41:16 +09:00
Sebastiaan van Stijn
2019a1e68f
Makefile: fix DESTDIR and PREFIX concatenation
Commits 77374e8 and b5f530a changed handling of the `DESTDIR` and `PREFIX`
variables, and introduced a `MANDIR` variable.

However, in those commits, the variables are concatenated with a directory
separator (`/`); `$DESTDIR/$PREFIX`. The `$PREFIX` variable (and consequently,
the `MANDIR` variable) already should have a leading `/` (absolute path), so
there should be no need to add it. In addition, adding the `/`, would not allow
either an empty path to be passed (well, it would result in `//` in the path),
or for `$PREFIX` to be used with a relative path (with an empty `$PREFIX`).

This patch removes the directory separator.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-06-25 14:12:56 +02:00
Claudiu Belu
04ab4418fd test integration: Adds a test that restarts a failed container
If a container failed to start due to a bad command, the container could not be
recreated with a proper command in its stead. Adds a test that verifies this scenario.

Signed-off-by: Claudiu Belu <cbelu@cloudbasesolutions.com>
2021-06-25 10:33:38 +00:00
Akihiro Suda
e1f28659bc
Merge pull request #5287 from claudiubelu/cri-integration-cleanup
Cri integration cleanup
2021-06-25 12:42:33 +09:00
Kazuyoshi Kato
03ee450060 snapshot/devmapper: log exported methods correctly
- View was somehow logging itself as "prepare"
- Cleanup should have its debug log as like other exported methods

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2021-06-24 16:16:50 -07:00
Fu Wei
c8c6eed932
Merge pull request #5641 from thaJeztah/move_sys_fmountat
move sys.FMountat() into mount package and un-export
2021-06-24 22:16:48 +08:00
Sebastiaan van Stijn
a964cf0cc4
un-export mount.FMountat
It's only used internally, so we can un-export this utility until
it is needed elsewhere.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-06-23 18:14:53 +02:00