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
35a97f17d5
Merge pull request #145 from wllenyj/sandbox
...
shim: add Sandbox API support
2023-05-16 13:25:35 -07:00
wanglei01
79d5d5afcf
shim: add sandbox module
...
Added sandbox feature to enable sandbox support.
Signed-off-by: wanglei01 <wllenyj@linux.alibaba.com>
2023-05-17 01:41:23 +08:00
wanglei01
e8d11318e1
shim: add Sandbox API support
...
Added sandbox proto file.
Signed-off-by: wanglei01 <wllenyj@linux.alibaba.com>
2023-05-17 01:41:17 +08:00
Maksym Pavlenko
4f66aaffe7
Update tonic dependencies
...
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-05-15 10:19:35 -07:00
Maksym Pavlenko
f23659c392
[client] Bump version to 0.3.0
2023-05-05 10:44:55 -07:00
Chris Rice
660d4f886b
add submodule for sandbox
2023-05-05 11:05:49 -06:00
Chris Rice
c9fe55ef51
add containerd.services.sandbox.v1
2023-05-05 08:40:48 -06:00
Maksym Pavlenko
c54a467f16
Merge pull request #137 from simon-mo/list-request-impl
...
Implement the input parameters for snapshotter::list
2023-04-23 19:28:03 +02:00
Maksym Pavlenko
e3c2364587
Merge pull request #138 from Burning1020/ttyfd-close
...
runc-shim: fix tty fd multi close error
2023-04-23 19:25:59 +02:00
Simon Mo
9bf2db776b
Implement `list` for snapshotter request
...
This PR follows up on @wedsonaf's #126 and pass the filters through the list input.
Note that this is not backward compatible but this is a step closer to the protocol
conformance.
2023-04-21 18:39:32 +00:00
Maksym Pavlenko
16e9695e80
Bump snapshots crate
...
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-04-14 12:26:18 -07:00
Tim Zhang
dc856c67bf
containerd-shim: bump containerd-shim-protos to v0.3.0
...
Signed-off-by: Tim Zhang <tim@hyper.sh>
2023-04-14 16:02:48 +08:00
Tim Zhang
18609f2762
release containerd-shim-protos: v0.3.0
...
Bump containerd-shim-protos from 0.2.0 to 0.3.0 to
include changes made in #95 .
Because the update in #95 is not compatible we need a major
version update.
Signed-off-by: Tim Zhang <tim@hyper.sh>
2023-04-14 15:43:13 +08:00
Zhang Tianyang
ad90c998ef
runc-shim: fix tty fd multi close error
...
use File::from_raw_fd() to create the tty io file, when the io copy
thread ends, it will drop the file object which will close the fd, but
as we made three file objects from the same fd, it will be closed
three times, if other opened files occupied this fd number, the
second or third drop of the file object may close the fds of other files.
Signed-off-by: Zhang Tianyang <burning9699@gmail.com>
2023-04-11 20:16:39 +08:00
Maksym Pavlenko
dad95076c4
Move Stdio to runc-shim
...
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-03-16 11:35:03 -07:00
Maksym Pavlenko
2fcf8af423
Move processes to runc-shim
...
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-03-16 11:24:31 -07:00
Maksym Pavlenko
33d37c0c0d
Move console to runc-shim
...
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-03-16 11:16:24 -07:00
Maksym Pavlenko
115029bb63
Merge pull request #127 from mxpv/refactor
...
Make shim / runc-shim APIs more consistent
2023-03-16 11:01:47 -07:00
Maksym Pavlenko
b284957f88
Merge pull request #130 from wedsonaf/kind-eq
...
Derive `PartialEq` for `Kind`
2023-03-16 04:39:15 +00:00
Wedson Almeida Filho
68c227a774
Derive `PartialEq` for `Kind`
...
This allows us to use the `==` and `!=` operators to compare instances
of `Kind`, which is useful when we require that a snapshot be of some
specific kind (e.g., committed) before performing an operation on it.
Signed-off-by: Wedson Almeida Filho <walmeida@microsoft.com>
2023-03-16 01:16:09 -03:00
Wedson Almeida Filho
7380fe8528
Use `futures` version from workspace
...
Co-authored-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
Signed-off-by: Wedson Almeida Filho <wedsonaf@users.noreply.github.com>
2023-03-16 00:59:56 -03:00
Maksym Pavlenko
45c0c0d4e0
Move async container and task modules to runc-shim
...
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-03-15 14:26:15 -07:00
Wedson Almeida Filho
f071faafc8
Implement `list` function
...
This is needed by remote snapshotters: once they report "already
exists", containerd tries to find the snapshot via `list`. If
it's not implemented, the "already exists" trick to prevent
layer download doesn't work.
This is still missing a filtering function, but allows remote
snapshotters to work.
Signed-off-by: Wedson Almeida Filho <walmeida@microsoft.com>
2023-03-14 23:59:29 -03:00
Wedson Almeida Filho
af7ec66df5
Implement `Serialize` and `Deserialize` for `Kind` and `Info`
...
This allows us to use `serde` to serialize and deserialize the
information about a particular snapshot so that we can write it
to and read it from storage.
Signed-off-by: Wedson Almeida Filho <walmeida@microsoft.com>
2023-03-14 15:16:58 -03:00
Maksym Pavlenko
98754fd771
Update tokio
...
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-03-13 09:43:52 -07:00
dependabot[bot]
2cf2fd4a92
build(deps): update oci-spec requirement from 0.5.8 to 0.6.0
...
Updates the requirements on [oci-spec](https://github.com/containers/oci-spec-rs ) to permit the latest version.
- [Release notes](https://github.com/containers/oci-spec-rs/releases )
- [Changelog](https://github.com/containers/oci-spec-rs/blob/main/release.md )
- [Commits](https://github.com/containers/oci-spec-rs/compare/v0.5.8...v0.6.0 )
---
updated-dependencies:
- dependency-name: oci-spec
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
2023-03-13 01:44:43 +00:00
Christophe de Dinechin
2d0d5c5602
docs: Update link for containerd shimv2 proto file
...
The `shim.proto` file is now under `api/runtime` instead of just `runtime`.
Signed-off-by: Christophe de Dinechin <dinechin@redhat.com>
2023-03-08 15:15:19 +01:00
Maksym Pavlenko
27a92fc606
Merge pull request #117 from wedsonaf/status
...
Add `Into<tonic::Status>` bound to `Snapshotter::Error`
2023-01-19 13:36:28 -08:00
Wedson Almeida Filho
cdb52e74e5
Use `?` instead of `match` expression
...
This is just a simplification of the code to use `map_err` and
the question mark operator to improve readability.
Signed-off-by: Wedson Almeida Filho <walmeida@microsoft.com>
2023-01-19 16:22:50 -03:00
Wedson Almeida Filho
3aeeea0f55
Add `Into<tonic::Status>` bound to `Snapshotter::Error`
...
This allows implementers to express which grpc status should be
returned to clients on errors.
Prior to this patch, all errors got converted to "internal"
errors (`tonic::Status::internal`), which doesn't work when
specific status are needed. For example, remote snapshotters
need to return "already exists" to indicate that a layer
doesn't need to be downloaded.
Signed-off-by: Wedson Almeida Filho <walmeida@microsoft.com>
2023-01-19 16:18:05 -03:00
Zhang Tianyang
65921d09dc
Remove unused declaration
...
Signed-off-by: Zhang Tianyang <burning9699@gmail.com>
2023-01-16 23:37:45 +08:00
Zhang Tianyang
ffa56dbf3b
runc-shim: fix leaking thread and fd
...
The stdin fifo fd should be closed when containerd
calls close io, otherwise, runc-shim would hold
this fd and the copy console thread forever.
Signed-off-by: Zhang Tianyang <burning9699@gmail.com>
2023-01-16 23:37:44 +08:00
Zhang Tianyang
62798a0745
runc-shim: fix leaking files for exec process
...
A pid file under bundle path will be created after
the exec process created, so it should also be deleted
before process deleted.
Signed-off-by: Zhang Tianyang <burning9699@gmail.com>
2023-01-08 10:57:31 +08:00
Maksym Pavlenko
faf24cbd42
Merge pull request #106 from containerd/dependabot/cargo/page_size-0.5.0
...
build(deps): update page_size requirement from 0.4.2 to 0.5.0
2023-01-07 11:49:28 -08:00
Maksym Pavlenko
80c6d9edf0
Merge pull request #107 from containerd/dependabot/cargo/nix-0.26
...
build(deps): update nix requirement from 0.25 to 0.26
2023-01-07 11:49:13 -08:00
Maksym Pavlenko
07a98518d4
Merge pull request #109 from utam0k/rust-1.66
...
Update Rust to 1.66 and fix some lints
2023-01-07 11:48:17 -08:00
Zhang Tianyang
3822d608e9
runc-shim: retrieve OCI runtime error if OCI command failed
...
If an error is encountered when running the OCI command, shim process
should walk the OCI command logfile and retrieve the last error.
Signed-off-by: Zhang Tianyang <burning9699@gmail.com>
2023-01-06 21:21:13 +08:00
utam0k
fe1b3b0f73
Fix the warns from clippy lints
...
Signed-off-by: utam0k <k0ma@utam0k.jp>
2022-12-29 21:21:55 +09:00
dependabot[bot]
8a20e3b2c3
build(deps): update page_size requirement from 0.4.2 to 0.5.0
...
Updates the requirements on [page_size](https://github.com/Elzair/page_size_rs ) to permit the latest version.
- [Release notes](https://github.com/Elzair/page_size_rs/releases )
- [Commits](https://github.com/Elzair/page_size_rs/compare/0.4.2...0.5.0 )
---
updated-dependencies:
- dependency-name: page_size
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-12-17 23:28:10 +00:00
utam0k
909b41b4fe
Update oci-spec
2022-12-17 14:10:18 +09:00
dependabot[bot]
7558fe4c49
build(deps): update nix requirement from 0.25 to 0.26
...
Updates the requirements on [nix](https://github.com/nix-rust/nix ) to permit the latest version.
- [Release notes](https://github.com/nix-rust/nix/releases )
- [Changelog](https://github.com/nix-rust/nix/blob/master/CHANGELOG.md )
- [Commits](https://github.com/nix-rust/nix/compare/v0.25.0...v0.26.1 )
---
updated-dependencies:
- dependency-name: nix
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-11-29 21:09:10 +00:00
Maksym Pavlenko
80e7945674
Use workspace inheritance to describe crates
...
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-11-04 14:34:49 -07:00
Maksym Pavlenko
55aa661b4d
Update Rust to 1.65
...
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-11-04 14:34:49 -07:00
dependabot[bot]
00b836f8de
build(deps): update simple_logger requirement from 3.0 to 4.0
...
Updates the requirements on [simple_logger](https://github.com/borntyping/rust-simple_logger ) to permit the latest version.
- [Release notes](https://github.com/borntyping/rust-simple_logger/releases )
- [Commits](https://github.com/borntyping/rust-simple_logger/compare/v3.0.0...v4.0.0 )
---
updated-dependencies:
- dependency-name: simple_logger
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-10-27 21:49:35 +00:00
dependabot[bot]
0409907ac4
build(deps): update simple_logger requirement from 2.0 to 3.0
...
Updates the requirements on [simple_logger](https://github.com/borntyping/rust-simple_logger ) to permit the latest version.
- [Release notes](https://github.com/borntyping/rust-simple_logger/releases )
- [Commits](https://github.com/borntyping/rust-simple_logger/compare/v2.0.0...v3.0.0 )
---
updated-dependencies:
- dependency-name: simple_logger
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-10-20 21:52:22 +00:00
Zhang Tianyang
6203977cbf
runc-shim: Update README with performance test
...
Signed-off-by: Zhang Tianyang <burning9699@gmail.com>
2022-10-16 16:41:01 +08:00
Maksym Pavlenko
5ddd3e37bb
Run fmt
...
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-09-29 11:55:31 -07:00
Maksym Pavlenko
d3d97df549
Remove generated code from shim-protos
...
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-09-27 08:57:33 -07:00
Maksym Pavlenko
97d00b4947
Merge pull request #95 from mxpv/ttrpc
2022-09-23 19:08:42 -07:00