Commit Graph

303 Commits

Author SHA1 Message Date
Maksym Pavlenko d767e6ae06 Add containerd integration tests
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>

[CI] Enable containerd v1.5

Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-03-10 09:41:07 -08:00
Maksym Pavlenko fcb311bf6b
Merge pull request #55 from Burning1020/publisher
runc-shim: support remote publisher and extra some common methods
2022-03-10 09:40:25 -08:00
Maksym Pavlenko 92bd49f6e7
Merge pull request #58 from Burning1020/fix-xdg-dir
bugfix: return a tmp dir when 'XDG_RUNTIME_DIR' was not set
2022-03-10 09:34:18 -08:00
Maksym Pavlenko 598105cc35
Merge pull request #57 from Burning1020/spawner
runc-shim: implement ShimExecutor in synchronous version
2022-03-10 09:32:11 -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
Maksym Pavlenko 1af2be1248
Merge pull request #49 from Burning1020/prctl
shim: refine set subreaper
2022-03-03 10:39:10 -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
Maksym Pavlenko 3f153482bc
Merge pull request #47 from containerd/dependabot/github_actions/actions/checkout-3
build(deps): bump actions/checkout from 2 to 3
2022-03-01 22:03:36 -08:00
dependabot[bot] 3af39956be
build(deps): bump actions/checkout from 2 to 3
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-01 22:35:39 +00:00
Maksym Pavlenko 375bc65791
Merge pull request #46 from Burning1020/impl-pids
runc-shim: impl close io and pids task
2022-03-01 11:29:03 -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
Maksym Pavlenko d654b18d80
Merge pull request #45 from Burning1020/piped-io
runc: Set piped stdio as default
2022-02-28 11:11:22 -08:00
Maksym Pavlenko 1400b86a6a
Merge pull request #43 from Yuna-Tomi/fix-msrv
fixed msrv in README.md to 1.54
2022-02-28 10:52:19 -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
Yuna Tomida 7e3b045e68
fix msrv to 1.54
Signed-off-by: Yuna Tomida <ytomida.mmm@gmail.com>
2022-02-28 09:49:33 +00:00
Maksym Pavlenko f7335a88a9
Merge pull request #42 from Burning1020/dev
runc-shim: implement stats and update task
2022-02-27 12:24:39 -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
Maksym Pavlenko 4d8fa81a27
Merge pull request #39 from jiangliu/runc
Bug fixes and improvements to the runc crate
2022-02-24 08:42:40 -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
Maksym Pavlenko 05534eb40d
Merge pull request #36 from jiangliu/shim-proto-build 2022-02-23 15:46:06 -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 3905a44f0f Run tests separately on CI
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-02-22 11:28:20 -08:00
Maksym Pavlenko 5c50736975
Merge pull request #35 from mxpv/dep
Remove runc dependency from shim crate
2022-02-22 10:12:56 -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
Maksym Pavlenko a4e923d885
Merge pull request #24 from Burning1020/mini-runc
Minimum runc shim implementation
2022-02-21 09:43:48 -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