Commit Graph

13124 Commits

Author SHA1 Message Date
Laura Brehm
2ead895094
Support gzip and zstd HTTP transport compression to fetch remote resources
Co-authored-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2023-11-30 13:51:33 +00:00
Akihiro Suda
8e567aa581
mv pkg/process cmd/containerd-shim-runc-v2/process
The package is quite specific to runc and only imported by
containerd-shim-runc-v2

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-11-30 21:50:04 +09:00
Derek McGowan
58af8cda54
Merge pull request #9422 from fuweid/upgrade-exec
integration: add new binary upgrade case
2023-11-29 22:37:51 +00:00
Derek McGowan
066ab793f2
Merge pull request #9428 from yibozhuang/containerd-stress-cri-endpoint
containerd-stress: use config address for CRI test
2023-11-28 22:01:55 +00:00
Kohei Tokunaga
a813097dcc
Bump up github.com/fsnotify/fsnotify to v1.7.0
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2023-11-28 17:07:23 +09:00
Yibo Zhuang
c384e37177 containerd-stress: use config address for CRI test
This change removes the hard-coded containerd endpoint
for CRI test and use the address in the config which would
honor the CLI flag.

Signed-off-by: Yibo Zhuang <yibzhuang@gmail.com>
2023-11-27 17:51:02 -08:00
Wei Fu
d4c828c2ca integration: add new binary upgrade case
Add Exec-to-Existing-Running-Container case.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-11-26 22:38:02 +08:00
Samuel Karp
787943dc10
Merge pull request #9412 from profnandaa/fix/dialer_function_windows
pkg/dialer: minor fix on dialer function for windows
2023-11-23 00:38:51 +00:00
Anthony Nandaa
8e91edb71e fix(pkg/dialer): minor fix on dialer function for windows
This commit fixes the dialer function to make sure that
"npipe://" prefix is trimmed, just like the way it is done
in the Unix counterpart, `./dialer_unix.go:50`

This will also unblock some downstream work going on in
buildkit; setting up integration tests to run on Windows.

Signed-off-by: Anthony Nandaa <profnandaa@gmail.com>
2023-11-22 04:25:11 -08:00
Shuaiyi Zhang
ad3f8c563b tomlext.Duration add MarshalText method
Signed-off-by: Shuaiyi Zhang <zhang_syi@qq.com>
2023-11-22 19:28:46 +08:00
Samuel Karp
6ed8f01aa1
Merge pull request #9384 from rokkiter/fix-ticker-leak
fix ticker leak
2023-11-22 05:41:57 +00:00
Derek McGowan
d682b16f9c
Merge pull request #9280 from vvoland/push-inherit-distribution-source
push: always inherit distribution sources from parent
2023-11-22 05:31:35 +00:00
Akihiro Suda
ab63218858
Merge pull request #9407 from ktock/golangci-lint-1.55.2
Bump up golangci-lint to v1.55.2 and tiny fix on .golangci.yml
2023-11-22 04:12:03 +00:00
Kohei Tokunaga
6da015284c
go.mod: github.com/containerd/continuity v0.4.3
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2023-11-22 12:26:35 +09:00
Kohei Tokunaga
cd348e6ef9
.golangci.yml: remove directories that don't exist
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2023-11-22 00:14:35 +09:00
Kohei Tokunaga
4b556a6e01
Bump up golangci-lint to v1.55.2
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2023-11-22 00:13:57 +09:00
Samuel Karp
f12e84b5c5
Merge pull request #9369 from fuweid/fix-pull-progress
fix: ImagePull should close http connection if there is no available data to read.
2023-11-20 19:02:21 +00:00
Paweł Gronowski
c51d4f9b69
push: always inherit distribution sources from parent
Propagate parent distribution source labels to each of its children even
if they're not missing. This allows to cross-repo mount blobs when the
child content has different distribution source label from its
parent manifest/index. This could happen when different parts of image
were fetched from different sources.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2023-11-20 15:06:16 +01:00
Maksym Pavlenko
e15c246550 Move CRI image service into a separate plugin
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
Signed-off-by: Abel Feng <fshb1988@gmail.com>
2023-11-20 09:41:27 +08:00
Wei Fu
80dd779deb remotes/docker: close connection if no more data
Close connection if no more data. It's to fix false alert filed by image
pull progress.

```
dst = OpenWriter (--> Content Store)

src = Fetch
        Open (--> Registry)
        Mark it as active request

Copy(dst, src) (--> Keep updating total received bytes)

   ^
   |  (Active Request > 0, but total received bytes won't be updated)
   v

defer src.Close()
content.Commit(dst)
```

