Commit Graph

209 Commits

Author SHA1 Message Date
jokemanfire 45387cd5e6 fix(cgroup) : fix cgroup update if cgroup path is release
avoid update cgroup path if init process cgroup is release

Signed-off-by: jokemanfire <hu.dingyang@zte.com.cn>
2025-08-22 21:48:53 +00:00
胡丁洋10346053 7259c1ce28 fix(shim): Under certain extreme conditions, the kill cannot be completed
Let kill call in single task for not holding the lock.
2025-08-15 06:01:32 +00:00
jokemanfire 6b81286549 Fix: update cgroups-rs for fix a bug
bug ref:
7d4d4579a3

Signed-off-by: jokemanfire <hu.dingyang@zte.com.cn>
2025-08-02 22:43:43 +00:00
zzzzzzzzzy9 ae58ea3aed shim/loop-dev: fix setup_loop_dev returned error 2025-07-30 15:26:29 +00:00
Fabiano Fidêncio 13ebc83b25 Bump shim crate to 0.10.0
Signed-off-by: Fabiano Fidêncio <fidencio@northflank.com>
2025-07-18 22:00:07 +00:00
Fabiano Fidêncio 608f5f0dc3 Update shim dependency
Signed-off-by: Fabiano Fidêncio <fidencio@northflank.com>
2025-07-18 21:44:27 +00:00
Tim Zhang d8f28555b5 shim/loop-dev: fix variable undefined error for musl
Fixes: #413

Signed-off-by: Tim Zhang <tim@hyper.sh>
2025-07-18 10:24:34 -07:00
Tim Zhang 884ba3d6e1 shim: re-impl Events trait for async RemotePublisher
Fixes: https://github.com/containerd/rust-extensions/pull/318/files#r2212454388

Signed-off-by: Tim Zhang <tim@hyper.sh>
2025-07-17 11:16:54 +00:00
Maksym Pavlenko 333a23c22b
Bump shim crate to 0.9
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2025-07-16 14:22:02 -07:00
Maksym Pavlenko b5346f5390
Update shim dependency
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2025-07-16 14:15:25 -07:00
jinda.ljd 0e4ff0c5da truncate backing file path exceeding 64 bytes in LoopInfo
When the backing file path exceeds 64 bytes, an 'out of range' error occurs due to the limitation of the `file_name` field in `LoopInfo`. This commit truncates the file path to ensure it does not exceed the maximum supported length, preventing the error while maintaining usability.

Signed-off-by: jinda.ljd <jinda.ljd@alibaba-inc.com>
2025-07-15 02:56:39 +00:00
zzzzzzzzzy9 afab3c8eba add some test for mount_rootfs and umount_recursive and setup_loop
Signed-off-by: zzzzzzzzzy9 <zhang.yu58@zte.com.cn>
2025-07-07 04:51:59 +00:00
zzzzzzzzzy9 11e97809b8 support loop-dev mount in mount_rootfs
Signed-off-by: zzzzzzzzzy9 <zhang.yu58@zte.com.cn>
2025-07-07 04:51:59 +00:00
zzzzzzzzzy9 15fbabcf8e Unmount the mount point of the container when the container is deleted.
Signed-off-by: zzzzzzzzzy9 <zhang.yu58@zte.com.cn>
2025-07-07 04:51:59 +00:00
zzzzzzzzzy9 6aa801807e move mount to mount_linux and mount_other
Signed-off-by: zzzzzzzzzy9 <zhang.yu58@zte.com.cn>
2025-07-07 04:51:59 +00:00
Bryant Biggs 8469d6d7a8 chore: Bump ttrpc-codegen as well 2025-06-11 00:13:54 +00:00
Jorge Prendes 8130e41939 remove dependency on signal-hook-tokio
Signed-off-by: Jorge Prendes <jorge.prendes@gmail.com>
2025-04-10 16:27:31 +00:00
Jorge Prendes 18fcf6bc52 remove unused dependencies
Signed-off-by: Jorge Prendes <jorge.prendes@gmail.com>
2025-03-19 23:27:16 +00:00
Jorge Prendes 277a1a65f2 use windows activation strategy on async code
Signed-off-by: Jorge Prendes <jorge.prendes@gmail.com>
2025-03-19 23:27:16 +00:00
Jorge Prendes df1b8f05dd use windows activation strategy on all platforms in sync code
Signed-off-by: Jorge Prendes <jorge.prendes@gmail.com>
2025-03-19 23:27:16 +00:00
Jorge Prendes 35980682a6 Consolidate the NamedPipeLogger into the FifoLogger
Signed-off-by: Jorge Prendes <jorge.prendes@gmail.com>
2025-03-19 23:25:14 +00:00
Jiaxiao (mossaka) Zhou 8fba47295b feat(shim): make logger module public
Downstream shim implementations can use this module to setup logger by
themselves. One example is runwasi's container process needs to use this
module to setup logger so that logs from the container process can be
populated to containerd.

Signed-off-by: Jiaxiao (mossaka) Zhou <duibao55328@gmail.com>
2025-02-25 23:17:12 +00:00
jokemanfire 906bd0f466 Update publisher err deal.
ref:https://github.com/containerd/ttrpc-rust/pull/259
Due to the inclusion of the latest version of ttrpc, this part of the code has been updated

