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
jiaxiao zhou
200f788a0d
remove parent attribute in tracing macro
...
Signed-off-by: jiaxiao zhou <jiazho@microsoft.com>
2024-05-20 19:44:29 +00:00
jiaxiao zhou
1a905f4daf
remove instrument proc-macro and use cfg_attr instead
...
Signed-off-by: jiaxiao zhou <jiazho@microsoft.com>
2024-05-20 19:44:29 +00:00
jiaxiao zhou
cb1e5b1510
conditionally compile tracing behind a feature
...
Signed-off-by: jiaxiao zhou <jiazho@microsoft.com>
2024-05-20 19:44:29 +00:00
jiaxiao zhou
fee0c653af
add tracing macros
...
Signed-off-by: jiaxiao zhou <jiazho@microsoft.com>
2024-05-20 19:44:29 +00:00
James Sturtevant
c696ce477d
Release fix for cgroup parsing
...
Signed-off-by: James Sturtevant <jstur@microsoft.com>
2024-03-19 21:25:23 +00:00
Jiaxiao Zhou
6b9e5b28be
Update crates/shim/src/cgroup.rs
...
Co-authored-by: James Sturtevant <jsturtevant@gmail.com>
Signed-off-by: Jiaxiao Zhou <duibao55328@gmail.com>
2024-03-18 23:27:49 +00:00
jiaxiao zhou
69a7e651ea
cargo clippy
...
Signed-off-by: jiaxiao zhou <jiazho@microsoft.com>
2024-03-18 23:27:49 +00:00
jiaxiao zhou
f4753c3493
fix: make parse_cgroups_v2_path clearer
...
Signed-off-by: jiaxiao zhou <jiazho@microsoft.com>
2024-03-18 23:27:49 +00:00
jiaxiao zhou
a5613a27df
fix: more gracefully handle multiple lines in the cgroups file
...
Signed-off-by: jiaxiao zhou <jiazho@microsoft.com>
2024-03-18 23:27:49 +00:00
jiaxiao zhou
85a15724d0
fix(shim): rewrite cgroups v2 parsing logic
...
this commit rewrites the cgroups v2 parsing logic in get_cgroup function
which is used to fetch stats of a container. The reason for the rewrite
was that in some cases the original logic would panic due to index
of bound for parsing paths like
0::/kubepods-besteffort-pod162385e5_7f69_4c38_ba9c_db0a8f02b35e.slice:cri-containerd:278a0aac1fff30dfbc41b4a32ba9de4519928fe7480213dba87aa1498838ef34
we ran into this issue in deleting a spin container in the spin shim.
the rewrite replaces index access to properly propogate the error to
the caller of the function and added a few unit tests for the parsing logic.
Signed-off-by: jiaxiao zhou <jiazho@microsoft.com>
2024-03-18 23:27:49 +00:00
James Sturtevant
7591cb8ee7
Mark Error for windows only
...
Signed-off-by: James Sturtevant <jstur@microsoft.com>
2024-03-15 20:37:48 +00:00
James Sturtevant
31c28428d9
Run clippy and tests on sync code in containerd-shim
...
Signed-off-by: James Sturtevant <jstur@microsoft.com>
2024-03-15 20:37:48 +00:00
Maksym Pavlenko
66e513a449
Fix containerd shim
...
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-03-14 17:32:51 +00:00
James Sturtevant
798ab74d20
Release 0.7.0 of Shim and 0.5.0 of client
...
Signed-off-by: James Sturtevant <jstur@microsoft.com>
2024-03-13 19:20:17 +00:00
James Sturtevant
b15a1dd0c9
Transfer ownership of FD
...
Signed-off-by: James Sturtevant <jstur@microsoft.com>
2024-03-12 18:56:40 +00:00
dependabot[bot]
d32d023eb3
build(deps): update command-fds requirement from 0.2.1 to 0.3.0
...
Updates the requirements on [command-fds](https://github.com/google/command-fds ) to permit the latest version.
- [Commits](https://github.com/google/command-fds/compare/0.2.1...0.3.0 )
---
updated-dependencies:
- dependency-name: command-fds
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-03-12 18:56:40 +00:00
James Sturtevant
9c375635b6
Remove depreciated functions
...
Signed-off-by: James Sturtevant <jstur@microsoft.com>
2024-03-12 05:03:06 +00:00
James Sturtevant
0e7760806f
Use RUST_LOG env to configure logging if present
...
Signed-off-by: James Sturtevant <jstur@microsoft.com>
2024-03-06 20:28:03 +00:00
BaiQiuLi
3d4de340d8
Fix the issue of process freezing when there is a large amount of sigpipe signals occurring during containerd process restart.
...
Signed-off-by: BaiQiuLi <bo.qiuli@zte.com.cn>
2024-02-02 16:31:59 +00:00
jokemanfire
2236ba39d9
fmt modify
2024-01-03 19:59:52 +00:00
jokemanfire
a9f1dcf777
fmt modify
2024-01-03 19:59:52 +00:00
jokemanfire
9675c9a4ab
"Subsystem::Mem" add judge for the limit and swap
...
this error wiil ocurr
in containerd's TestUpdateContainerResources_MemoryLimit
2024-01-03 19:59:52 +00:00
dependabot[bot]
c43b1e4a41
build(deps): update windows-sys requirement from 0.48.0 to 0.52.0
...
Updates the requirements on [windows-sys](https://github.com/microsoft/windows-rs ) to permit the latest version.
- [Release notes](https://github.com/microsoft/windows-rs/releases )
- [Commits](https://github.com/microsoft/windows-rs/compare/0.48.0...0.52.0 )
---
updated-dependencies:
- dependency-name: windows-sys
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
2023-12-15 22:02:09 +00:00
James Sturtevant
fca511e235
Create v0.6.0 release of containerd-shim and shim-protos
...
Signed-off-by: James Sturtevant <jstur@microsoft.com>
2023-10-30 18:05:57 +00:00
James Sturtevant
74a67025ad
use process thread group id for the process
...
in cgroupv2 we should use the cgroups.proc file when adding a process (https://www.man7.org/linux/man-pages/man7/cgroups.7.html ). The add_tasks function was writing to the cgroup.threads file which is only avaliable when in threaded mode. In either case our intent is to add the process not the individual threads to we should use add_task_by_tgid. See https://github.com/kata-containers/cgroups-rs/pull/104 for when this was added
Signed-off-by: James Sturtevant <jstur@microsoft.com>
2023-10-25 02:13:26 +00:00
James Sturtevant
11a6559c39
Updates cgroup rs to latest version
...
Signed-off-by: James Sturtevant <jstur@microsoft.com>
2023-10-25 02:13:26 +00:00
James Sturtevant
e31b3c634f
fix up windows
...
Signed-off-by: James Sturtevant <jstur@microsoft.com>
2023-10-11 20:13:32 +00:00
James Sturtevant
f446bdb64d
Add support for structured logging
...
Signed-off-by: James Sturtevant <jstur@microsoft.com>
2023-10-11 20:13:32 +00:00
Maksym Pavlenko
e8ad07d5fd
Update nix crate
...
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-10-05 11:37:27 -07:00