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
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
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
21e298aef3
Bump versions
...
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-03-10 15:58:28 -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
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
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
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
Zhang Tianyang
117263d9be
Move Io and Console
...
Signed-off-by: Zhang Tianyang <burning9699@gmail.com>
2022-02-17 23:06:35 +08:00
Zhang Tianyang
db4e648261
Simpify Config transmission mode
...
Signed-off-by: Zhang Tianyang <burning9699@gmail.com>
2022-02-17 23:02:26 +08:00
Zhang Tianyang
620ce26d59
Remove extern use and refactor naming
...
Signed-off-by: Zhang Tianyang <burning9699@gmail.com>
2022-02-17 23:02:26 +08:00
Zhang Tianyang
0a33f3e867
Runc shim implementation
...
Implement shim cli commands and some basic task APIs to run a runc container
Co-authored-by: Feng Shaobao fshb1988@gmail.com
Co-authored-by: Zhang Tianyang burning9699@gmail.com
Co-authored-by: Yu Qitao yuqitao1024@qq.com
Signed-off-by: Zhang Tianyang <burning9699@gmail.com>
2022-02-17 23:02:14 +08:00
Liu Jiang
f1b90cc9b2
shim: add inline doc for set_subreaper() and SOCKET_FD
...
As follow-on work, add inline documentation for set_reapder(#19 )
and SOCKET_FD (#20 ).
Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>
2022-02-12 16:25:10 +08:00
Maksym Pavlenko
3b2b00f206
Update README
...
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-02-11 10:10:42 -08:00
Yuna Tomida
8bbd4e7baf
fixed clippy warnings in shim::args and example in client
...
Signed-off-by: Yuna Tomida <ytomida.mmm@gmail.com>
2022-02-03 13:35:24 +00:00
Maksym Pavlenko
f035941680
Merge pull request #20 from Burning1020/fix-socket-address
...
[shim] Fix socket binding address
2022-02-02 10:14:26 -08:00
Burning
88882cb2e2
[shim] Fix socket binding address
...
As there is no need in "-socket" flag, we'd better use SOCKET_FD as the binding address of task server only.
Signed-off-by: Burning <burning9699@gmail.com>
2022-01-22 20:28:12 +08:00
Burning
7c9a6a5a25
[shim] Set the "child subreaper" attribute
...
The shim process can have "child subreaper" attribute when arg2 is nonzero.
Signed-off-by: Burning <burning9699@gmail.com>
2022-01-22 19:50:19 +08:00
Maksym Pavlenko
17ea78a0e0
Update ttrpc-rust to 0.6
...
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-01-19 08:47:43 -08:00
Samuel Ortiz
f2ad153965
[shim] README: Update the example to the latest API
...
Use the skeleton.rs code.
Signed-off-by: Samuel Ortiz <s.ortiz@apple.com>
2022-01-19 08:31:34 -08:00
Maksym Pavlenko
0befc3d4f7
[shim] Rename empty shim example
...
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2021-12-30 10:16:56 +02:00
Maksym Pavlenko
55cd05887d
[shim] Add runtime section to README
...
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2021-12-30 10:06:14 +02:00
Maksym Pavlenko
f43b11df48
Bump shim to 0.2.0
...
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2021-12-30 09:23:57 +02:00
Maksym Pavlenko
39065ec9ed
Rename shim-client to shim-protos
...
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2021-12-30 08:43:32 +02:00
Maksym Pavlenko
d901356551
Update dependencies
...
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2021-12-28 10:54:59 +02:00
Liu Jiang
95e8049398
shim: distinguish between runtime id and container id
...
There's a misuse of runtime id and container id in Shim::new(). Both
runtime id and container id are needed by shim implentions, so add
parameter `container id` to Shim::new().
Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>
2021-12-14 13:44:45 +08:00
bin liu
c12ac9ee68
shim: update README.md to run shim examples
...
The content of README.md is out of date, update it
with the correct steps to run the examples.
Signed-off-by: bin liu <bin@hyper.sh>
2021-12-14 11:37:00 +08:00
bin liu
e5e0ebbe36
shim: pass the correct ID of containers to shim
...
The ID passed from shim::run::<Service> is the shim name,
the container ID can get from command-line flags.
Signed-off-by: bin liu <bin@hyper.sh>
2021-12-13 18:14:51 +08:00
Liu Jiang
72aebb1b39
shim: trivial documentation enhancements
...
Trivial documentation enhancements:
1) comments for unsafe code
2) list supported platforms
Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>
2021-12-13 10:13:05 +08:00
Liu Jiang
a2bfeed2ca
shim: introduce Shim::wait()
...
Introduce Shim::wait() to wait for a shim instance to exit, so the
`Shim` implementor could customize the way to manage exit event.
Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>
2021-12-13 10:08:20 +08:00
Liu Jiang
fdd50661f3
shim: add interface Shim::get_task_service()
...
Currently Containerd shimv2 runtime only provides task service, but it
may provide more service in future. So add interface
Shim::get_task_service() to get the task service object instead of
"Shim: Task".
Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>
2021-12-13 10:08:19 +08:00
Liu Jiang
7a8fa4413e
shim: implement ExitSignal with Condvar
...
Implement ExitSignal with Condvar instead of busy looping.
Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>
2021-12-13 10:08:15 +08:00
Liu Jiang
04af4df73a
shim: pass environment variables to spawned process
...
Enhanace spawn() to pass envrionment variables to child process.
Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>
2021-12-13 10:08:15 +08:00
Liu Jiang
1b106ee38d
shim: add unit test for start_listener()
...
Add unit test for start_listener().
Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>
2021-12-13 10:08:14 +08:00
Liu Jiang
0c83d7c04c
shim: be more careful when removing stale socket files
...
The function start_listener() tries to remove stale socket files when
syscall::bind() retune EADDRINUSE, let's be more careful to only remove
existing sockets instead of other types of files.
Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>
2021-12-13 10:08:13 +08:00
Liu Jiang
63f62b9c9c
shim: avoid raw fd leak in spawn()
...
The RawFd for the listener socket will get leaked in error handling
path in start_listener(). Use UnixListener to replace RawFd for clear
ownership and also simplify the code a bit.
Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>
2021-12-13 10:08:12 +08:00