Commit Graph

14496 Commits

Author SHA1 Message Date
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
Derek McGowan
276dce8651
Merge pull request #9358 from thaJeztah/bump_runc_binary_1.1.10
update runc binary to v1.1.10
2023-11-13 22:42:22 +00:00
Akhil Mohan
e682da76ce
fix labels in pod sandbox
Signed-off-by: Akhil Mohan <makhil@vmware.com>
2023-11-14 01:52:09 +05:30
Akhil Mohan
64c41162c3
update tests to use labels from cri/labels
Signed-off-by: Akhil Mohan <makhil@vmware.com>
2023-11-14 01:46:43 +05:30
Akhil Mohan
7e79225cec
refactor labels used in cri server
remove the duplication of labels used in cri/server
and move them to a common package cri/labels

Signed-off-by: Akhil Mohan <makhil@vmware.com>
2023-11-14 01:45:26 +05:30
Sebastiaan van Stijn
274a162824
update runc binary to v1.1.10
- full diff: https://github.com/opencontainers/runc/compare/v1.1.9...v1.1.10
- release notes: https://github.com/opencontainers/runc/releases/tag/v1.1.10

This is the tenth (and most likely final) patch release in the 1.1.z
release branch of runc. It mainly fixes a few issues in cgroups, and a
umask-related issue in tmpcopyup.

- Add support for `hugetlb.<pagesize>.rsvd` limiting and accounting.
  Fixes the issue of postgres failing when hugepage limits are set.
- Fixed permissions of a newly created directories to not depend on the value
  of umask in tmpcopyup feature implementation.
- libcontainer: cgroup v1 GetStats now ignores missing `kmem.limit_in_bytes`
  (fixes the compatibility with Linux kernel 6.1+).
- Fix a semi-arbitrary cgroup write bug when given a malicious hugetlb
  configuration. This issue is not a security issue because it requires a
  malicious config.json, which is outside of our threat model.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-11-13 16:03:29 +01:00
Iceber Gu
2e014fa2ac cri: fix update of pinned label for images
Signed-off-by: Iceber Gu <caiwei95@hotmail.com>
2023-11-10 23:27:11 +08:00
Samuel Karp
45d7f2324d
Merge pull request #9046 from thaJeztah/depguard_libcontainer
golangci-lint: enable depguard to prevent re-introducing libcontainer
2023-11-10 02:27:18 +00:00
Kazuyoshi Kato
67650f2bf1
Merge pull request #9348 from lengrongfu/feat/default-enable-unprivileged-icmp-and-ports
add default enable unprivileged icmp/ports
2023-11-10 00:36:21 +00:00
Phil Estes
1dd9581209
Merge pull request #9262 from fuweid/init-upgrade-test
integration: init release upgrade testing
2023-11-09 19:54:40 +00:00
Sebastiaan van Stijn
cb555fa16f
golangci-lint: enable depguard to prevent re-introducing libcontainer
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-11-09 13:20:48 +01:00
Samuel Karp
669e0786d8
Merge pull request #9145 from deitch/doc-runtime-shim
document runtime and shim configuration and selection
2023-11-09 07:24:31 +00:00
Phil Estes
c2b39b139e
Merge pull request #9349 from fuweid/deflaky-TestIssue9103
integration: deflake TestIssue9103
2023-11-08 17:58:08 +00:00
Wei Fu
dac056fe74 integration: deflake TestIssue9103
Fixes: #9334

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-11-08 23:40:00 +08:00
rongfu.leng
7b9fcfd7c6 add default enable unprivileged icmp/ports
Signed-off-by: rongfu.leng <rongfu.leng@daocloud.io>
2023-11-08 23:00:35 +08:00
Samuel Karp
5149050d6b
Merge pull request #9172 from lengrongfu/feat/add-validate-unprivileged
add verify kernel version when enable unprivileged
2023-11-08 07:34:58 +00:00
Phil Estes
c3101bd45f
Merge pull request #9341 from lengrongfu/fix/replace-expected-field
fix: expected and actual field position adjustment
2023-11-07 20:40:39 +00:00
Kazuyoshi Kato
186075d554
Merge pull request #9324 from thaJeztah/checkpoint_errs
client: remove obsolete ErrCheckpointRWUnsupported
2023-11-07 15:53:50 +00:00
Derek McGowan
de55dfc0f1
Merge pull request #9318 from dmcgowan/prepare-2.0-beta.0
Prepare release notes for 2.0.0-beta.0
2023-11-06 17:21:29 +00:00
rongfu.leng
a7cd49c68a expected and actual field position adjustment
Signed-off-by: rongfu.leng <rongfu.leng@daocloud.io>
2023-11-07 00:20:06 +08:00
rongfu.leng
e099717f9f validate kernel version for unprivileged icmp/port
Signed-off-by: rongfu.leng <rongfu.leng@daocloud.io>
2023-11-06 23:50:12 +08:00
Avi Deitcher
76049170b8 document runtime and shim configuration and selection
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2023-11-06 08:59:36 +02:00
Wei Fu
2fab240f21 integration: init release upgrade test
The TestUpgrade downloads the latest of previous release's binary and
use them to setup pods and then use current release to recover the
existing pods.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-11-05 17:51:28 +08:00
Samuel Karp
bd2db42464
Merge pull request #9287 from lengrongfu/feat/add-warning-use-inheritable
add warning use inheritable Capabilities
2023-11-04 00:33:18 +00:00
Akihiro Suda
33fab02dce
Merge pull request #7647 from thaJeztah/no_execabs
switch back from golang.org/x/sys/execabs to os/exec (go1.19)
2023-11-03 07:40:22 +00:00
Samuel Karp
edbd387236
Merge pull request #9319 from samuelkarp/config-deprecation-warnings
cri: add deprecation warnings for mirrors, auths, and configs
2023-11-02 20:19:04 +00:00
Sebastiaan van Stijn
2af6db672e
switch back from golang.org/x/sys/execabs to os/exec (go1.19)
This is effectively a revert of 2ac9968401, which
switched from os/exec to the golang.org/x/sys/execabs package to mitigate
security issues (mainly on Windows) with lookups resolving to binaries in the
current directory.

from the go1.19 release notes https://go.dev/doc/go1.19#os-exec-path

> ## PATH lookups
>
> Command and LookPath no longer allow results from a PATH search to be found
> relative to the current directory. This removes a common source of security
> problems but may also break existing programs that depend on using, say,
> exec.Command("prog") to run a binary named prog (or, on Windows, prog.exe) in
> the current directory. See the os/exec package documentation for information
> about how best to update such programs.
>
> On Windows, Command and LookPath now respect the NoDefaultCurrentDirectoryInExePath
> environment variable, making it possible to disable the default implicit search
> of “.” in PATH lookups on Windows systems.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-11-02 21:15:40 +01:00
Samuel Karp
a596d09ec9
cri: add deprecation warning for configs
Signed-off-by: Samuel Karp <samuelkarp@google.com>
2023-11-02 11:17:32 -07:00
Samuel Karp
35924bccc0
cri: add deprecation warning for auths
Signed-off-by: Samuel Karp <samuelkarp@google.com>
2023-11-02 11:17:32 -07:00