Commit Graph

277 Commits

Author SHA1 Message Date
ningmingxiao
ed2e81a78e bugfix:sync parent dir to ensure blob entry is reliably stored
Signed-off-by: ningmingxiao <ning.mingxiao@zte.com.cn>
2025-10-11 20:22:14 +08:00
Aadhar Agarwal
773bfa0eae Use tartest to simplify generating a tar
Signed-off-by: Aadhar Agarwal <aadagarwal@microsoft.com>
2025-10-08 21:35:19 +00:00
Aadhar Agarwal
6a3b10fe76 Add a test for the erofs differ using tar index mode
Signed-off-by: Aadhar Agarwal <aadagarwal@microsoft.com>
2025-10-08 21:35:16 +00:00
Derek McGowan
e2157e37df Merge pull request #12345 from dmcgowan/fix-sandbox-controller-dependencies
Fix sandbox controller dependencies
2025-10-03 20:46:33 +00:00
Derek McGowan
843aee8d3f Merge pull request #12342 from dmcgowan/fix-sandbox-client
Fixes for sandbox client
2025-10-03 20:39:45 +00:00
Fu Wei
61ddcd5372 Merge pull request #12063 from dmcgowan/mount-manager
Add mount manager
2025-10-03 14:01:38 +00:00
Derek McGowan
c69f443ba8 Update sandbox controllers service implicit dependency
The sandbox controller should only error out if it cannot find any
sandbox controllers. If it requires the pod sandbox controller to be
initialized, that creates an implicit dependency on all CRI plugins
being initialized. The sandbox controller API can be used without CRI
and therefore should not have this dependency.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-10-02 16:49:39 -07:00
Derek McGowan
637429a252 Update logging for sandbox controller service
Add more details and differentiate log line from sandbox store calls

Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-10-01 17:14:16 -07:00
Derek McGowan
aba772012a Add debug logs to mount service calls
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-09-29 17:08:32 -07:00
Derek McGowan
d23e635a5c Fix mount manager plugin when no handlers provided
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-09-29 17:08:32 -07:00
Derek McGowan
8db3010865 Add mounts api service
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-09-29 17:08:31 -07:00
Rehan Khan
33e6b79fc0 Fix device mapper suspend/resume flakyness
Signed-off-by: Rehan Khan <Rehan.Khan7@ibm.com>
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
2025-09-24 01:37:36 +08:00
Derek McGowan
ed03f3a710 Add mount manager plugin and types
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-09-18 17:08:43 -07:00
Derek McGowan
37cec68004 Move transaction context to boltutil
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-09-18 17:08:42 -07:00
Enji Cooper
f45716efed Clean up issues cited by usetesting package with golangci
This commit makes all of the recommended changes to use the `testing`
package helper functions instead of doing the equivalent longhand
versions of the same thing.

This change was needed in order to properly detect errors, as the code
would previously skip running `tenv` stating that it had been deprecated
in favor of `usetesting`.

Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>
2025-09-07 14:07:40 -07:00
Maksym Pavlenko
f4dfa9968b Merge pull request #12168 from ningmingxiao/fix_lastCollection
gc:make sure lastCollection is not nil
2025-09-02 00:15:10 +00:00
ningmingxiao
683cd7d60d gc:make sure lastCollection is not nil
Signed-off-by: ningmingxiao <ning.mingxiao@zte.com.cn>
2025-09-01 10:48:38 +08:00
Amit Barve
009625290b Block CIM snapshotter & differ
Add new snapshotter & differ plugins that can leverage the block CIM layer writers to
store pulled/imported images in the block CIM format.

Signed-off-by: Amit Barve <ambarve@microsoft.com>
2025-07-30 14:46:59 -04:00
Akihiro Suda
a92d8700bf Merge pull request #12085 from akhilerm/pause-3.10.1
update pause image to pause:3.10.1
2025-07-15 06:12:20 +00:00
Akhil Mohan
222b2d3e72 update pause image to pause:3.10.1
Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
2025-07-11 11:29:02 +05:30
Gao Xiang
e96ebc0085 erofs-snapshotter: make IMMUTABLE_FL optional
Enabling the IMMUTABLE_FL file attribute causes dirty data to be
flushed synchronously at least on EXT4, which can greatly impact
container launch performance.  In contrast, the overlayfs snapshotter
does not use syncfs by default.

