Commit Graph

14070 Commits

Author SHA1 Message Date
Derek McGowan
231301c8f8
Merge pull request #10451 from dims/cri-ttrpc-closed-during-ListPodSandboxStats-main
Fix for [cri] ttrpc: closed during ListPodSandboxStats
2024-07-11 13:08:11 +00:00
Davanum Srinivas
0772d0a37b
Fix for [cri] ttrpc: closed during ListPodSandboxStats
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2024-07-10 20:42:06 -04:00
Maksym Pavlenko
1b24e53d09
Merge pull request #10443 from containerd/dependabot/go_modules/golang-x-8115ffb80d
build(deps): bump the golang-x group with 2 updates
2024-07-09 16:48:29 +00:00
dependabot[bot]
63b55e6dfb
build(deps): bump the golang-x group with 2 updates
Bumps the golang-x group with 2 updates: [golang.org/x/mod](https://github.com/golang/mod) and [golang.org/x/sys](https://github.com/golang/sys).


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

Updates `golang.org/x/sys` from 0.21.0 to 0.22.0
- [Commits](https://github.com/golang/sys/compare/v0.21.0...v0.22.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/sys
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: golang-x
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-08 23:55:10 +00:00
Akihiro Suda
cbb2fc78e9
Merge pull request #10436 from AkihiroSuda/fedora-40
CI: update Fedora to 40
2024-07-07 11:15:11 +00:00
Akihiro Suda
51f34ff491
CI: update Fedora to 40
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-07-04 23:50:35 +09:00
Akihiro Suda
1117f663e7
Merge pull request #10416 from akhilerm/update-go1.22.5
update go version to 1.22.5
2024-07-03 23:57:07 +00:00
Akhil Mohan
56495b404d
update go version to 1.22.5
Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
2024-07-03 11:55:48 +05:30
Fu Wei
1fb1882c7d
Merge pull request #10375 from linxiulei/podstats
cri: get pid count from container metrics
2024-07-01 21:32:17 +00:00
Fu Wei
3b2a14bb4c
Merge pull request #10407 from dmcgowan/fsverity-internal
Move fsverity package to internal
2024-07-01 21:31:55 +00:00
Samuel Karp
ebcbbe5643
Merge pull request #10401 from samuelkarp/nri-panic
cri: ensure NRI API never has nil CRI
2024-07-01 16:37:46 +00:00
Derek McGowan
23170e20df
Move fsverity package to internal
This functionality is not directly related to containerd and could move
to external package at some point.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-07-01 09:21:24 -07:00
Eric Lin
f6e731c809 cri: get pid count from container metrics
This reduces latency of calling ListPodSandboxStats() by avoiding calling
shim API Task().

Signed-off-by: Eric Lin <linxiulei@gmail.com>
2024-07-01 15:34:47 +00:00
Fu Wei
37e0f54534
Merge pull request #10402 from thaJeztah/update_runhcs_v0.12.4
update runhcs binary to v0.12.4
2024-07-01 15:29:26 +00:00
Fu Wei
f5f11658c5
Merge pull request #9903 from abel-von/add-update-resource-only
sandbox: Add Update API for sandbox controller
2024-07-01 15:16:21 +00:00
Akihiro Suda
7103e381f1
Merge pull request #10007 from Jenkins-J/fsverity-content-verification
Fsverity content verification
2024-06-29 06:32:17 +00:00
Akihiro Suda
db1123b19c
Merge pull request #10394 from thaJeztah/deprecate_reference_SplitObject
pkg/reference: deprecate SplitObject, and remove for v2.0
2024-06-29 06:14:56 +00:00
Sebastiaan van Stijn
96352ad226
update runhcs binary to v0.12.4
commit 149ca6880a updated the hcsshim
module to v0.12.4, but did not add a commit to also update the runhcs
binary version.

full diff: https://github.com/microsoft/hcsshim/compare/v0.12.3...v0.12.4

These versions are decoupled since 15b13fb3ea
to allow updating the binary version without updating the module, in cases
where the module doesn't require updates.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-06-29 00:46:30 +02:00
Samuel Karp
10aec359a0
cri: ensure NRI API never has nil CRI
A nil CRIImplementation field can cause a nil pointer dereference and
panic during startup recovery.

Prior to this change, the nri.API struct would have a nil cri
(CRIImplementation) field after nri.NewAPI until nri.Register was
called.  Register is called mid-way through initialization of the CRI
plugin, but recovery for containers occurs prior to that.  Container
recovery includes establishing new exit monitors for existing containers
that were discovered.  When a container exits, NRI plugins are given the
opportunity to be notified about the lifecycle event, and this is done
by accessing that CRIImplementation field inside the nri.API.  If a
container exits prior to nri.Register being called, access to the
CRIImplementation field can cause a panic.

Here's the call-path:

* The CRI plugin starts running
  [here](ae71819c4f/pkg/cri/server/service.go (L222))
* It then [calls into](ae71819c4f/pkg/cri/server/service.go (L227))
  `recover()` to recover state from previous runs of containerd
* `recover()` then attempts to recover all containers through
  [`loadContainer()`](ae7d74b9e2/internal/cri/server/restart.go (L175))
* When `loadContainer()` finds a container that is still running, it waits
  for the task (internal containerd object) to exit and sets up
  [exit monitoring](ae7d74b9e2/internal/cri/server/restart.go (L391))
* Any exit that then happens must be
  [handled](ae7d74b9e2/internal/cri/server/events.go (L145))
* Handling an exit includes
  [deleting the Task](ae7d74b9e2/internal/cri/server/events.go (L188))
  and specifying [`nri.WithContainerExit`](ae7d74b9e2/internal/cri/nri/nri_api_linux.go (L348))
  to [notify](ae7d74b9e2/internal/cri/nri/nri_api_linux.go (L356))
  any subscribed NRI plugins
* NRI plugins need to know information about the pod (not just the sandbox),
  so before a plugin is notified the NRI API package
  [queries the Sandbox Store](ae7d74b9e2/internal/cri/nri/nri_api_linux.go (L232))
  through the CRI implementation
* The `cri` implementation member field in the `nri.API` struct is set as part of the
  [`Register()`](ae7d74b9e2/internal/cri/nri/nri_api_linux.go (L66)) method
* The `nri.Register()` method is only called
  [much further down in the CRI `Run()` method](ae71819c4f/pkg/cri/server/service.go (L279))

Signed-off-by: Samuel Karp <samuelkarp@google.com>
2024-06-28 15:32:11 -07:00
Sebastiaan van Stijn
a723c0c6ea
pkg/reference: remove deprecated SplitObject
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-06-28 19:06:30 +02:00
James Jenkins
ef98c71985 Implement fsverity functionality
Implement calls to the fsverity kernel module, allowing containerd to
enable fsverity on blob data in the content store. This causes fsverity
to veirfy the integrity of blob data when the blob is read.

Signed-off-by: James Jenkins <James.Jenkins@ibm.com>
2024-06-28 09:50:44 -04:00
Sebastiaan van Stijn
fec33aa735
pkg/reference: deprecate SplitObject
The behavior of this function is quite counter-intuitive, as it preserves
the delimiter in the result, and its use for external consumers would be
very limited.

Spec.Digest no longer uses this function, and it appears that BuildKit is
currently the only (publicly visible) external consumer of it.

This patch deprecates the function.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-06-27 22:11:42 +02:00
Maksym Pavlenko
ae7d74b9e2
Merge pull request #10393 from thaJeztah/improve_reference
pkg/reference: reduce allocations and improve GoDoc
2024-06-27 18:36:24 +00:00
Sebastiaan van Stijn
a5fce38f31
pkg/reference: Spec.Digest(): inline SplitObject code
Inline the relevant code from SplitObject, as we're only interested
in the digest portion.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-06-27 12:05:23 +02:00
Sebastiaan van Stijn
42145950bb
pkg/reference: SplitObject: add proper GoDoc
The behavior of this function is quite counter-intuitive, as it preserves
the delimiter in the result. This function should probably have been an
internal function, as its use for external consumers would be very limited,
but let's at least document the (surprising) behavior for those that are
considering to use it.

It appears that BuildKit is currently the only (publicly visible) external
consumer of this function; I am planning to inline its functionality in
Spec.Digest() and to deprecate this function so that it can be removed.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-06-27 12:05:23 +02:00
Sebastiaan van Stijn
74a6156ac2
pkg/reference: SplitObject: zero allocations
Before / After:

    BenchmarkSplitObject-10        2785656    428.1 ns/op     416 B/op    13 allocs/op
    BenchmarkSplitObjectNew-10    13510520     88.2 ns/op       0 B/op     0 allocs/op

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-06-27 12:05:10 +02:00
Sebastiaan van Stijn
799bca97f2
pkg/reference: Spec.String(): use string-concatenation instead of sprintf
These were straight concatenations of strings; reduce some allocations by
removing fmt.Sprintf for this.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-06-27 12:04:22 +02:00
Maksym Pavlenko
7a0687f6c8
Merge pull request #10354 from containerd/dependabot/go_modules/github.com/klauspost/compress-1.17.9
build(deps): bump github.com/klauspost/compress from 1.17.8 to 1.17.9
2024-06-26 23:16:45 +00:00
Maksym Pavlenko
017e10de54
Merge pull request #10353 from containerd/dependabot/go_modules/github.com/checkpoint-restore/checkpointctl-1.2.1
build(deps): bump github.com/checkpoint-restore/checkpointctl from 1.2.0 to 1.2.1
2024-06-26 23:16:24 +00:00
Maksym Pavlenko
faf06a3ae2
Merge pull request #10381 from containerd/dependabot/go_modules/k8s-f351cbf957
build(deps): bump k8s.io/klog/v2 from 2.130.0 to 2.130.1 in the k8s group
2024-06-26 20:07:22 +00:00
Maksym Pavlenko
cf2f42edc1
Merge pull request #10382 from containerd/dependabot/go_modules/github.com/containerd/go-cni-1.1.10
build(deps): bump github.com/containerd/go-cni from 1.1.9 to 1.1.10
2024-06-26 19:22:19 +00:00
Maksym Pavlenko
8c39a5d127
Merge pull request #10383 from containerd/dependabot/go_modules/github.com/containernetworking/cni-1.2.2
build(deps): bump github.com/containernetworking/cni from 1.2.1 to 1.2.2
2024-06-26 19:22:02 +00:00
Maksym Pavlenko
686c36ba3c
Merge pull request #10385 from dmcgowan/metadata-transactor
Use the transactor interface in metadata
2024-06-26 19:21:41 +00:00
Phil Estes
5ec7e10d9f
Merge pull request #10242 from henry118/shim-pprof
Add pprof to runc-shim
2024-06-26 18:16:39 +00:00
Phil Estes
c673fcc9af
Merge pull request #10355 from containerd/dependabot/go_modules/google.golang.org/protobuf-1.34.2
build(deps): bump google.golang.org/protobuf from 1.34.1 to 1.34.2
2024-06-25 22:18:35 +00:00
dependabot[bot]
c097022a5a
build(deps): bump github.com/containernetworking/cni from 1.2.1 to 1.2.2
Bumps [github.com/containernetworking/cni](https://github.com/containernetworking/cni) from 1.2.1 to 1.2.2.
- [Release notes](https://github.com/containernetworking/cni/releases)
- [Commits](https://github.com/containernetworking/cni/compare/v1.2.1...v1.2.2)

---
updated-dependencies:
- dependency-name: github.com/containernetworking/cni
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-25 21:42:38 +00:00
dependabot[bot]
14b053fb48
build(deps): bump github.com/containerd/go-cni from 1.1.9 to 1.1.10
Bumps [github.com/containerd/go-cni](https://github.com/containerd/go-cni) from 1.1.9 to 1.1.10.
- [Release notes](https://github.com/containerd/go-cni/releases)
- [Commits](https://github.com/containerd/go-cni/compare/v1.1.9...v1.1.10)

---
updated-dependencies:
- dependency-name: github.com/containerd/go-cni
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-25 21:41:45 +00:00
Derek McGowan
8f9607eed5
Use the transactor interface in metadata
The boltdb instance in metadata is only used for getting transactions
and can also be overriden via the context to have a wider control of the
transaction boundary. Using the transactor interface allows callers of
metadata to have more control of the transaction lifecycle.

Since boltdb must be fsync'ed on commit, operations which perform many
database operations can be costly and slow. While providing transactor
via context can be used to group together operations, it does not
provide a way to manage the commit fsyncs more globally.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-06-25 14:24:49 -07:00
Phil Estes
7ec5b967b3
Merge pull request #10356 from containerd/dependabot/go_modules/github.com/containernetworking/plugins-1.5.1
build(deps): bump github.com/containernetworking/plugins from 1.4.1 to 1.5.1
2024-06-25 20:57:13 +00:00
dependabot[bot]
2cf8237a13
build(deps): bump k8s.io/klog/v2 in the k8s group
Bumps the k8s group with 1 update: [k8s.io/klog/v2](https://github.com/kubernetes/klog).


Updates `k8s.io/klog/v2` from 2.130.0 to 2.130.1
- [Release notes](https://github.com/kubernetes/klog/releases)
- [Changelog](https://github.com/kubernetes/klog/blob/main/RELEASE.md)
- [Commits](https://github.com/kubernetes/klog/compare/v2.130.0...v2.130.1)

---
updated-dependencies:
- dependency-name: k8s.io/klog/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: k8s
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-24 23:34:45 +00:00
dependabot[bot]
a2f9101aad
build(deps): bump github.com/containernetworking/plugins
Bumps [github.com/containernetworking/plugins](https://github.com/containernetworking/plugins) from 1.4.1 to 1.5.1.
- [Release notes](https://github.com/containernetworking/plugins/releases)
- [Commits](https://github.com/containernetworking/plugins/compare/v1.4.1...v1.5.1)

---
updated-dependencies:
- dependency-name: github.com/containernetworking/plugins
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-24 19:03:57 +00:00
Maksym Pavlenko
c7f7fa5390
Merge pull request #10352 from containerd/dependabot/go_modules/github.com/containernetworking/cni-1.2.1
build(deps): bump github.com/containernetworking/cni from 1.2.0 to 1.2.1
2024-06-24 18:15:53 +00:00
dependabot[bot]
2304cd9d5c
build(deps): bump google.golang.org/protobuf from 1.34.1 to 1.34.2
Bumps google.golang.org/protobuf from 1.34.1 to 1.34.2.

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-24 17:55:57 +00:00
Maksym Pavlenko
73422722f2
Merge pull request #10351 from containerd/dependabot/go_modules/k8s-1b02c00507
build(deps): bump k8s.io/klog/v2 from 2.120.1 to 2.130.0 in the k8s group
2024-06-24 17:13:18 +00:00
Derek McGowan
7310674902
Merge pull request #10217 from akhilerm/ubuntu-24
ci: enable ubuntu-24 runners
2024-06-24 15:41:13 +00:00
Phil Estes
14981b4bc0
Merge pull request #10366 from thaJeztah/api_update_deps
api: update github.com/containerd/ttrpc v1.2.5 to be aligned with containerd
2024-06-21 13:34:55 +00:00
dependabot[bot]
469f950260
build(deps): bump github.com/containernetworking/cni from 1.2.0 to 1.2.1
Bumps [github.com/containernetworking/cni](https://github.com/containernetworking/cni) from 1.2.0 to 1.2.1.
- [Release notes](https://github.com/containernetworking/cni/releases)
- [Commits](https://github.com/containernetworking/cni/compare/v1.2.0...v1.2.1)

---
updated-dependencies:
- dependency-name: github.com/containernetworking/cni
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-21 02:03:58 +00:00
Akihiro Suda
9a94e9e78a
Merge pull request #10372 from thaJeztah/bump_ttrpc_1.2.5
vendor: github.com/containerd/ttrpc v1.2.5
2024-06-21 01:23:47 +00:00
Henry Wang
243b803a19 Add pprof to runc-shim
Signed-off-by: Henry Wang <henwang@amazon.com>
2024-06-20 23:12:31 +00:00
Derek McGowan
8b5c218e5a
Merge pull request #10369 from thaJeztah/cmd_no_alias
cmd: don't alias context package, and use cliContext for cli.Context
2024-06-20 20:42:29 +00:00