Before migrating to transfer service, CRI plugin doesn't limit global
concurrent downloads for ImagePulls. Each ImagePull requests have 3 concurrent
goroutines to download blob and 1 goroutine to unpack blob. Like ext4
filesystem [1][1], the fsync from content.Commit may sync unrelated dirty pages
into disk. The host is running under IO pressure, and then the content.Commit
will take long time and block other goroutines. If httpreadseeker
doesn't close the connection after io.EOF, this connection will be
considered as active. The pull progress reporter reports there is no
bytes transfered and cancels the ImagePull.

The original 1-minute timeout[2][2] is from kubelet settting. Since CRI-plugin
can't limit the total concurrent downloads, this patch is to update 1-minute
to 5-minutes to prevent from unexpected cancel.

[1]: https://lwn.net/Articles/842385/
[2]: https://github.com/kubernetes/kubernetes/blob/release-1.23/pkg/kubelet/config/flags.go#L45-L48

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-11-18 10:23:05 +08:00
Wei Fu
7f410ae05a integration: reproduce #9347
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-11-18 10:23:05 +08:00
Wei Fu
2e9686c054 fix: deflake TestCRIImagePullTimeout/HoldingContentOpenWriter
The new active request is filed and there is no bytes read yet when the
progress reporter just wakes up. If the timeout / 2 is less than the
minPullProgressReportInternal, it's easy to file false alert.

We should remove the minPullProgressReportInternal limit.

Fixes: #8024

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-11-18 10:23:05 +08:00
Samuel Karp
349c8d12c8
Merge pull request #9393 from AkihiroSuda/ci-fedora39
CI: update Fedora to 39
2023-11-17 21:24:47 +00:00
Akihiro Suda
4aa932337c
CI: update Fedora to 39
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-11-18 05:28:09 +09:00
Derek McGowan
01f3937248
Merge pull request #9392 from fuweid/fix-ci
fix: podsandbox depends on Lease plugin
2023-11-17 18:00:01 +00:00
Wei Fu
f6c4de6b53 fix: podsandbox depends on Lease plugin
introduced by 09723a6175

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-11-17 23:29:04 +08:00
rokkiter
1b65fe2646 fix ticker leak
Signed-off-by: rokkiter <yongen.pan@daocloud.io>
2023-11-17 10:21:57 +08:00
Phil Estes
7ea66e3af7
Merge pull request #9376 from austinvazquez/update-getting-started-for-v2
Update documentation for containerd v2.0 packages
2023-11-16 23:46:46 +00:00
Fu Wei
09723a6175
Merge pull request #9275 from abel-von/sandbox-plugin-1019
sandbox: podsandbox controller init its own client
2023-11-16 10:01:02 +00:00
Samuel Karp
1a54a217ca
Merge pull request #9338 from Iceber/update_pinned_label
cri: fix update of pinned label for images
2023-11-16 05:54:55 +00:00
Austin Vazquez
1af0cba1a8 Update documentation for containerd v2.0 packages
Signed-off-by: Austin Vazquez <macedonv@amazon.com>
2023-11-16 00:40:21 +00:00
Maksym Pavlenko
5664c9a61a
Merge pull request #9368 from thaJeztah/shim_logs
services/server, runtime/v2/shim: use structured log for plugin ID
2023-11-15 23:21:26 +00:00
Maksym Pavlenko
860d525f3f
Merge pull request #9372 from austinvazquez/enhance-unpack-logs
Enhance container image unpack client logs
2023-11-15 23:20:23 +00:00
Samuel Karp
56f5864074
Merge pull request #9373 from akhilerm/remove-adopter-eliot
adopters.md: remove Eliot project
2023-11-15 23:08:09 +00:00
Derek McGowan
4ef1bafd6f
Merge pull request #9364 from mxpv/runc
Move runc shim implementation to cmd
2023-11-15 21:23:52 +00:00
Akhil Mohan
4f42da4161
adopters.md: remove Eliot project
remove Eliot project as it is inactive now.

Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
2023-11-16 00:22:11 +05:30
Austin Vazquez
01c442147f Enhance container image unpack client logs
Adds debug message per layer unpacking and adds duration field to
the existing image unpacking debug message.

Signed-off-by: Austin Vazquez <macedonv@amazon.com>
2023-11-15 17:30:53 +00:00
Derek McGowan
134dc8782b
Merge pull request #9256 from milas/otel-1.19
vendor: upgrade OpenTelemetry to v1.19.0 / v0.45.0
2023-11-15 17:02:06 +00:00
Milas Bowman
e7390d4edc vendor: upgrade OpenTelemetry to v1.19.0 / v0.45.0
Upgrade OpenTelemetry core libs to v1.19.0 and contrib (for gRPC
tracing) to v0.45.0.