Most users may not need IMMUTABLE_FL, let's make IMMUTABLE_FL optional
to align with the behavior of the overlayfs snapshotter and recover the
original performance.

1. tensorflow

Test commands:
$ nerdctl image pull --snapshotter=X --unpack="false" tensorflow/tensorflow:2.19.0
$ time nerdctl container --snapshotter=X run -d tensorflow/tensorflow:2.19.0 /bin/sh

Results:
 overlayfs                 | 0m18.748s
 erofs (no IMMUTABLE_FL)   | 0m10.090s
 erofs (with IMMUTABLE_FL) | 0m21.074s

2. ubuntu 22.04

Test commands:
$ nerdctl image pull --snapshotter=X --unpack="false" ubuntu:22.04
$ time nerdctl container --snapshotter=X run -d ubuntu:22.04 /bin/sh

Results:
 overlayfs                 | 0m1.147s
 erofs (no IMMUTABLE_FL)   | 0m0.795s
 erofs (with IMMUTABLE_FL) | 0m1.094s

Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
2025-07-11 02:56:37 +08:00
Aadhar Agarwal
b641933cfa erofs snapshotter: Add tar index mode
Signed-off-by: Aadhar Agarwal <aadagarwal@microsoft.com>

Minor style updates to erofs.md and differ_linux.go

Signed-off-by: Aadhar Agarwal <aadagarwal@microsoft.com>

Add use case for tar index in erofs.md

Signed-off-by: Aadhar Agarwal <aadagarwal@microsoft.com>
2025-07-08 21:44:49 +00:00
Fabiano Fidêncio
e0d733c871 blockfile: Ensure required options are always set
When using blockfile snapshotter and passing specific filesystem mount
options, the users may be caught by surprise by the fact that some
options are required but not documented anywhere.

The easiest way to solve this is by ensuring that the "loop" required
option is always added to the mount options.

Signed-off-by: Fabiano Fidêncio <fidencio@northflank.com>
2025-07-07 22:32:07 +02:00
Akihiro Suda
6fa6aa9b38 Merge pull request #12046 from erofs/erofs-snapshotter
erofs-differ: fix filesystem UUID for tar-converted layers
2025-07-02 15:06:19 +00:00
Gao Xiang
a0ed14fd48 erofs-differ: fix filesystem UUID for tar-converted layers
Derive filesystem UUIDs (`lsblk -o +UUID`) from the OCI layer digests
(although diffIDs are better in principle, but they're unavailable by
differs in advance) rather than generating a random one.  This allows
EROFS to uniquely identify each layer using the content-addressable
filesystem UUID.

It can also be used for reproducible builds. To achieve this, configure
`mkfs_options` with `-T0 --mkfs-time` (However, `--mkfs-time` requires
erofs-utils 1.8+; Otherwise, all inode timestamps will be reset w/o it):

``` toml
  [plugins."io.containerd.differ.v1.erofs"]
    mkfs_options = ["-T0 --mkfs-time"]
```

Fixes: c73c8e5d52 ("Introduce EROFS differ")
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
2025-07-02 08:25:50 +08:00
yashsingh74
03a44a2d7c fix: Used nolint to ignore the static checks
Signed-off-by: yashsingh74 <yashsingh1774@gmail.com>
2025-06-18 14:16:41 +05:30
yashsingh74
b3eec6d8e9 fix: ST1005: error strings should not end with punctuation or newlines
Signed-off-by: yashsingh74 <yashsingh1774@gmail.com>
2025-06-18 14:16:41 +05:30
yashsingh74
56516173d0 fix: QF1002: could use tagged switch on host (staticcheck)
Signed-off-by: yashsingh74 <yashsingh1774@gmail.com>
2025-06-18 14:16:40 +05:30
Fu Wei
280c7c6fcf Merge pull request #11934 from erofs/erofs-snapshotter
erofs-snapshotter: fix to work with wrapped errors
2025-06-04 02:04:15 +00:00
Gao Xiang
a8658a7081 erofs-snapshotter: fix to work with wrapped errors
Commit fb6dd2cf15 ("client:improve mount error message") changed
the return value into a wraped error message, which causes the
ENOTBLK check doesn't work.