Signed-off-by: jokemanfire <hu.dingyang@zte.com.cn>
2025-02-24 18:54:43 +00:00
Maksym Pavlenko c016d933ed
Bump shim crate version to 0.8
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2025-01-28 11:59:33 -08:00
Maksym Pavlenko 2d999680fe
Fix publish?
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2025-01-28 11:49:18 -08:00
jokemanfire e5db241747 Fix complie error
1. update ttrpc version
2. proto3 syntax  "To define 'optional' fields in Proto3, simply remove the 'optional' label, as fields are 'optional' by default"
3. compile fail because "required for the cast from `Arc<std::boxed::Box<<T as asynchronous::Shim>::T>>` to `Arc<(dyn containerd_shim_protos::shim_async::Task + std::marker::Send + Sync + 'static)>`"

Signed-off-by: jokemanfire <hu.dingyang@zte.com.cn>
2025-01-27 20:08:08 +00:00
jokemanfire 545b0e789e Add info for get runtimeinfo
This interface is already in goshim.
Use containerd-shim-runc-v2 --info.

Signed-off-by: jokemanfire <hu.dingyang@zte.com.cn>
2025-01-27 20:06:12 +00:00
Maksym Pavlenko 2cb7714e76 Fix CI
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2025-01-16 19:22:09 +00:00
jokemanfire feac9615e1 Fix publisher debug info is not correct
In the containerd log, it is not print correct
2025-01-06 10:52:50 -08:00
fengwei0328 1e17e1495e The task_dir successfully cleans when the file is absent
Signed-off-by: fengwei0328 <feng.wei8@zte.com.cn>
2024-12-06 18:54:16 +00:00
Lei Liu 2689bbf250 Ignore notFound error when collect from pid cgroup
When `pids.current` or `pids.max` not exist in cgroup root
(/sys/fs/cgroup/pids/) collect_metrics will print out error level
log "...unable to read a control group file /sys/fs/cgroup/pids/./
pids.current..." continually, this commit will ignore these not
found errors.

As a supplement,if or not set pids.current file in cgroup controller
root directory decided by `CFTYPE_NOT_ON_ROOT` flag, in many commen
environment it is default to enabled. And as a contrast, go version
code will ignore all not found error when collect cgroupv1 metrics:
b67a788072/runtime/v2/runc/task/service.go (L625)

Co-authored-by: Yukiteru <wfly1998@gmail.com>

Signed-off-by: Lei Liu <liulei.pt@bytedance.com>
2024-11-05 19:33:58 +00:00
yummyMax 7c01662306 change socket path
Some containerd test use shim.SocketAddress directly.
So for Goshim-compatible socket path

Signed-off-by: yummyMax <yu.sihui@zte.com.cn>
2024-10-30 23:15:24 +00:00
jokemanfire 6cb625da04 <rshim>Improve the events report
1.add timeout in ctx
2.add queue in publisher report
3.add reconnect client method
2024-10-30 23:14:55 +00:00
Lei Liu c22dba6201 fix: remove meaningless input from other_error macro
Signed-off-by: Lei Liu <liulei.pt@bytedance.com>
2024-10-30 00:05:16 +00:00
Bryant Biggs 3f541b9454 fix: All unused re-export to pass clippy 2024-10-05 14:55:48 +00:00
Bryant Biggs ece6516da5 fix: Switch `write` to `write_all` to consume 2024-10-05 14:55:48 +00:00
Bryant Biggs 6f2812f4b8 fix: Correct lint warnings, bump toolchain version due to `cargo::key=value` build directive which is reserved for future use 2024-10-05 14:55:48 +00:00
Maksym Pavlenko 4b8bd82ea9 Bump shim protos and fix dependencies
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-10-04 11:57:47 -07:00
Maksym Pavlenko 4e60e8a6fa Bump containerd shim to 0.7.4
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-10-04 11:30:19 -07:00
Maksym Pavlenko 202c756d26 Fix shim dependency to shim-protos and bump to 0.7.3
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-10-03 11:50:13 -07:00
Maksym Pavlenko 32f8deb6e4 Bump shim-protos to 0.7.1 and shim to 0.7.2
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-10-03 11:26:35 -07:00
Maksym Pavlenko 6f2a8c1894 Fix crates that depend on new ttrpc
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-10-03 18:11:07 +00:00
张钰10307750 b308d13c28 add pid to delete response 2024-08-02 16:21:03 +00:00
Bryant Biggs 765111e3b1 fix: Correct clippy lint suggestion part tres 2024-07-30 16:54:34 +00:00
Bryant Biggs 150ec63cbc fix: Correct clippy lint suggestion 2024-07-30 16:54:34 +00:00
Bryant Biggs 303b2e3009 chore: Fix cargo deny failed checks and de-duplicate crates using workspace shared dependency 2024-07-30 16:54:34 +00:00
dependabot[bot] cecfee80b3 build(deps): update mio requirement from 0.8 to 1.0
Updates the requirements on [mio](https://github.com/tokio-rs/mio) to permit the latest version.
- [Release notes](https://github.com/tokio-rs/mio/releases)
- [Changelog](https://github.com/tokio-rs/mio/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tokio-rs/mio/compare/v0.8.0...v1.0.0)

---
updated-dependencies:
- dependency-name: mio
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-17 20:20:36 +00:00
jingxu.zm 6b225fb414 monitor_notify_by_pid may be blocked by send msg to channel because bounded channel is full(but monitor lock has not be freed), on the other hand,monitor_unsubscribe may block because monitor lock is holded by the monitor_notify_by_pid 2024-06-05 00:35:05 +00:00
Yuhang Wei e69120e6db docs: fix broken links
Signed-off-by: Yuhang Wei <weiyuhang2011@126.com>
2024-05-29 23:33:58 +00:00
zzzzzzzzzy9 dafb1b6735 fix(overlay): If there are a large number of overlay layers, the container cannot be started 2024-05-28 22:14:28 +00:00