Commit Graph

174 Commits

Author SHA1 Message Date
yuqitao fdd5d7c7d1 synchronous: supprt more overlayfs layers
Signed-off-by: yuqitao <yuqitao1024@qq.com>
2022-05-27 15:27:08 +08:00
Maksym Pavlenko cfe09e2227 Update nix dependency
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-05-05 14:55:34 -07:00
Yuna Tomida f9ae07236d
removed unsafe codes on runc client and shim
Signed-off-by: Yuna Tomida <ytomida.mmm@gmail.com>
2022-05-04 15:39:41 +09:00
Maksym Pavlenko 83dec597de Remove docs.rs badge from runc-shim
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-05-03 13:59:15 -07:00
dependabot[bot] 9193b476c2
build(deps): update uuid requirement from 0.8.2 to 1.0.0
Updates the requirements on [uuid](https://github.com/uuid-rs/uuid) to permit the latest version.
- [Release notes](https://github.com/uuid-rs/uuid/releases)
- [Commits](https://github.com/uuid-rs/uuid/compare/0.8.2...1.0.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-20 21:37:17 +00:00
Maksym Pavlenko 497f88ca86 Update proto dependencies
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-04-06 09:19:21 -07:00
Feng Shaobao df87a63c8e add exit-signal for container
to exit io copy tasks when deleting container

Signed-off-by: Feng Shaobao <fshb1988@gmail.com>
2022-03-22 14:47:41 +08:00
Feng Shaobao 93cc73cf9b upgrade rust toolchain version to 1.59
the dependent path-dedot crate updated to rust edition 2021, we have to
upgrade out toolchain version to compile

Signed-off-by: Feng Shaobao <fshb1988@gmail.com>
2022-03-18 17:26:24 +08:00
Feng Shaobao 63a4e5c891 fix tokio not exit and signal handle exit issue
make all integartion tests passed

Signed-off-by: Feng Shaobao <fshb1988@gmail.com>
2022-03-18 12:39:36 +08:00
Feng Shaobao b48cc3d993 add update/stats/pids for async
Signed-off-by: Feng Shaobao <fshb1988@gmail.com>
2022-03-16 10:07:31 +08:00
Maksym Pavlenko b3ac82d9cc Fix badges
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-03-10 16:18:47 -08:00
Maksym Pavlenko 21e298aef3 Bump versions
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-03-10 15:58:28 -08:00
Maksym Pavlenko 70c7f85b45 Update runc shim README
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-03-10 15:49:59 -08:00
Maksym Pavlenko 80e6588c53 Fix runtime name for integration tests
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-03-10 15:24:10 -08:00
Maksym Pavlenko d7ceb45072 [runc-shim] Implement Connect
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-03-10 09:42:10 -08:00
Zhang Tianyang 2fd561e290 runc-shim: support remote publisher and extra some common methods
Signed-off-by: Zhang Tianyang <burning9699@gmail.com>
2022-03-10 17:23:50 +08:00
Zhang Tianyang 3ff1fc0a6d bugfix: return a tmp dir when 'XDG_RUNTIME_DIR' was not set
Signed-off-by: Zhang Tianyang <burning9699@gmail.com>
2022-03-09 23:46:47 +08:00
Zhang Tianyang 74ac192726 runc-shim: implement ShimExecutor in synchronous version
Signed-off-by: Zhang Tianyang <burning9699@gmail.com>
2022-03-09 21:17:26 +08:00
Maksym Pavlenko 6bc49c007c
Merge pull request #50 from abel-von/add-async-runc
[runc-shim] support of async runc shim
2022-03-08 12:58:18 -08:00
Feng Shaobao 1e1a6a8d97 change Executor to Spawner and make it trait object 2022-03-08 15:39:43 +08:00
Maksym Pavlenko c0baac598f [Client] Bump to 0.2.0
Close: #54

Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-03-07 11:09:02 -08:00
Feng Shaobao cdc78f7760 split async and sync codes for runc-shim and shim
Signed-off-by: Feng Shaobao <fshb1988@gmail.com>
2022-03-07 22:34:51 +08:00
Feng Shaobao 777fe2ad23 support async feature for runc shim
Signed-off-by: Feng Shaobao <fshb1988@gmail.com>
2022-03-07 16:38:19 +08:00
Feng Shaobao 01f4916f95 shim: Support async traits and helper functions
Signed-off-by: Feng Shaobao <fshb1988@gmail.com>
2022-03-07 15:33:49 +08:00
Maksym Pavlenko 3aa4a4da77
Merge pull request #48 from Burning1020/shim-cgroup
runc-shim: support shim cgroup and oom score
2022-03-05 14:50:42 -08:00
Zhang Tianyang 4e1c3a2a69 runc-shim: support shim cgroup and oom score
Signed-off-by: Zhang Tianyang <burning9699@gmail.com>
2022-03-04 15:47:29 +08:00
Zhang Tianyang fda23cd59f shim: refine set subreaper
Signed-off-by: Zhang Tianyang <burning9699@gmail.com>
2022-03-03 20:46:01 +08:00
Zhang Tianyang a06ec3df2d runc-shim: implement pids task
Signed-off-by: Zhang Tianyang <burning9699@gmail.com>
2022-03-01 19:04:12 +08:00
Zhang Tianyang 3ffe778e4b runc-shim: implement close io task
Signed-off-by: Zhang Tianyang <burning9699@gmail.com>
2022-03-01 19:02:31 +08:00
Zhang Tianyang dd90a9180f runc: Set piped stdio as default
Signed-off-by: Zhang Tianyang <burning9699@gmail.com>
2022-02-28 21:36:03 +08:00
Zhang Tianyang cdb93f2358 runc-shim: implement update task
Signed-off-by: Zhang Tianyang <burning9699@gmail.com>
2022-02-27 18:12:33 +08:00
Zhang Tianyang 9b93f39ee1 runc-shim: implement stats task
Signed-off-by: Zhang Tianyang <burning9699@gmail.com>
2022-02-27 18:12:33 +08:00
Maksym Pavlenko c630c56e57
Merge pull request #41 from mxpv/exit
Rework exit signals and task creation
2022-02-25 12:30:37 -08:00
Maksym Pavlenko fa0d72f516 Fix clippy warnings
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-02-24 11:46:22 -08:00
Maksym Pavlenko 996c8e6aa8 Rework exit signal and task creation
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-02-24 11:32:34 -08:00
Liu Jiang 33e940b9c8 runc: refine the way to setup Io
Refine the way to setup Io drivers for runC.

The capability to capture output/error messages from runc depends on
the Io driver used. Some add two more Io drivers: InheritedStdIo and
PipedStdIo. Also document whether the Io driver supports capturing
output/error messages.

Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>
2022-02-24 18:47:08 +08:00
Liu Jiang 41c2083eac runc: simple syntax improvments
Simple syntax only improvements.

Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>
2022-02-24 18:46:38 +08:00
Liu Jiang fc50adf2dc runc: implement sync version of ps() and stats()
Implement sync version of ps() and stats().

Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>
2022-02-24 18:46:37 +08:00
Liu Jiang 95cda30597 runc: fix two bugs in preparing command line arguments
1) it should use "runc resume" instead of "runc pause" for resume()
2) the order of arguments to run() is wrong, other options may appear
   between "--bundle" and "bundle_id".

Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>
2022-02-24 18:46:36 +08:00
Liu Jiang 6c6fa1ac09 runc: make async version of Runc::create() to return Response
Make async version of Runc::create() to return `Response` instead of
`()`, to keep symmetry with sync version.

Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>
2022-02-24 18:46:35 +08:00
Liu Jiang f5f18ec52b runc: avoid unwrap() in runc::launch()
In runc::launch(), it does
        let stdout = String::from_utf8(result.stdout).unwrap();
        let stderr = String::from_utf8(result.stderr).unwrap();

This is risk of DoS attack because the content result.stdout/sterr may
contain contents generated by the container, so it may contain malicious
non-UTF8 characters.

Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>
2022-02-24 18:46:33 +08:00
Maksym Pavlenko fa766d4e75
Merge pull request #38 from Burning1020/fix-files-leak 2022-02-23 15:47:37 -08:00
Zhang Tianyang b08e4090ea runc: fix bug that exec command leaks files
Signed-off-by: Zhang Tianyang <burning9699@gmail.com>
2022-02-23 21:16:16 +08:00
Liu Jiang 43f4702b7a shim-proto: group common proto types into types
Group generated soruce files for common protobuf source files into
src/types, also simplify the build.rs.

Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>
Signed-off-by: Quanwei Zhou <quanweiZhou@linux.alibaba.com>
2022-02-23 16:39:09 +08:00
Maksym Pavlenko 78521c80bf Remove runc dependency from shim crate
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-02-21 10:26:19 -08:00
Maksym Pavlenko a1b2a25987 Update Cargo.toml for runc-shim
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-02-21 09:59:16 -08:00
Maksym Pavlenko 03496c936b
Merge pull request #34 from quanweiZhou/develop
support async for containerd-shim-protos
2022-02-21 09:52:01 -08:00
Quanwei Zhou c4471c4cbf shim-proto: add async example
Fixes: #33
Signed-off-by:Quanwei Zhou <quanweiZhou@linux.alibaba.com>
2022-02-21 18:10:12 +08:00
Quanwei Zhou 6e50c8741c shim-proto: support async
Fixes: #33
Signed-off-by: Quanwei Zhou <quanweiZhou@linux.alibaba.com>
2022-02-21 16:52:45 +08:00
Zhang Tianyang 117263d9be Move Io and Console
Signed-off-by: Zhang Tianyang <burning9699@gmail.com>
2022-02-17 23:06:35 +08:00