Reported-by: Aadhar Agarwal <aadagarwal@microsoft.com>
Fixes: https://github.com/containerd/containerd/pull/11861
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
2025-06-04 07:34:19 +08:00
Derek McGowan
4f7c69ae67 Update differ selection in transfer service to prefer default
Currently the erofs differ will be chosen and cause pulls to fail with
not implemented errors.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-06-02 22:54:30 -07:00
Derek McGowan
21f0595b9b Add debug log when transfer returns not implemented
Currently the error details are not included in the output error and
there is no log. One of the reasons a the transferer was skipped could
be do to a specific component which is not implemented (such as trying
to use erofs differ) or unsupported image (pulling schema1). This
information is useful to find a bad configuration.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-06-02 22:50:00 -07:00
Henry Wang
1282299751 Enable DuplicationSuppressor in transfer service
Signed-off-by: Henry Wang <henwang@amazon.com>
2025-05-29 22:28:43 +00:00
Gao Xiang
5f2200b2c7 erofs-differ: fix EROFS native image support
A dumb bug was just found after I worked out a usable native
converter [1], instead of relying on some prebuilt image..

[1] https://github.com/erofs/erofs-container-toolkit
Signed-off-by: Gao Xiang <xiang@kernel.org>
2025-05-14 07:31:56 +08:00
Phil Estes
c213879967 Merge pull request #11770 from azr/log-fetch-parameters
fix multipart layer fetch in client: pass config down
2025-05-05 12:51:17 +00:00
Adrien Delorme
e2d6a71605 cri: put limiter out of config
Signed-off-by: Adrien Delorme <azr@users.noreply.github.com>
2025-05-04 20:33:35 +02:00
Mike Brown
5f3f84f567 removes use of klog from containerd repo
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2025-05-02 13:34:46 +00:00
Adrien Delorme
ca356e46ee cri: add a ConcurrentDownloadLimiter
Signed-off-by: Adrien Delorme <azr@users.noreply.github.com>
2025-04-30 10:20:26 +02:00
Adrien Delorme
413702b7e4 fix comment
Signed-off-by: Adrien Delorme <azr@users.noreply.github.com>
2025-04-30 10:20:26 +02:00
Fu Wei
ef7bdf18a1 Merge pull request #10177 from azr/azr/parallel-layer-fetch
Multipart layer fetch
2025-04-24 20:35:00 +00:00
Phil Estes
25d1d30e6c Merge pull request #11744 from dmcgowan/unpack-rootfs-types
Add support for unpacking custom media types
2025-04-24 14:11:00 +00:00
Adrien Delorme
72c8c7708c only keep one setting: concurrent_layer_fetch_buffer
Signed-off-by: Adrien Delorme <azr@users.noreply.github.com>
2025-04-24 11:41:33 +02:00
Adrien Delorme
88116b1911 remove max_dl_operations setting
Signed-off-by: Adrien Delorme <azr@users.noreply.github.com>
2025-04-24 11:39:42 +02:00
Adrien Delorme
f9af08820b perf(pull): multipart layer fetch
Signed-off-by: Adrien Delorme <azr@users.noreply.github.com>
Co-Authored-By: Corentin REGAL <143578+co42@users.noreply.github.com>
2025-04-24 11:39:42 +02:00
Derek McGowan
cdd7ec40db Support configuring custom media types for unpack
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-04-23 21:19:07 -07:00
Maksym Pavlenko
d983c186f5 Merge pull request #11733 from erofs/erofs-layers
erofs-differ: support EROFS native image layers
2025-04-23 23:33:23 +00:00
Derek McGowan
116b98704b Merge pull request #8515 from fangn2/cri-image-transfer
Update CRI to use transfer service for image pull by default
2025-04-23 22:58:12 +00:00
Maksym Pavlenko
1f70f07480 Merge pull request #11729 from dmcgowan/erofsutils-internal
Move erofsutils to internal
2025-04-23 19:26:25 +00:00
Tony Fang
b694be29a0 Update CRI image service to pull using transfer service
- adds a transfer service progress reporter to handle timeouts. Also other test fixes
- fallback to local image pull when configuration conflict

Signed-off-by: Tony Fang <nhfang@amazon.com>

Co-authored-by: Swagat Bora <sbora@amazon.com>
2025-04-23 18:18:27 +00:00
Gao Xiang
2f9734fa59 erofs-differ: support EROFS native image layers
If the layer media type is expected as an EROFS native layer (ending
with `.erofs`), copy the content as the layer blob.

Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
2025-04-24 00:26:37 +08:00