Bin Liu
2de29b6f69
Merge pull request #5088 from liubin/fix/5087-force-shutdown-shim
...
runtime-rs: force shutdown shim process in it can't exit
2022-10-13 16:55:05 +08:00
Bin Liu
7aacba0abc
Merge pull request #5282 from liubin/fix/4730-rs-emptydir
...
runtime-rs: support ephemeral storage for emptydir
2022-10-12 09:53:59 +08:00
Bin Liu
3aeaa6459d
runtime-rs: delete duplicated PASSTHROUGH_FS_DIR const
...
The const PASSTHROUGH_FS_DIR defined twice, delte one.
Fixes : #5301
Signed-off-by: Bin Liu <bin@hyper.sh >
2022-09-30 15:53:08 +08:00
Bin Liu
8d4ced3c86
runtime-rs: support ephemeral storage for emptydir
...
Add support for ephemeral storage and k8s emptydir.
Depends-on:github.com/kata-containers/tests#5161
Fixes : #4730
Signed-off-by: Bin Liu <bin@hyper.sh >
2022-09-30 09:10:20 +08:00
Bin Liu
1352e31180
Merge pull request #5200 from openanolis/agent_rwlock
...
refactor(runtime-rs): Use RwLock in runtime-agent
2022-09-29 13:15:41 +08:00
Bin Liu
abbdf89a06
Merge pull request #5271 from liubin/fix/4729-add-close-io-for-kubectl-cp
...
runtime-rs: fix shim close_io call to support kubectl cp
2022-09-29 13:10:49 +08:00
Bin Liu
0e899669ee
runtime-rs: fix shim close_io call to support kubectl cp
...
Add close_io to shim and call agent's close_stdin in close_io.
Depends-on:github.com/kata-containers/tests#5155
Fixes : #4729
Signed-off-by: Bin Liu <bin@hyper.sh >
2022-09-29 09:35:17 +08:00
Zhongtao Hu
96cf21fad0
runtime-rs: add comments for runtime-rs shared directory
...
add comments for runtime-rs shared directory
Fixes:#5197
Signed-off-by: Zhongtao Hu <zhongtaohu.tim@linux.alibaba.com >
2022-09-28 15:46:34 +08:00
Zhongtao Hu
ff053b0808
Merge pull request #5220 from liubin/fix/5184-rs-inotify
...
runtime-rs: support watchable mount
2022-09-28 11:19:53 +08:00
Zhongtao Hu
319caa8e74
Merge pull request #5097 from openanolis/dbg-console
...
runtime-rs: debug console support in runtime
2022-09-28 10:30:22 +08:00
Peng Tao
33b0720119
Merge pull request #5193 from openanolis/origin/kata-deploy
...
kata-deploy: ship the rustified runtime binary
2022-09-28 10:19:16 +08:00
Bin Liu
c64e56327f
Merge pull request #5190 from liubin/fix/5189-unbind-as-a-const
...
runtime-rs: define VFIO unbind path as a const
2022-09-27 21:04:18 +08:00
Bin Liu
4a763925e5
runtime-rs: support watchable mount
...
Use watchable mount to support inotify for virtio-fs.
Fixes : #5184
Signed-off-by: Bin Liu <bin@hyper.sh >
2022-09-27 19:08:25 +08:00
Bin Liu
c95cf6dce7
Merge pull request #5250 from liubin/fix/5249-set-timeout-to-zero-for-stream-rpc
...
runtime-rs: set agent timeout to 0 for stream RPCs
2022-09-27 17:39:35 +08:00
Bin Liu
20bcaf0e36
runtime-rs: set agent timeout to 0 for stream RPCs
...
For stream RPCs:
- write_stdin
- read_stdout
- read_stderr
there should be no timeout (by setting it to 0).
Fixes : #5249
Signed-off-by: Bin Liu <bin@hyper.sh >
2022-09-27 11:47:37 +08:00
Bin Liu
407e46b1b7
Merge pull request #5218 from bergwolf/github/deps
...
runtime/runtime-rs: update dependency
2022-09-27 11:02:46 +08:00
Bin Liu
a2f207b923
Merge pull request #5163 from liubin/fix/5162-add-test-for-StaticResource
...
runtime-rs: add test for StaticResource
2022-09-26 17:44:20 +08:00
Zhongtao Hu
9d67f5a7e2
Merge pull request #5230 from openanolis/nohc
...
runtime-rs: remove hardcoded string
2022-09-26 16:01:41 +08:00
quanweiZhou
ad87c7ac56
Merge pull request #5206 from openanolis/hypervisor/readme
...
docs: add README for runtime-rs hypervisor crate
2022-09-26 16:01:12 +08:00
Bin Liu
5a98fb8d2b
Merge pull request #5186 from liubin/fix/5185
...
runtime-rs: use Path.is_file to check regular files
2022-09-26 12:33:47 +08:00
Zhongtao Hu
4a36bb9e21
Merge pull request #4924 from openanolis/runtime-rs-netUT
...
runtime-rs: add unit tests for network resource
2022-09-23 17:45:24 +08:00
Zhongtao Hu
274de024c5
docs: add README for runtime-rs hypervisor crate
...
add README for runtime-rs hypervisor crate
Fixes:#4634
Signed-off-by: Zhongtao Hu <zhongtaohu.tim@linux.alibaba.com >
2022-09-23 15:20:02 +08:00
Chao Wu
9cf5de0b4e
Merge pull request #5171 from liubin/fix/5170-use-macro
...
runtime-rs/resource: use macro to reduce duplicated code
2022-09-23 10:59:53 +08:00
Zhongtao Hu
d663f110d7
kata-deploy: get the config path from cri options
...
get the config path for runtime-rs from cri options
Fixes : #5000
Signed-off-by: Zhongtao Hu <zhongtaohu.tim@linux.alibaba.com >
2022-09-22 17:39:25 +08:00
Ji-Xinyou
46965739a4
runtime-rs: remove hardcoded string
...
Use KATA_PATH instead of "run/kata"
Fixes : #5229
Signed-off-by: Ji-Xinyou <jerryji0414@outlook.com >
2022-09-22 16:06:51 +08:00
Ji-Xinyou
50299a3292
refactor(runtime-rs): Use RwLock in runtime agent
...
Use RwLock for Agent in runtime, for better concurrency.
Fixes : #5199
Signed-off-by: Ji-Xinyou <jerryji0414@outlook.com >
2022-09-21 17:43:40 +08:00
Peng Tao
7fbc883879
runtime-rs: drop dependency on rustc-serialize
...
We are not using it and it hasn't got any updates for more than five
years, leaving open CVEs unresolved.
Signed-off-by: Peng Tao <bergwolf@hyper.sh >
2022-09-21 17:19:58 +08:00
Ji-Xinyou
e23bfd615e
runtime-rs: make function name more understandable
...
Change kparams to kernel_params for understandability.
Fixes : #5068
Signed-Off-By: Ji-Xinyou <jerryji0414@outlook.com >
2022-09-21 11:48:11 +08:00
Ji-Xinyou
426a436780
runtime-rs: add unit test and eliminate raw string
...
Add two unit tests for coverage and eliminate raw strings to constant.
Fixes : #5068
Signed-Off-By: Ji-Xinyou <jerryji0414@outlook.com >
2022-09-21 11:47:07 +08:00
Ji-Xinyou
87959cb72d
runtime-rs: debug console support in runtime
...
Read debug console configuration in kernel params.
Fixes : #5068
Signed-Off-By: Ji-Xinyou <jerryji0414@outlook.com >
2022-09-21 11:46:55 +08:00
wllenyj
0399da677d
runtime-rs: update dependencies
...
Updated Cargo.lock.
Signed-off-by: wllenyj <wllenyj@linux.alibaba.com >
2022-09-20 15:00:14 +08:00
Zhongtao Hu
e05e42fd3c
Merge pull request #5113 from liubin/fix/5112-call-TomlConfig-validate-func
...
runtime-rs: call TomlConfig's validate function after load
2022-09-20 14:38:42 +08:00
Zhongtao Hu
fc65e96ad5
Merge pull request #5133 from openanolis/shimmgmt
...
feat(Shimmgmt): Shim management server and client
2022-09-20 14:37:19 +08:00
Bin Liu
2caee1f38d
runtime-rs: define VFIO unbind path as a const
...
In src/runtime-rs/crates/hypervisor/src/device/vfio.rs,
the path of new_id is defined as a const, but unbind is used
as a local variable, they should be unified to const.
Fixes : #5189
Signed-off-by: Bin Liu <bin@hyper.sh >
2022-09-19 16:08:35 +08:00
Bin Liu
9670a3caac
runtime-rs: use Path.is_file to check regular files
...
Use Path.is_file to replace using `stat` to check the file type.
Fixes : #5185
Signed-off-by: Bin Liu <bin@hyper.sh >
2022-09-19 15:57:07 +08:00
Bin Liu
a8a8a28a34
runtime-rs/resource: use macro to reduce duplicated code
...
Some device types have the same definition, they can be implemented
by macro to reduce code.
And this commit also deleted the `peer_name` field of the structs that
is never been used.
Fixes : #5170
Signed-off-by: Bin Liu <bin@hyper.sh >
2022-09-15 15:45:26 +08:00
Bin Liu
156e1c3247
runtime-rs: delete some allow(dead_code) attributes
...
Some #![allow(dead_code)]s and code are not needed indeed.
Fixes : #5164
Signed-off-by: Bin Liu <bin@hyper.sh >
2022-09-14 20:50:30 +08:00
Bin Liu
208233288a
runtime-rs: add test for StaticResource
...
Add test case for StaticResource, the old test is not
covering the StaticResource struct.
Fixes : #5162
Signed-off-by: Bin Liu <bin@hyper.sh >
2022-09-14 11:45:07 +08:00
Bin Liu
42d4da9b6c
Merge pull request #5101 from liubin/fix/5100-cpu-period-quota-data-type
...
kata-types: change return type of getting CPU period/quota function
2022-09-13 10:33:29 +08:00
Tim Zhang
8ec4edcf4f
Merge pull request #5146 from liubin/fix/5145-check-host-dev
...
runtime-rs: fix host device check pattern
2022-09-13 10:33:05 +08:00
Bin Liu
62cf6e6fc3
runtime-rs: remove meaningless comment
...
The comment for `generate_mount_path` function is a copy miss
and should be deleted.
Fixes : #5150
Signed-off-by: Bin Liu <bin@hyper.sh >
2022-09-09 16:07:35 +08:00
bin liu
2b1d058572
runtime-rs: fix host device check pattern
...
Host devices should start with `/dev/` but not `/dev`.
Fixes : #5145
Signed-off-by: bin liu <liubin0329@gmail.com >
2022-09-08 22:44:46 +08:00
Ji-Xinyou
5add50aea2
runtime-rs: timeout for shim management client
...
Let client side support timeout if the timeout value is set.
If timeout not set, execute directly.
Fixes : #5114
Signed-off-by: Ji-Xinyou <jerryji0414@outlook.com >
2022-09-08 11:11:33 +08:00
Ji-Xinyou
9f13496e13
runtime-rs: shim management client
...
Add client side function(public), to establish http connections (PUT,
POST, GET) to the long standing shim mgmt server.
Fixes : #5114
Signed-off-by: Ji-Xinyou <jerryji0414@outlook.com >
2022-09-07 15:39:14 +08:00
Bin Liu
aaf6d69089
runtime-rs: call TomlConfig's validate function after load
...
Call TomlConfig's validate function after it is loaded and
adjusted by annotations.
Fixes : #5112
Signed-off-by: Bin Liu <bin@hyper.sh >
2022-09-07 11:34:08 +08:00
Ji-Xinyou
e891295e10
runtime-rs: shim management - agent-url
...
Add agent-url to its handler. The general framework of registering URL
handlers is done.
Fixes : #5114
Signed-off-by: Ji-Xinyou <jerryji0414@outlook.com >
2022-09-07 11:13:21 +08:00
Ji-Xinyou
59aeb776b0
runtime-rs: shim management
...
Add shim management http server and boot it as a light-weight thread
when the sandbox is created.
Fixes : #5114
Signed-off-by: Ji-Xinyou <jerryji0414@outlook.com >
2022-09-06 16:44:16 +08:00
Bin Liu
96c8be715b
libs/kata-types: change return type of getting CPU period/quota
...
period should have a type of u64, and quota should be i64, the
function of getting CPU period and quota from annotations should
use the same data type as function return type.
Fixes : #5100
Signed-off-by: Bin Liu <bin@hyper.sh >
2022-09-06 11:35:52 +08:00
Bin Liu
e5437a7084
Merge pull request #5063 from liubin/fix/5062-split-amend-spec
...
runtime-rs: split amend_spec function
2022-09-05 15:00:31 +08:00
Bin Liu
ba013c5d0f
Merge pull request #4744 from openanolis/runtime-rs-static_resource_mgmt
...
runtime-rs: support functionality of static resource management
2022-09-05 11:17:09 +08:00