Commit Graph

13124 Commits

Author SHA1 Message Date
dependabot[bot]
db43e3d1f7
build(deps): bump golang.org/x/sync from 0.4.0 to 0.5.0
Bumps [golang.org/x/sync](https://github.com/golang/sync) from 0.4.0 to 0.5.0.
- [Commits](https://github.com/golang/sync/compare/v0.4.0...v0.5.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-13 00:24:20 +00:00
Maksym Pavlenko
8f1479132f
Merge pull request #9504 from AkihiroSuda/dependabot
CI: enable dependabot
2023-12-12 23:41:52 +00:00
Samuel Karp
edcbc508b6
Merge pull request #9496 from mxpv/links
Add nighly job to verify doc links (and fix broken links)
2023-12-12 23:04:50 +00:00
Phil Estes
35c125b2dd
Merge pull request #9503 from ktock/go-toml-2.1.1
go.mod: Bump up github.com/pelletier/go-toml to v2.1.1
2023-12-12 21:25:14 +00:00
Derek McGowan
1feb23465f
Merge pull request #9401 from fuweid/v2-mode
*: introduce image_pull_with_sync_fs in CRI
2023-12-12 14:34:44 +00:00
Akihiro Suda
5a140dca5e
CI: enable dependabot
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-12-12 18:46:07 +09:00
Kohei Tokunaga
c1197995b9
go.mod: Bump up github.com/pelletier/go-toml to v2.1.1
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2023-12-12 14:28:55 +09:00
Wei Fu
23278c81fb *: introduce image_pull_with_sync_fs in CRI
It's to ensure the data integrity during unexpected power failure.

Background:

Since release 1.3, in Linux system, containerD unpacks and writes files into
overlayfs snapshot directly. It doesn’t involve any mount-umount operations
so that the performance of pulling image has been improved.

As we know, the umount syscall for overlayfs will force kernel to flush
all the dirty pages into disk. Without umount syscall, the files’ data relies
on kernel’s writeback threads or filesystem's commit setting (for
instance, ext4 filesystem).

The files in committed snapshot can be loss after unexpected power failure.
However, the snapshot has been committed and the metadata also has been
fsynced. There is data inconsistency between snapshot metadata and files
in that snapshot.

We, containerd, received several issues about data loss after unexpected
power failure.

* https://github.com/containerd/containerd/issues/5854
* https://github.com/containerd/containerd/issues/3369#issuecomment-1787334907

Solution:

* Option 1: SyncFs after unpack

Linux platform provides [syncfs][syncfs] syscall to synchronize just the
filesystem containing a given file.

* Option 2: Fsync directories recursively and fsync on regular file

The fsync doesn't support symlink/block device/char device files. We
need to use fsync the parent directory to ensure that entry is
persisted.

However, based on [xfstest-dev][xfstest-dev], there is no case to ensure
fsync-on-parent can persist the special file's metadata, for example,
uid/gid, access mode.

Checkout [generic/690][generic/690]: Syncing parent dir can persist
symlink. But for f2fs, it needs special mount option. And it doesn't say
that uid/gid can be persisted. All the details are behind the
implemetation.

> NOTE: All the related test cases has `_flakey_drop_and_remount` in
[xfstest-dev].

Based on discussion about [Documenting the crash-recovery guarantees of Linux file systems][kernel-crash-recovery-data-integrity],
we can't rely on Fsync-on-parent.

* Option 1 is winner

This patch is using option 1.

There is test result based on [test-tool][test-tool].
All the networking traffic created by pull is local.

  * Image: docker.io/library/golang:1.19.4 (992 MiB)
    * Current: 5.446738579s
      * WIOS=21081, WBytes=1329741824, RIOS=79, RBytes=1197056
    * Option 1: 6.239686088s
      * WIOS=34804, WBytes=1454845952, RIOS=79, RBytes=1197056
    * Option 2: 1m30.510934813s
      * WIOS=42143, WBytes=1471397888, RIOS=82, RBytes=1209344

  * Image: docker.io/tensorflow/tensorflow:latest (1.78 GiB, ~32590 Inodes)
    * Current: 8.852718042s
      * WIOS=39417, WBytes=2412818432, RIOS=2673, RBytes=335987712
    * Option 1: 9.683387174s
      * WIOS=42767, WBytes=2431750144, RIOS=89, RBytes=1238016
    * Option 2: 1m54.302103719s
      * WIOS=54403, WBytes=2460528640, RIOS=1709, RBytes=208237568

The Option 1 will increase `wios`. So, the `image_pull_with_sync_fs` is
option in CRI plugin.

[syncfs]: <https://man7.org/linux/man-pages/man2/syncfs.2.html>
[xfstest-dev]: <https://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git>
[generic/690]: <https://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git/tree/tests/generic/690?h=v2023.11.19>
[kernel-crash-recovery-data-integrity]: <https://lore.kernel.org/linux-fsdevel/1552418820-18102-1-git-send-email-jaya@cs.utexas.edu/>
[test-tool]: <a17fb2010d/contrib/syncfs/containerd/main_test.go (L51)>

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-12-12 10:18:39 +08:00
Wei Fu
bd5c602c4d api: introduce sync_fs to diff.ApplyRequest
It's flag to synchronize the underlying filesystem containing files
created during Apply.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-12-12 10:18:39 +08:00
Maksym Pavlenko
98526c9d38 Exclude releases directory from links checker
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-12-10 12:15:53 -08:00
Samuel Karp
75f72d6272
Merge pull request #9456 from fuweid/enable-arm64
*: enable ARM64 runner
2023-12-10 05:59:22 +00:00
Maksym Pavlenko
f67c1632f5 Add ignore list for links
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-12-09 13:43:06 -08:00
Maksym Pavlenko
e740dd3d6b Add links status badge
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-12-09 13:09:39 -08:00
Maksym Pavlenko
bfa651c69f Fix broken links
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-12-09 13:09:39 -08:00
Maksym Pavlenko
c9fa5b9801 Add nighly job to verify doc links
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-12-09 12:43:53 -08:00
Derek McGowan
9e4d53df75
Merge pull request from GHSA-7ww5-4wqc-m92c
[main] deny /sys/devices/virtual/powercap
2023-12-08 11:35:49 -08:00
Phil Estes
4a6a5af8d0
Merge pull request #9486 from thaJeztah/release_dockerignore
release: add .dockerignore to fix repeated builds
2023-12-08 10:37:11 -05:00
Wei Fu
cb5a48e645 *: enable ARM64 runner
There are many Kubernetes clusters running on ARM64. Enable ARM64 runner
is to commit to support ARM64 platform officially.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-12-07 23:55:36 +08:00
Phil Estes
a68efb1bad
Merge pull request #9351 from thaJeztah/update_golang_1.21.4
update to go1.21.5, go1.20.12
2023-12-07 10:39:24 -05:00
Sebastiaan van Stijn
596ada3ac0
release: add .dockerignore to fix repeated builds
Ignore previous release-artifacts so that repeated builds rebuild them. Before
this patch, building the dockerfile multiple times would rebuild the binaries,
but would not produce a new release-artifact (`.tar.gz`), because the make
target would not trigger if the file was already present.

With this patch, existing release-artifacts are no longer copied into the
Dockerfile, which prevents this, as well as saving some time copying files
that won't be used.

In addition to the above, other excludes were copied from the .gitignore,
to prevent cache-busts.

I also added `.DS_Store` files to the ignore-file. These files are generated
on macOS when navigating the filesystem, and would cause the build to fail if
present, as well as invalidating the build-cache;

    docker buildx build --build-arg RELEASE_VER=main --build-arg UBUNTU_VERSION=22.04 --build-arg GO_VERSION=1.21.5 -f .github/workflows/release/Dockerfile -o releases/ .
    ...
     > [target 4/4] RUN     export GIT_STATUS_OUTPUT=$(git status --porcelain) &&   test -z $GIT_STATUS_OUTPUT || (echo $GIT_STATUS_OUTPUT && exit 1):
    0.118 ++ git status --porcelain
    1.405 + export 'GIT_STATUS_OUTPUT=?? .DS_Store
    1.405 ?? .github/.DS_Store
    ...
    1.407 + test -z gc .DS_Store gc .github/.DS_Store gc api/.DS_Store gc api/api/ gc api/runtime/.DS_Store gc api/services/.DS_Store gc api/types/.DS_Store gc archive/.DS_Store gc cmd/.DS_Store gc cmd/containerd-shim-runc-v2/.DS_Store gc cmd/containerd-shim-runc-v2/vendor/ gc cmd/containerd/.DS_Store gc cmd/ctr/.DS_Store gc content/.DS_Store gc contrib/.DS_Store gc contrib/ansible/.DS_Store gc contrib/seccomp/.DS_Store gc diff/.DS_Store gc docs/.DS_Store gc docs/historical/.DS_Store gc events/.DS_Store gc gc/.DS_Store gc images/.DS_Store gc images/converter/.DS_Store gc integration/.DS_Store gc integration/cri-api/.DS_Store gc integration/failpoint/.DS_Store gc integration/images/.DS_Store gc integration/remote/.DS_Store gc leases/.DS_Store gc metadata/.DS_Store gc metrics/.DS_Store gc metrics/cgroups/.DS_Store gc metrics/types/.DS_Store gc pkg/.DS_Store gc pkg/cri/.DS_Store gc pkg/oom/.DS_Store gc pkg/transfer/.DS_Store gc plugins/.DS_Store gc protobuf/.DS_Store gc releases/.DS_Store
    1.407 /bin/bash: line 1: test: too many arguments
    1.408 + echo gc .DS_Store gc .github/.DS_Store gc api/.DS_Store gc api/api/ gc api/runtime/.DS_Store gc api/services/.DS_Store gc api/types/.DS_Store gc archive/.DS_Store gc cmd/.DS_Store gc cmd/containerd-shim-runc-v2/.DS_Store gc cmd/containerd-shim-runc-v2/vendor/ gc cmd/containerd/.DS_Store gc cmd/ctr/.DS_Store gc content/.DS_Store gc contrib/.DS_Store gc contrib/ansible/.DS_Store gc contrib/seccomp/.DS_Store gc diff/.DS_Store gc docs/.DS_Store gc docs/historical/.DS_Store gc events/.DS_Store gc gc/.DS_Store gc images/.DS_Store gc images/converter/.DS_Store gc integration/.DS_Store gc integration/cri-api/.DS_Store gc integration/failpoint/.DS_Store gc integration/images/.DS_Store gc integration/remote/.DS_Store gc leases/.DS_Store gc metadata/.DS_Store gc metrics/.DS_Store gc metrics/cgroups/.DS_Store gc metrics/types/.DS_Store gc pkg/.DS_Store gc pkg/cri/.DS_Store gc pkg/oom/.DS_Store gc pkg/transfer/.DS_Store gc plugins/.DS_Store gc protobuf/.DS_Store gc releases/.DS_Store
    1.408 + exit 1
    1.408 gc .DS_Store gc .github/.DS_Store gc api/.DS_Store gc api/api/ gc api/runtime/.DS_Store gc api/services/.DS_Store gc api/types/.DS_Store gc archive/.DS_Store gc cmd/.DS_Store gc cmd/containerd-shim-runc-v2/.DS_Store gc cmd/containerd-shim-runc-v2/vendor/ gc cmd/containerd/.DS_Store gc cmd/ctr/.DS_Store gc content/.DS_Store gc contrib/.DS_Store gc contrib/ansible/.DS_Store gc contrib/seccomp/.DS_Store gc diff/.DS_Store gc docs/.DS_Store gc docs/historical/.DS_Store gc events/.DS_Store gc gc/.DS_Store gc images/.DS_Store gc images/converter/.DS_Store gc integration/.DS_Store gc integration/cri-api/.DS_Store gc integration/failpoint/.DS_Store gc integration/images/.DS_Store gc integration/remote/.DS_Store gc leases/.DS_Store gc metadata/.DS_Store gc metrics/.DS_Store gc metrics/cgroups/.DS_Store gc metrics/types/.DS_Store gc pkg/.DS_Store gc pkg/cri/.DS_Store gc pkg/oom/.DS_Store gc pkg/transfer/.DS_Store gc plugins/.DS_Store gc protobuf/.DS_Store gc releases/.DS_Store

Finally, I removed a redundant "echo", which causes (as seen above) the list
of uncommitted files to be printed twice (or three times even). We already print
the list of files, as well as print the `test -z` command that is executed, which
includes the list of files (`$GIT_STATUS_OUTPUT`). With this patch applied;

    6.307 + test -z gc .DS_Store gc .github/.DS_Store gc api/.DS_Store gc api/api/ gc api/runtime/.DS_Store gc api/services/.DS_Store gc api/types/.DS_Store gc archive/.DS_Store gc cmd/.DS_Store gc cmd/containerd-shim-runc-v2/.DS_Store gc cmd/containerd-shim-runc-v2/vendor/ gc cmd/containerd/.DS_Store gc cmd/ctr/.DS_Store gc content/.DS_Store gc contrib/.DS_Store gc contrib/ansible/.DS_Store gc contrib/seccomp/.DS_Store gc diff/.DS_Store gc docs/.DS_Store gc docs/historical/.DS_Store gc events/.DS_Store gc gc/.DS_Store gc images/.DS_Store gc images/converter/.DS_Store gc integration/.DS_Store gc integration/cri-api/.DS_Store gc integration/failpoint/.DS_Store gc integration/images/.DS_Store gc integration/remote/.DS_Store gc leases/.DS_Store gc metadata/.DS_Store gc metrics/.DS_Store gc metrics/cgroups/.DS_Store gc metrics/types/.DS_Store gc pkg/.DS_Store gc pkg/cri/.DS_Store gc pkg/oom/.DS_Store gc pkg/transfer/.DS_Store gc plugins/.DS_Store gc protobuf/.DS_Store gc releases/.DS_Store
    6.307 /bin/bash: line 1: test: too many arguments
    6.308 + echo 'git repository contains uncommitted changes'
    6.308 + exit 1
    6.308 git repository contains uncommitted changes

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-12-07 15:03:34 +01:00
Samuel Karp
148d21b1ae
Merge pull request #9480 from dmcgowan/fix-otel-http
Fix otel version incompatibility
2023-12-06 22:08:58 +00:00
Derek McGowan
cf4b57989d
Remove deprecated tracing function
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-12-06 11:20:31 -08:00
Derek McGowan
8203bb9977
Add HTTP client update function to tracing library
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-12-06 11:17:44 -08:00
Milas Bowman
ad3b806a4f
fix(tracing): use latest version of semconv
All components need to use a consistent `semconv` version or OTel
will emit errors about "cannot merge resource due to conflicting Schema URL".

Switch to the appropriate semconv version, which requires dropping
usage of `httpconv`. Instead, the upstream HTTP client hooks are
used directly. (The lower-level functions are no longer exported by
OTel.)

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2023-12-06 11:09:40 -08:00
Akihiro Suda
194a1fdd2c
Merge pull request #9473 from ktock/cni-plugins-1.4.0
go.mod: Bump up github.com/containernetworking/plugins to v1.4.0
2023-12-06 05:27:21 +00:00
Derek McGowan
3b46a41527
Merge pull request #9474 from lengrongfu/feat/upgrade-crun-version
upgrade crun version from 1.9 to 1.12
2023-12-06 04:53:40 +00:00
lengrongfu
22db60b6ba upgrade crun version from 1.9 to 1.12
Signed-off-by: lengrongfu <lenronfu@gmail.com>
2023-12-06 10:19:43 +08:00
Kohei Tokunaga
9937909693
go.mod: Bump up github.com/containernetworking/plugins to v1.4.0
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2023-12-06 10:29:44 +09:00
Sebastiaan van Stijn
734219a21a
update to go1.21.5, go1.20.12
go1.21.5 (released 2023-12-05) includes security fixes to the go command,
and the net/http and path/filepath packages, as well as bug fixes to the
compiler, the go command, the runtime, and the crypto/rand, net, os, and
syscall packages. See the Go 1.21.5 milestone on our issue tracker for
details:

- https://github.com/golang/go/issues?q=milestone%3AGo1.21.5+label%3ACherryPickApproved
- full diff: https://github.com/golang/go/compare/go1.21.4...go1.21.5

from the security mailing:

[security] Go 1.21.5 and Go 1.20.12 are released

Hello gophers,

We have just released Go versions 1.21.5 and 1.20.12, minor point releases.

These minor releases include 3 security fixes following the security policy:

- net/http: limit chunked data overhead

  A malicious HTTP sender can use chunk extensions to cause a receiver
  reading from a request or response body to read many more bytes from
  the network than are in the body.

  A malicious HTTP client can further exploit this to cause a server to
  automatically read a large amount of data (up to about 1GiB) when a
  handler fails to read the entire body of a request.

  Chunk extensions are a little-used HTTP feature which permit including
  additional metadata in a request or response body sent using the chunked
  encoding. The net/http chunked encoding reader discards this metadata.
  A sender can exploit this by inserting a large metadata segment with
  each byte transferred. The chunk reader now produces an error if the
  ratio of real body to encoded bytes grows too small.

  Thanks to Bartek Nowotarski for reporting this issue.

  This is CVE-2023-39326 and Go issue https://go.dev/issue/64433.

- cmd/go: go get may unexpectedly fallback to insecure git

  Using go get to fetch a module with the ".git" suffix may unexpectedly
  fallback to the insecure "git://" protocol if the module is unavailable
  via the secure "https://" and "git+ssh://" protocols, even if GOINSECURE
  is not set for said module. This only affects users who are not using
  the module proxy and are fetching modules directly (i.e. GOPROXY=off).

  Thanks to David Leadbeater for reporting this issue.

  This is CVE-2023-45285 and Go issue https://go.dev/issue/63845.

- path/filepath: retain trailing \ when cleaning paths like \\?\c:\

  Go 1.20.11 and Go 1.21.4 inadvertently changed the definition of the
  volume name in Windows paths starting with \\?\, resulting in
  filepath.Clean(\\?\c:\) returning \\?\c: rather than \\?\c:\ (among
  other effects). The previous behavior has been restored.

  This is an update to CVE-2023-45283 and Go issue https://go.dev/issue/64028.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-12-05 23:34:44 +01:00
Sebastiaan van Stijn
2122004525
update to go1.21.4, go1.20.11
go1.21.4 (released 2023-11-07) includes security fixes to the path/filepath
package, as well as bug fixes to the linker, the runtime, the compiler, and
the go/types, net/http, and runtime/cgo packages. See the Go 1.21.4 milestone
on our issue tracker for details:

- https://github.com/golang/go/issues?q=milestone%3AGo1.21.4+label%3ACherryPickApproved
- full diff: https://github.com/golang/go/compare/go1.21.3...go1.21.4

from the security mailing:

[security] Go 1.21.4 and Go 1.20.11 are released

Hello gophers,

We have just released Go versions 1.21.4 and 1.20.11, minor point releases.

These minor releases include 2 security fixes following the security policy:

- path/filepath: recognize `\??\` as a Root Local Device path prefix.

  On Windows, a path beginning with `\??\` is a Root Local Device path equivalent
  to a path beginning with `\\?\`. Paths with a `\??\` prefix may be used to
  access arbitrary locations on the system. For example, the path `\??\c:\x`
  is equivalent to the more common path c:\x.

  The filepath package did not recognize paths with a `\??\` prefix as special.

  Clean could convert a rooted path such as `\a\..\??\b` into
  the root local device path `\??\b`. It will now convert this
  path into `.\??\b`.

  `IsAbs` did not report paths beginning with `\??\` as absolute.
  It now does so.

  VolumeName now reports the `\??\` prefix as a volume name.

  `Join(`\`, `??`, `b`)` could convert a seemingly innocent
  sequence of path elements into the root local device path
  `\??\b`. It will now convert this to `\.\??\b`.

  This is CVE-2023-45283 and https://go.dev/issue/63713.

- path/filepath: recognize device names with trailing spaces and superscripts

  The `IsLocal` function did not correctly detect reserved names in some cases:

  - reserved names followed by spaces, such as "COM1 ".
  - "COM" or "LPT" followed by a superscript 1, 2, or 3.

  `IsLocal` now correctly reports these names as non-local.

  This is CVE-2023-45284 and https://go.dev/issue/63713.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-12-05 23:31:28 +01:00
Samuel Karp
d55bfab176
Merge pull request #9465 from ambarve/sn_cleanup
Don't block snapshot garbage collection on Remove failures
2023-12-05 21:33:43 +00:00
Fu Wei
9a7130d132
Merge pull request #9461 from kinvolk/rata/idmap
pkg/process: Check using idmap mount options too
2023-12-05 15:43:14 +00:00
Amit Barve
ad96fded4c Don't block snapshot garbage collection on Remove failures
If a snapshot removal fails (during garbage collection), the entire garbage collection operation is
cancelled. This is problematic because once cleanup of any snapshot fails no other snapshots will be cleaned
and the disk usage will just keep increasing.
Solution is to return snapshot removal errors wrapped as "ErrFailedPrecondition" errors. The garbage
collectors continues cleanup if the error is of this type.

Signed-off-by: Amit Barve <ambarve@microsoft.com>
2023-12-04 15:00:00 -08:00
Fu Wei
87bf39a7f5
Merge pull request #9445 from dmcgowan/update-contributing-root-packages
Add core and internal root packages to contributing
2023-12-04 18:22:14 +00:00
Rodrigo Campos
8bbce8d37f pkg/process: Check using idmap mount options too
The runtime-spec just merged this PR:
	https://github.com/opencontainers/runtime-spec/pull/1224

This means that it is now possible to request idmap mounts by specifying
"idmap" or "ridmap" in the mount options, without any mappings.

Let's add a check to see if they are requested in that way too.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-12-04 15:17:59 +01:00
Maksym Pavlenko
47163c3c00
Merge pull request #9391 from abel-von/sandbox-plugin-1117
sandbox: Move CRI Image Service and CRI Base seperate plugins
2023-12-01 22:42:22 +00:00
Maksym Pavlenko
40ec4b9bce
Merge pull request #9410 from ktock/continuity-0.4.3
go.mod: github.com/containerd/continuity v0.4.3
2023-12-01 22:41:30 +00:00
Maksym Pavlenko
63609d33ca
Merge pull request #9434 from abel-von/add-integration-test
sandbox: add cri integration test case for upgrade
2023-12-01 22:40:35 +00:00
Maksym Pavlenko
e2303c267e
Merge pull request #9414 from ZhangShuaiyi/fix/tomlext_MarshalText
tomlext.Duration add MarshalText method
2023-12-01 22:36:53 +00:00
Maksym Pavlenko
a1a8a666fd
Merge pull request #9430 from ktock/fsnotify-1.7.0
Bump up github.com/fsnotify/fsnotify to v1.7.0
2023-12-01 22:35:01 +00:00
Maksym Pavlenko
6f405e89f8
Merge pull request #9447 from dcantah/dial-grpc-shim-socket
runtime/v2: net.Dial gRPC shim sockets before trying grpc
2023-12-01 22:32:41 +00:00
Derek McGowan
96aaf5a3b2
Add core and internal root packages
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-12-01 11:26:25 -08:00
Abel Feng
c0363754fb sandbox: get runtime info from sandbox or container
For backward compatibility, we should get runtimeInfo from sandbox in
db, or get it from the sandbox container in db.
Note that this is a temporary solution and we will remove the Container field in
Sandbox in cri cache, and replace it with a SandboxInsantance of type
containerd.Sandbox interface.

Signed-off-by: Abel Feng <fshb1988@gmail.com>
2023-12-01 15:58:27 +08:00
Abel Feng
95d2a3b7c0 upgrade: add cri upgrade test case
Signed-off-by: Abel Feng <fshb1988@gmail.com>
2023-12-01 15:58:16 +08:00
Danny Canter
0bc9633414 runtime/v2: net.Dial gRPC shim sockets before trying grpc
This is mostly to workaround an issue with gRPC based shims after containerd
restart. If a shim dies while containerd is also down/restarting, on reboot
grpc.DialContext with our current set of DialOptions will make us wait for
100 seconds per shim even if the socket no longer exists or has no listener.

Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-11-30 19:37:43 -08:00
Kazuyoshi Kato
8459273f80
Merge pull request #9444 from AkihiroSuda/move-pkg-process
mv pkg/process cmd/containerd-shim-runc-v2/process
2023-12-01 00:08:34 +00:00
Derek McGowan
b8e32595ba
Merge pull request #8166 from laurazard/gzip-gstd-compression
Support gzip and zstd HTTP transport compression to fetch remote resources
2023-11-30 18:05:55 +00:00
Abel Feng
e1b4958663 sandbox: keep rootDir and stateDir compatible
Signed-off-by: Abel Feng <fshb1988@gmail.com>
2023-11-30 23:06:53 +08:00
Abel Feng
b0fef6738f sandbox: migrate sandbox_mode to sandboxer
Signed-off-by: Abel Feng <fshb1988@gmail.com>
2023-11-30 23:06:53 +08:00
Abel Feng
c8012b6d74 sandbox: make a clear dependency of cri plugins
Signed-off-by: Abel Feng <fshb1988@gmail.com>
2023-11-30 23:06:41 +08:00