Commit Graph

30 Commits

Author SHA1 Message Date
James Sturtevant 60558b7848 Pass all commandline arguments through
Because the second invocation of the shim doesn't have the containerd pipe passed to it, a shim that wants to communicate over the pipe needs to parse the arguments its own.  This makes it so the library pass all the arguments, which has already parsed the arguments allowing shims to use the containerd address.

Signed-off-by: James Sturtevant <jstur@microsoft.com>
2023-07-20 21:43:23 +00:00
James Sturtevant bceaf4aca3
Windows support for the synchronous shim
Signed-off-by: James Sturtevant <jsturtevant@gmail.com>
Signed-off-by: James Sturtevant <jstur@microsoft.com>
2023-06-22 10:06:39 -07:00
Maksym Pavlenko 5ddd3e37bb Run fmt
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-09-29 11:55:31 -07: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
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
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 996c8e6aa8 Rework exit signal and task creation
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-02-24 11:32:34 -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 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
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 39065ec9ed Rename shim-client to shim-protos
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2021-12-30 08:43:32 +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
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 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
Maksym Pavlenko 87f97f462c Add copyright headers
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2021-12-10 15:14:48 -08:00
Maksym Pavlenko 11ad93017f Allow custom error types in Shim trait
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2021-11-19 16:11:49 -08:00
Maksym Pavlenko 7b0f47b1ba Pass socket fd to child process
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2021-11-17 12:14:57 -08:00
Maksym Pavlenko 70ae5e537a Rename shim protos crate
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2021-11-16 11:07:03 -08:00
Maksym Pavlenko 9629eac9ec Add shim exit signal
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2021-07-28 11:43:22 -07:00
Maksym Pavlenko 8e6bf687b2 Publisher fixes
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2021-07-26 18:16:16 -07:00
Maksym Pavlenko 77bfce3a50 Rename client crate
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2021-07-26 17:06:06 -07:00
Maksym Pavlenko d3852a5fcd Implement remote publisher
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2021-07-26 16:59:21 -07:00
Maksym Pavlenko 3f41003493 Update shim README
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2021-07-24 11:04:19 -07:00
Maksym Pavlenko 81a57058b6 Fix shim example
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2021-07-22 12:39:08 -07:00
Maksym Pavlenko 7624bc7608 Add reaper
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2021-06-01 17:14:22 -07:00
Maksym Pavlenko 45c72c34a7 Implement FIFO logger
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2021-06-01 16:59:45 -07:00
Maksym Pavlenko f48d018c32 Add example skeleton
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2021-06-01 16:46:52 -07:00