The OpenTelemetry internal module structure/dependency graph is
rather complex, and recently some parts (e.g. metrics) have
graduated to "stable" from "unstable", so this upgrade is important
to unblock downstream projects to be able to use newer versions of
the OpenTelemetry libraries, as they can cause compatibility issues
due to internal/peer dependency changes otherwise.

Hopefully, future updates won't be as problematic, such that projects
using containerd as a dependency will be able to use newer versions
of the libraries in a compatible fashion.

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2023-11-15 09:24:36 -05:00
Sebastiaan van Stijn
1a1bd6d0a7
runtime/v2/shim: use structured log for plugin ID
These logs were already using structured logs, so include "id" as a field,
which also prevents the id being quoted (and escaped when printing);

    time="2023-11-15T11:30:23.745574884Z" level=info msg="loading plugin \"io.containerd.internal.v1.shutdown\"..." runtime=io.containerd.runc.v2 type=io.containerd.internal.v1
    time="2023-11-15T11:30:23.745612425Z" level=info msg="loading plugin \"io.containerd.ttrpc.v1.pause\"..." runtime=io.containerd.runc.v2 type=io.containerd.ttrpc.v1
    time="2023-11-15T11:30:23.745620884Z" level=info msg="loading plugin \"io.containerd.event.v1.publisher\"..." runtime=io.containerd.runc.v2 type=io.containerd.event.v1
    time="2023-11-15T11:30:23.745625925Z" level=info msg="loading plugin \"io.containerd.ttrpc.v1.task\"..." runtime=io.containerd.runc.v2 type=io.containerd.ttrpc.v1

Also updated some changed `WithError().WithField()` calls, to prevent some
overhead.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-11-15 13:23:53 +01:00
Sebastiaan van Stijn
71fd85f5ed
runtime/v2/shim: run(): remove unused "name" argument
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-11-15 13:23:53 +01:00
Sebastiaan van Stijn
0a59c33be5
runtime/v2/shim: rename var that shadowed package var
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-11-15 13:23:53 +01:00
Sebastiaan van Stijn
be22e12d56
services/server: use structured log for plugin ID
These logs were already using structured logs, so include "id" as a field,
which also prevents the id being quoted (and escaped when printing);

    time="2023-11-15T11:30:23.745574884Z" level=info msg="loading plugin \"io.containerd.internal.v1.shutdown\"..." runtime=io.containerd.runc.v2 type=io.containerd.internal.v1
    time="2023-11-15T11:30:23.745612425Z" level=info msg="loading plugin \"io.containerd.ttrpc.v1.pause\"..." runtime=io.containerd.runc.v2 type=io.containerd.ttrpc.v1
    time="2023-11-15T11:30:23.745620884Z" level=info msg="loading plugin \"io.containerd.event.v1.publisher\"..." runtime=io.containerd.runc.v2 type=io.containerd.event.v1
    time="2023-11-15T11:30:23.745625925Z" level=info msg="loading plugin \"io.containerd.ttrpc.v1.task\"..." runtime=io.containerd.runc.v2 type=io.containerd.ttrpc.v1

Also updated some changed `WithError().WithField()` calls, to prevent some
overhead.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-11-15 13:23:53 +01:00
Sebastiaan van Stijn
09de4f1fcc
services/server: rename var that collided with import
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-11-15 13:08:53 +01:00
Sebastiaan van Stijn
14e621cf91
services/server: gofumpt
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-11-15 13:08:52 +01:00
Abel Feng
32bf805e57 sandbox: add a sandboxService interface to criService
so that we can add a fakeSandboxService to the criService in tests.

Signed-off-by: Abel Feng <fshb1988@gmail.com>
2023-11-15 09:25:58 +08:00
Abel Feng
25a4c3d235 sandbox: remove SandboxersServicePlugin
Signed-off-by: Abel Feng <fshb1988@gmail.com>
2023-11-15 09:22:10 +08:00
Abel Feng
0cf48bab2c sandbox: podsandbox init its own client
To break the cyclic dependency of cri plugin and podsandbox plugin,
we define a new plugin type of SandboxesServicePlugin and when cri init
it's own client, it will add the all the controllers by get them from
the SandboxesServicePlugin.
when podsandbox controller init it's client, it will not Require the
SandboxesServicePlugin.

Signed-off-by: Abel Feng <fshb1988@gmail.com>
2023-11-15 09:22:10 +08:00
Maksym Pavlenko
7d65a45639
Move runc shim implementation to cmd
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-11-14 10:13:32 -08:00
Samuel Karp
7deb68fbf4
Merge pull request #9266 from akhilerm/refactor-cri-labels
refactor labels used in cri server
2023-11-14 04:20:00 +00:00