Megan Wright
42978f3e83
CCv0: Merge main into CCv0 branch
...
Merge remote-tracking branch 'upstream/main' into CCv0
Fixes : #6504
Signed-off-by: Megan Wright <megan.wright@ibm.com >
2023-03-20 13:23:49 +00:00
Eduardo Lima (Etrunko)
a8b55bf874
dependency: update cgroups-rs
...
Huge pages failure with cgroups v2.
https://github.com/kata-containers/cgroups-rs/issues/112
Fixes : #6470
Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com >
2023-03-15 12:21:12 -03:00
Eric Ernst
dc42f0a33b
Merge pull request #6411 from wlan0/empty-dir
...
Add support for ephemeral mounts to occupy entire sandbox's memory
2023-03-13 20:07:27 -07:00
James O. D. Hunt
ae9be1d94b
Merge pull request #5840 from tzY15368/feat-runtimers-direct-vol
...
Implement direct-volume commands handler for shim-mgmt
2023-03-13 07:58:40 +00:00
Li Hongyu
844bf053b2
runtime-rs: add the missing default trait
...
Some structs in the runtime-rs don't implement Default trait.
This commit adds the missing Default.
Fixes : #5463
Signed-off-by: Li Hongyu <lihongyu1999@bupt.edu.cn >
2023-03-10 08:19:56 +00:00
Tingzhou Yuan
30e235f0a1
runtime-rs: impl volume-resize trait for sandbox
...
Implements resize-volume handlers in shim-mgmt,
trait for sandbox and add RPC calls to agent.
Note the actual rpc handler for the resize request is currently not
implemented, refer to issue #3694 .
Fixes #5369
Signed-off-by: Tingzhou Yuan <tzyuan15@bu.edu >
2023-03-10 01:27:06 -05:00
Georgina Kinge
ec6ce46e7e
CCv0: Merge main into CCv0 branch
...
Merge remote-tracking branch 'upstream/main' into CCv0
Fixes : #6428
Signed-off-by: Georgina Kinge <georgina.kinge@ibm.com >
2023-03-09 16:14:53 +00:00
Sidhartha Mani
3896c7a22b
protocol: add updateEphemeralMounts proto
...
- adds a new rpc call to the agent service named `updateEphemeralMounts`
- this call takes a list of grpc.Storage objects
Signed-off-by: Sidhartha Mani <sidhartha_mani@apple.com >
2023-03-06 13:43:47 -08:00
Chao Wu
6fc4c8b099
Merge pull request #5788 from openanolis/runtime-rs-ocihook
...
runtime-rs: add oci hook support
2023-03-03 01:06:21 +08:00
Yushuo
12cfad4858
runtime-rs: modify the transfer to oci::Hooks
...
In this commit, we have done:
* modify the tranfer process from grpc::Hooks to oci::Hooks, so the code
can be more clean
* add more tests for create_runtime, create_container, start_container hooks
Signed-off-by: Yushuo <y-shuo@linux.alibaba.com >
2023-03-01 10:35:10 +08:00
Yushuo
e80c9f7b74
runtime-rs: add StartContainer hook
...
StartContainer will be execute in guest container namespace in Kata.
The Hook Path of this kind of hook is also in guest container namespace.
StartContainer is executed after start operation is called, and it
should be executed before user-specific command is executed.
Fixes : #5787
Signed-off-by: Yushuo <y-shuo@linux.alibaba.com >
2023-02-27 21:56:43 +08:00
Yushuo
977f281c5c
runtime-rs: add CreateContainer hook support
...
CreateContainer hook is one kind of OCI hook. In kata, it will be
executed after VM is started, before container is created, and after
CreateRuntime is executed.
The hook path of CreateContainer hook is in host runtime namespace, but
it will be executed in host vmm namespace.
Fixes : #5787
Signed-off-by: Yushuo <y-shuo@linux.alibaba.com >
2023-02-27 21:56:43 +08:00
Yushuo
875f2db528
runtime-rs: add oci hook support
...
According to the runtime OCI Spec, there can be some hook
operations in the lifecycle of the container. In these hook
operations, the runtime can execute some commands. There are different
points in time in the container lifecycle and different hook types
can be executed.
In this commit, we are now supporting 4 types of hooks(same in
runtime-go): Prestart hook, CreateRuntime hook, Poststart hook and
Poststop hook.
Fixes : #5787
Signed-off-by: Yushuo <y-shuo@linux.alibaba.com >
2023-02-27 21:56:43 +08:00
Bin Liu
e90989b16b
Merge pull request #6314 from openanolis/static_doc
...
feat(runtime): make static resource management consistent with 2.0
2023-02-27 16:43:27 +08:00
James O. D. Hunt
fbee6c820e
runtime-rs: Improve Cloud Hypervisor config handling
...
Replace `cloud_hypervisor_vm_create_cfg()` with a set of `TryFrom` trait
implementations in the new CH specific `convert.rs` to allow the generic
`Hypervisor` configuration to be converted into the CH specific
`VmConfig` type.
Note that device configuration is not currently handled in `convert.rs`
(it's handled in `inner_device.rs`).
This change removes the old hard-coded CH specific configuration.
Fixes : #6203 .
Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com >
2023-02-22 10:48:05 +00:00
Megan Wright
e85a6f77c6
CCv0: Merge main into CCv0 branch
...
Merge remote-tracking branch 'upstream/main' into CCv0
Fixes : #6241
Signed-off-by: Megan Wright megan.wright@ibm.com
2023-02-21 11:53:30 +00:00
Ji-Xinyou
919d19f415
feat(runtime): make static resource management consistent with 2.0
...
* add doc in the configuration
* make entry consistent with 2.0
Fixes : #6313
Signed-off-by: Ji-Xinyou <jerryji0414@outlook.com >
2023-02-17 21:36:56 +08:00
Fupan Li
04e930073c
sandbox: set the dns for the sandbox
...
The rust agent had supported to set the guest dns
server in start sandbox request, thus add the dns
in the runtime side.
Fixes:#6286
Signed-off-by: Fupan Li <fupan.lfp@antgroup.com >
2023-02-16 11:25:02 +08:00
James O. D. Hunt
545151829d
kata-types: Add Cloud Hypervisor (CH) definitions
...
Implement `ConfigPlugin` trait for Cloud Hypervisor (CH).
Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com >
2023-02-13 10:25:29 +00:00
yaoyinnan
bdf20b5d26
rootfs: support EROFS filesystem
...
For kata containers, rootfs is used in the read-only way.
EROFS can noticably decrease metadata overhead.
On the basis of supporting the EROFS file system, it supports using the config parameter to switch the file system used by rootfs.
Fixes : #6063
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com >
Signed-off-by: yaoyinnan <yaoyinnan@foxmail.com >
2023-02-11 00:44:13 +08:00
Jianyong Wu
5d37d31ac7
cgroups: upgrade cgroupfs to 0.3.1
...
Trait method cause for std::error::Error is deprecated thus need replace
it with source method for cgroups-fs::error::ErrorKind.
Fixes : #6192
Signed-off-by: Jianyong Wu <jianyong.wu@arm.com >
2023-02-07 18:09:31 +08:00
Georgina Kinge
5b4075d18a
CCv0: Merge main into CCv0 branch
...
Merge remote-tracking branch 'upstream/main' into CCv0
Fixes : #6181
Signed-off-by: Georgina Kinge <georgina.kinge@ibm.com >
2023-02-01 10:10:40 +00:00
Zhongtao Hu
c1dd9b9777
Merge pull request #6023 from openanolis/missing_config
...
runtime-rs: add missing config section for share-fs
2023-01-30 15:45:22 +08:00
Megan Wright
36cd741943
CCv0: Merge main into CCv0 branch
...
Merge remote-tracking branch 'upstream/main' into CCv0
Fixes : #6126
Signed-off-by: Megan Wright megan.wright@ibm.com
2023-01-25 11:23:18 +00:00
Bin Liu
1592a385eb
dependency: update cgroups-rs
...
Update cgroups-rs.
Fixes : #6039
Signed-off-by: Bin Liu <bin@hyper.sh >
2023-01-13 14:00:51 +08:00
Zhongtao Hu
6199b69178
runtime-rs: change cache mode
...
use never as the cache mode if none is configured
Fixes:#6020
Signed-off-by: Zhongtao Hu <zhongtaohu.tim@linux.alibaba.com >
2023-01-12 18:13:50 +08:00
Zhongtao Hu
a33a22ccd1
runtime-rs: add missing config section for share-fs
...
add missing config sections for share-fs
Fixes:#6020
Signed-off-by: Zhongtao Hu <zhongtaohu.tim@linux.alibaba.com >
2023-01-12 18:12:37 +08:00
Bin Liu
0ec4aa1a86
Merge pull request #6007 from jongwu/single_container
...
runtime-rs: add Single Container support
2023-01-11 10:55:50 +08:00
Bin Liu
7b309b578d
kata-types: change cache mode from none to never
...
New Rust virtiofsd's `cache` mode doesn't support `none` mode,
we should use `never` to replace it.
Fixes : #6018
Signed-off-by: Bin Liu <bin@hyper.sh >
2023-01-10 14:21:30 +08:00
Georgina Kinge
e8c63ccc4d
CCv0: Merge main into CCv0 branch
...
Merge remote-tracking branch 'upstream/main' into CCv0
Fixes : #6011
Signed-off-by: Georgina Kinge <georgina.kinge@ibm.com >
2023-01-09 12:02:48 +00:00
Jianyong Wu
5f9c892e48
kata-types: add single_container support
...
For now, only pod_sandbox and pod_container are supported. It doesn't cover
the case that container started by ctr which is a single_container defined
in kata 2.0. port the single_container kata type from kata 2.0 to kata 3.0.
Fixes : #6006
Signed-off-by: Jianyong Wu <jianyong.wu@arm.com >
2023-01-09 10:29:01 +08:00
Zhongtao Hu
ec18368aba
Merge pull request #5858 from openanolis/refactor-guest-hook
...
agent: refactor guest hooks
2023-01-06 22:28:09 +08:00
Tingzhou Yuan
2d4b2cf72c
runtime-rs: add POST method to shim-client
...
partly refactored shim-client to reuse code, added POST method
support, and made path string constants public for client imports.
Fixes #5341
Signed-off-by: Tingzhou Yuan <tzyuan15@bu.edu >
2023-01-04 01:33:53 -05:00
Tingzhou Yuan
cae78a6851
kata-ctl: add constants for direct-volume commands
...
added direct-volume mountinfo struct and constant path strings to kata-types
Fixes #5341
Signed-off-by: Tingzhou Yuan <tzyuan15@bu.edu >
2023-01-04 01:33:51 -05:00
Fabiano Fidêncio
bc71ca0d73
kata-types: Fix unnecessary_cast warnings
...
As we bumped the rust toolchain to 1.66.0, some new warnings have been
raised due to unnecessary_cast.
Let's fix them all here.
For more info about the warnings, please, take a look at:
https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com >
2023-01-02 15:33:33 +01:00
Fabiano Fidêncio
ac4c0ff9d6
kata-types: Fix needless_borrow warnings
...
As we bumped the rust toolchain to 1.66.0, some new warnings have been
raised due to needless_borrow.
Let's fix them all here.
For more info about the warnings, please, take a look at:
https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com >
2023-01-02 15:33:29 +01:00
Fabiano Fidêncio
036e82a164
safe-path: Fix needless_borrow warnings
...
As we bumped the rust toolchain to 1.66.0, some new warnings have been
raised due to needless_borrow.
Let's fix them all here.
For more info about the warnings, please, take a look at:
https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com >
2023-01-02 15:33:23 +01:00
Fabiano Fidêncio
4b4ecd0cba
kata-sys-util: Fix "match-like-matches-macro" warning
...
As we bumped the rust toolchain to 1.66.0, some new warnings have been
raised due to "match-like-matches-macro".
Let's fix them all here.
For more info about the warnings, please, take a look at:
https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro
Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com >
2023-01-02 15:33:13 +01:00
Fabiano Fidêncio
c16c1bde86
kata-sys-util: Fix unnecessary_cast warnings
...
As we bumped the rust toolchain to 1.66.0, some new warnings have been
raised due to unnecessary_cast.
Let's fix them all here.
For more info about the warnings, please, take a look at:
https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com >
2023-01-02 15:33:08 +01:00
Fabiano Fidêncio
021201005d
kata-sys-util: Fix needless_borrow warnings
...
As we bumped the rust toolchain to 1.66.0, some new warnings have been
raised due to needless_borrow.
Let's fix them all here.
For more info about the warnings, please, take a look at:
https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com >
2023-01-02 15:33:01 +01:00
Fabiano Fidêncio
716b22a458
logging: Allow clippy::type-complexity warning
...
As the rust toolchain version bump to its 1.66.0 release raised a
warning about the type complexity used for the closure, and that's
something we don't want to change, let's ignore such warning in this
very specific case.
See:
https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com >
2023-01-02 15:32:52 +01:00
Fabiano Fidêncio
738d2d9736
logging: Fix needless_borrow warnings
...
As we bumped the rust toolchain to 1.66.0, some new warnings have been
raised due to needless_borrow.
Let's fix them all here.
For more info about the warnings, please, take a look at:
https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com >
2023-01-02 15:32:47 +01:00
Fabiano Fidêncio
869b9d15a8
protocols: Fix unnecessary_cast warnings
...
As we bumped the rust toolchain to 1.66.0, some new warnings have been
raised due to unnecessary_cast.
Let's fix them all here.
For more info about the warnings, please, take a look at:
https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com >
2023-01-02 15:32:30 +01:00
Fabiano Fidêncio
eda857d898
protocols: Fix needless_borrow warnings
...
As we bumped the rust toolchain to 1.66.0, some new warnings have been
raised due to needless_borrow.
Let's fix them all here.
For more info about the warnings, please, take a look at:
https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com >
2023-01-02 15:31:12 +01:00
Fabiano Fidêncio
2a73e057db
kata-types: Fix unnecessary_cast warnings
...
As we bumped the rust toolchain to 1.66.0, some new warnings have been
raised due to unnecessary_cast.
Let's fix them all here.
For more info about the warnings, please, take a look at:
https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com >
2023-01-02 14:28:07 +01:00
Fabiano Fidêncio
cf9ef1833c
kata-types: Fix needless_borrow warnings
...
As we bumped the rust toolchain to 1.66.0, some new warnings have been
raised due to needless_borrow.
Let's fix them all here.
For more info about the warnings, please, take a look at:
https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com >
2023-01-02 14:28:07 +01:00
Fabiano Fidêncio
126187e814
safe-path: Fix needless_borrow warnings
...
As we bumped the rust toolchain to 1.66.0, some new warnings have been
raised due to needless_borrow.
Let's fix them all here.
For more info about the warnings, please, take a look at:
https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com >
2023-01-02 14:28:07 +01:00
Fabiano Fidêncio
bb78d35db8
kata-sys-util: Fix "match-like-matches-macro" warning
...
As we bumped the rust toolchain to 1.66.0, some new warnings have been
raised due to "match-like-matches-macro".
Let's fix them all here.
For more info about the warnings, please, take a look at:
https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro
Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com >
2023-01-02 14:28:07 +01:00
Fabiano Fidêncio
668e652401
kata-sys-util: Fix unnecessary_cast warnings
...
As we bumped the rust toolchain to 1.66.0, some new warnings have been
raised due to unnecessary_cast.
Let's fix them all here.
For more info about the warnings, please, take a look at:
https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com >
2023-01-02 14:28:07 +01:00
Fabiano Fidêncio
c1a8d89a72
kata-sys-util: Fix needless_borrow warnings
...
As we bumped the rust toolchain to 1.66.0, some new warnings have been
raised due to needless_borrow.
Let's fix them all here.
For more info about the warnings, please, take a look at:
https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com >
2023-01-02 14:28:07 +01:00