Commit Graph

14169 Commits

Author SHA1 Message Date
Akihiro Suda
eebc80df58
Merge pull request #10585 from containerd/dependabot/go_modules/golang-x-ef3ba730bc
build(deps): bump golang.org/x/sys from 0.23.0 to 0.24.0 in the golang-x group
2024-08-13 05:51:42 +00:00
Fu Wei
dd2a24cf0e
Merge pull request #10557 from tariq1890/cli-ctx-add
use ctx object from cliContext instead of a creating a new one
2024-08-13 01:13:48 +00:00
Fu Wei
7403f91f1a
Merge pull request #10560 from samuelkarp/ctr-shim-state
ctr: shim state for secondary tasks & shim state query for old shims
2024-08-13 01:13:30 +00:00
dependabot[bot]
6ed54e9663
build(deps): bump golang.org/x/sys in the golang-x group
Bumps the golang-x group with 1 update: [golang.org/x/sys](https://github.com/golang/sys).


Updates `golang.org/x/sys` from 0.23.0 to 0.24.0
- [Commits](https://github.com/golang/sys/compare/v0.23.0...v0.24.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: golang-x
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-12 23:38:55 +00:00
Kazuyoshi Kato
6b04c9dfac
Merge pull request #10550 from containerd/dependabot/github_actions/google-github-actions/upload-cloud-storage-2.1.1
build(deps): bump google-github-actions/upload-cloud-storage from 2.1.0 to 2.1.1
2024-08-09 23:08:42 +00:00
Maksym Pavlenko
3c344bc589
Merge pull request #10569 from thaJeztah/bump_go
update to go1.22.6
2024-08-09 18:25:19 +00:00
Maksym Pavlenko
0b02e0c225
Merge pull request #7616 from swagatbora90/trace-cri-runtime
Add tracing spans to CRI runtime service apis
2024-08-09 18:24:47 +00:00
Sebastiaan van Stijn
a100b055cb
update to go1.22.6
- https://github.com/golang/go/issues?q=milestone%3AGo1.22.6+label%3ACherryPickApproved
- full diff: https://github.com/golang/go/compare/go1.22.5...go1.22.6

go1.22.6 (released 2024-08-06) includes fixes to the go command, the compiler,
the linker, the trace command, the covdata command, and the bytes, go/types,
and os/exec packages. See the Go 1.22.6 milestone on our issue tracker for
details.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-08-09 17:02:18 +02:00
Derek McGowan
268ae7fa02
Merge pull request #10562 from zhsj/pidfd
Fix TestNewBinaryIOCleanup on Go 1.23 and Linux 5.4
2024-08-09 13:13:58 +00:00
Derek McGowan
ee86aba275
Merge pull request #10563 from thaJeztah/migrate_userns
migrate to github.com/moby/sys/userns
2024-08-09 13:13:02 +00:00
Sebastiaan van Stijn
9776047243
migrate to github.com/moby/sys/userns
Commit 8437c567d8 migrated the use of the
userns package to the github.com/moby/sys/user module.

After further discussion with maintainers, it was decided to move the
userns package to a separate module, as it has no direct relation with
"user" operations (other than having "user" in its name).

This patch migrates our code to use the new module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-08-08 12:48:54 +02:00
Shengjing Zhu
8ef73c5dd5 Fix TestNewBinaryIOCleanup on Go 1.23 and Linux 5.4
When running the test on Ubuntu focal (kernel version 5.4), the
symlink for pidfd is anon_inode:[pidfd].

Updates: #10345

Signed-off-by: Shengjing Zhu <zhsj@debian.org>
2024-08-08 17:20:19 +08:00
Samuel Karp
7d4da0cb28
ctr: shim state query for old shims
Old shims do not implement containerd.task.v3.Task, but it can be
useful to use a new ctr with an older shim especially during upgrade
scenarios.

Signed-off-by: Samuel Karp <samuelkarp@google.com>
2024-08-07 16:48:14 -07:00
Samuel Karp
d59e8a8404
ctr: shim state for secondary tasks
The v2 shim interface supports grouping, so a single shim can manage
multiple tasks.  Prior to this change, the `shim state` command could
only query the state of the primary task (task that shares the same ID
as the shim).

Signed-off-by: Samuel Karp <samuelkarp@google.com>
2024-08-07 16:48:08 -07:00
Samuel Karp
58cf6e2830
Merge pull request #10551 from containerd/dependabot/go_modules/golang-x-39bd39f2da
build(deps): bump the golang-x group with 3 updates
2024-08-07 06:01:35 +00:00
Tariq Ibrahim
32c2d14932
use ctx object from cliContext instead of a creating a new one
Signed-off-by: Tariq Ibrahim <tibrahim@nvidia.com>
2024-08-06 13:42:22 -07:00
Maksym Pavlenko
10d4ee9dc1
Merge pull request #10556 from thaJeztah/fix_runc_version
script/setup/install-runc: fix runc using incorrect version
2024-08-06 20:35:45 +00:00
Sebastiaan van Stijn
349d2b5c15
script/setup/install-runc: fix runc using incorrect version
runc v1.1.13 introduced an option to customize the version (as printed by the
`--version` flag) through a `VERSION` Make variable / environment variable
(see [1]).

This variable collided with the `VERSION` environment variable used by
containerd for the same purpose, which lead to `runc` binaries built
using the version of containerd;

    runc --version
    runc version 1.7.20
    commit: v1.1.13-0-g58aa9203
    ...

This patch unsets the `VERSION` variable to bring prevent it from being
inherited and to bring back the previous behavior.

Before this patch:

    docker build -t containerd-test -f contrib/Dockerfile.test .
    docker run -it --rm --env VERSION=1.7.20 containerd-test sh -c 'script/setup/install-runc && /usr/local/sbin/runc --version'
    # ....
    HEAD is now at 58aa9203 VERSION: release 1.1.13
    go build -trimpath "-buildmode=pie"  -tags "seccomp" -ldflags "-X main.gitCommit=v1.1.13-0-g58aa9203 -X main.version=1.7.20 " -o runc .
    install -D -m0755 runc /usr/local/sbin/runc
    /go/src/github.com/containerd/containerd
    runc version 1.7.20
    commit: v1.1.13-0-g58aa9203
    spec: 1.0.2-dev
    go: go1.22.5
    libseccomp: 2.5.4

With this patch:

    docker build -t containerd-test -f contrib/Dockerfile.test .
    docker run -it --rm --env VERSION=1.7.20 containerd-test sh -c 'script/setup/install-runc && /usr/local/sbin/runc --version'
    # ....
    HEAD is now at 58aa9203 VERSION: release 1.1.13
    go build -trimpath "-buildmode=pie"  -tags "seccomp" -ldflags "-X main.gitCommit=v1.1.13-0-g58aa9203 -X main.version=v1.1.13 " -o runc .
    install -D -m0755 runc /usr/local/sbin/runc
    /go/src/github.com/containerd/containerd
    runc version v1.1.13
    commit: v1.1.13-0-g58aa9203
    spec: 1.0.2-dev
    go: go1.22.5
    libseccomp: 2.5.4

[1]: 6f4d975c40

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-08-06 16:52:15 +02:00
dependabot[bot]
267fac568d
build(deps): bump the golang-x group with 3 updates
Bumps the golang-x group with 3 updates: [golang.org/x/mod](https://github.com/golang/mod), [golang.org/x/sync](https://github.com/golang/sync) and [golang.org/x/sys](https://github.com/golang/sys).


Updates `golang.org/x/mod` from 0.19.0 to 0.20.0
- [Commits](https://github.com/golang/mod/compare/v0.19.0...v0.20.0)

Updates `golang.org/x/sync` from 0.7.0 to 0.8.0
- [Commits](https://github.com/golang/sync/compare/v0.7.0...v0.8.0)

Updates `golang.org/x/sys` from 0.22.0 to 0.23.0
- [Commits](https://github.com/golang/sys/compare/v0.22.0...v0.23.0)

---
updated-dependencies:
- dependency-name: golang.org/x/mod
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: golang-x
- dependency-name: golang.org/x/sync
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: golang-x
- dependency-name: golang.org/x/sys
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: golang-x
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-05 23:38:35 +00:00
dependabot[bot]
6814cc3549
build(deps): bump google-github-actions/upload-cloud-storage
Bumps [google-github-actions/upload-cloud-storage](https://github.com/google-github-actions/upload-cloud-storage) from 2.1.0 to 2.1.1.
- [Release notes](https://github.com/google-github-actions/upload-cloud-storage/releases)
- [Changelog](https://github.com/google-github-actions/upload-cloud-storage/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google-github-actions/upload-cloud-storage/compare/v2.1.0...v2.1.1)

---
updated-dependencies:
- dependency-name: google-github-actions/upload-cloud-storage
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-05 23:17:47 +00:00
Maksym Pavlenko
7f707b5e79
Merge pull request #10547 from katexochen/code-flow-delim
docs/content-flow: fix code fence delimiter
2024-08-05 17:34:37 +00:00
Paul Meyer
d036988eec docs/content-flow: fix code fence delimiter
Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
2024-08-05 12:55:48 +02:00
Swagat Bora
83c26962c2 Remove extra span created in the instrumented service layer
Signed-off-by: Swagat Bora <sbora@amazon.com>
2024-08-05 02:34:27 +00:00
Swagat Bora
c0cdcb34f1 Add spans to CRI runtime service and related client methods
This adds otel spans to CRI service mainly targeting mutating apis which includes:
* Sandbox apis - RunPodSandbox, StopPodSandbox, RemovePodSandbox
* Container apis - CreateContainer, StartContainer, StopContainer, RemoveContainer
* Attach, Exec and Exec Sync
* Containerd client methods: container.go, client.go, process.go and task.go

Signed-off-by: Swagat Bora <sbora@amazon.com>
2024-08-05 02:34:20 +00:00
Fu Wei
45d8917089
Merge pull request #10284 from ningmingxiao/sync
support to syncfs after pull by using diff plugin
2024-08-05 00:58:13 +00:00
ningmingxiao
0e4f2108b5 support to syncfs after pull by using diff plugin
Signed-off-by: ningmingxiao <ning.mingxiao@zte.com.cn>
2024-08-02 11:47:42 +08:00
Phil Estes
7a804489fd
Merge pull request #10516 from etungsten/ensure-state-dir-perms
Ensure /run/containerd gets created with correct perms
2024-07-31 14:22:04 +00:00
Akihiro Suda
babfebf0a4
Merge pull request #10472 from fuweid/migrate-sandboxes-bucket
core/metadata: migrate sandboxes bucket into v1
2024-07-31 01:01:05 +00:00
Erikson Tung
551ac0600a Ensure /run/containerd is created with correct perms
There are a couple directories that get created under the default
state directory ("/run/containerd") even when containerd is configured
to use a different location for its state directory. Create the default
state directory even if containerd is configured to use a different
state directory location. This ensure pkg/shim and pkg/fifo won't create
the default state directory with incorrect permissions when calling
os.MkdirAll for their respective subdirectories.

Signed-off-by: Erikson Tung <etung@netflix.com>
2024-07-30 17:55:01 -07:00
Maksym Pavlenko
fd2a7676a3
Merge pull request #10442 from Iceber/fix_ctr_delete_force
client: fix tasks with PID 0 cannot be forced to delete
2024-07-30 20:14:08 +00:00
Maksym Pavlenko
fae1118afd
Merge pull request #10519 from containerd/dependabot/go_modules/github.com/urfave/cli/v2-2.27.3
build(deps): bump github.com/urfave/cli/v2 from 2.27.2 to 2.27.3
2024-07-30 20:13:14 +00:00
Maksym Pavlenko
fec24e209d
Merge pull request #10520 from saschagrunert/cri
Make `StopPodSandbox` RPC idempotent
2024-07-30 20:12:50 +00:00
Maksym Pavlenko
7bcc78526d
Merge pull request #10521 from saschagrunert/idempotence-ctr
Make `StopContainer` RPC idempotent
2024-07-30 20:12:26 +00:00
Wei Fu
4cfeb7b19e core/metadata: migrate sandboxes bucket into v1
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2024-07-30 21:37:35 +08:00
Sascha Grunert
a97b11898a
Make StopContainer RPC idempotent
Similar to container removal, the stop of a container should be a noop if
the container has not been found.

Found during: https://github.com/kubernetes-sigs/cri-tools/pull/1536

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2024-07-30 11:47:25 +02:00
Sascha Grunert
c6cea95d95
Make StopPodSandbox RPC idempotent
Similar to sandbox removal, the stop of a sandbox should be a noop if
the sandbox has not been found.

Found during: https://github.com/kubernetes-sigs/cri-tools/pull/1535

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2024-07-30 10:40:16 +02:00
Kazuyoshi Kato
ea3e1d9613
Merge pull request #10518 from containerd/dependabot/github_actions/ossf/scorecard-action-2.4.0
build(deps): bump ossf/scorecard-action from 2.3.3 to 2.4.0
2024-07-30 03:59:37 +00:00
dependabot[bot]
ad24ca9605
build(deps): bump github.com/urfave/cli/v2 from 2.27.2 to 2.27.3
Bumps [github.com/urfave/cli/v2](https://github.com/urfave/cli) from 2.27.2 to 2.27.3.
- [Release notes](https://github.com/urfave/cli/releases)
- [Changelog](https://github.com/urfave/cli/blob/main/docs/CHANGELOG.md)
- [Commits](https://github.com/urfave/cli/compare/v2.27.2...v2.27.3)

---
updated-dependencies:
- dependency-name: github.com/urfave/cli/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-29 23:37:04 +00:00
dependabot[bot]
71b5b34de0
build(deps): bump ossf/scorecard-action from 2.3.3 to 2.4.0
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.3.3 to 2.4.0.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](dc50aa9510...62b2cac7ed)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-29 23:04:31 +00:00
Kazuyoshi Kato
2ddd3db952
Merge pull request #9858 from w13915984028/fixdebug
Add file name to device type check failure message
2024-07-26 21:20:38 +00:00
Akihiro Suda
7a1f6b2891
Merge pull request #10509 from samuelkarp/pr-9966-follow-up
deprecation: update warnings for CRI config fields
2024-07-26 17:40:59 +00:00
Akihiro Suda
762df8b7d1
Merge pull request #10473 from thaJeztah/migrate_userns
pkg/userns: deprecate and migrate to github.com/moby/sys/user/userns
2024-07-26 17:38:55 +00:00
Sebastiaan van Stijn
eddd90d7c1
remove deprecated pkg/userns
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-26 09:48:40 +02:00
Sebastiaan van Stijn
8437c567d8
pkg/userns: deprecate and migrate to github.com/moby/sys/user/userns
The userns package in libcontainer was integrated into the moby/sys/user
module at commit [3778ae603c706494fd1e2c2faf83b406e38d687d][1].

This patch deprecates the containerd fork of that package, and adds it as
an alias for the moby/sys/user/userns package.

[1]: 3778ae603c

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-26 09:47:50 +02:00
Sebastiaan van Stijn
40a315b95c
vendor: github.com/moby/sys/user v0.2.0
full diff: https://github.com/moby/sys/compare/user/v0.1.0...user/v0.2.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-26 09:47:12 +02:00
Samuel Karp
f9146c0516
deprecation: update warnings for CRI config fields
Some CRI config properties had removal postponed until v2.1 in
https://github.com/containerd/containerd/pull/9966. Update the
associated deprecation warnings to match the new removal version.

Signed-off-by: Samuel Karp <samuelkarp@google.com>
2024-07-25 14:25:39 -07:00
Kazuyoshi Kato
f9903084ae
Merge pull request #10503 from samuelkarp/issue-10491
introspection: regenerate UUID if state is empty
2024-07-25 21:14:50 +00:00
Samuel Karp
0dcc51aedf
introspection: regenerate UUID if state is empty
The /var/lib/containerd/io.containerd.grpc.v1.introspection/uuid file
stores a UUID to identify the particular containerd daemon responding to
requests.  The file should either exist with a UUID, or not exist.
However, it has been observed that the file can be truncated with 0
bytes, which will then fail to be parsed as a valid UUID.

As a defensive practice, detect a 0-length file and overwrite with a new
UUID rather than failing.

Fixes: https://github.com/containerd/containerd/issues/10491
Signed-off-by: Samuel Karp <samuelkarp@google.com>
2024-07-25 11:02:54 -07:00
Kazuyoshi Kato
c3bed76eeb
Merge pull request #10343 from ambarve/fix_ordering_comment
Fix incorrect comment about ordering of parent layers
2024-07-23 18:19:35 +00:00
Kazuyoshi Kato
442daddb7f
Merge pull request #10495 from containerd/dependabot/go_modules/k8s-91e0c64a7e
build(deps): bump the k8s group across 1 directory with 4 updates
2024-07-23 18:18:35 +00:00