Commit Graph

2618 Commits

Author SHA1 Message Date
Bin Liu
53f209af44 libs/kata-types: adjust default_vcpus correctly
With default_maxvcpus = 0 and default_vcpus = 1 settings, the
default_vcpus will be set to 0 and leads to starting fail.

The default_maxvcpus is not set correctly when it is set to 0,
and the default_vcpus is set to 0.

The correct action is setting default_maxvcpus to the max number
of CPUs or MAX_DRAGONBALL_VCPUS, and the default_vcpus should be
set to the desired value if the valuse is between 0 and
default_maxvcpus.

Fixes: #5110

Signed-off-by: Bin Liu <bin@hyper.sh>
2022-10-08 16:52:05 +08:00
Bin Liu
dd34540b8a Merge pull request #5305 from liubin/fix/5301-delete-duplicated-PASSTHROUGH_FS_DIR
runtime-rs: delete duplicated PASSTHROUGH_FS_DIR const
2022-10-08 16:39:03 +08:00
Fabiano Fidêncio
ce73bc6dac Merge pull request #5015 from vijaydhanraj/enable_acrn_kata2.x
Enable ACRN hypervisor support for Kata 2.x release
2022-10-08 09:27:59 +02:00
Bin Liu
4616363eec Merge pull request #5365 from fengwang666/mount-bug-fix
agent: reduce reference count for failed mount
2022-10-08 14:27:38 +08:00
Fupan Li
1b7272c7ca Merge pull request #5367 from fengwang666/signal-bug-fix
agent: don't exit early if signal fails due to ESRCH
2022-10-08 14:21:50 +08:00
Feng Wang
ef5a2dc3bf agent: don't exit early if signal fails due to ESRCH
ESRCH usually means the process has exited. In this case,
the execution should continue to kill remaining container processes.

Fixes: #5366

Signed-off-by: Feng Wang <feng.wang@databricks.com>
[Fix up cargo updates]
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2022-10-08 12:15:12 +08:00
Bin Liu
5ace4e2354 Merge pull request #5304 from liubin/fix/5299-delete-duplicated-get_bundle_path
kata-sys-util: delete duplicated get_bundle_path
2022-10-08 10:57:52 +08:00
Vijay Dhanraj
435c8f181a acrn: Enable ACRN hypervisor support for Kata 2.x release
Currently ACRN hypervisor support in Kata2.x releases is broken.
This commit re-enables ACRN hypervisor support and also refactors
the code so as to remove dependency on Sandbox.

Fixes #3027

Signed-off-by: Vijay Dhanraj <vijay.dhanraj@intel.com>
2022-10-07 07:40:32 -07:00
Feng Wang
c31cf7269e agent: reduce reference count for failed mount
The kata agent adds a reference for each storage object before mount
and skip mount again if the storage object is known. We need to
remove the object reference if mount fails.

Fixes: #5364

Signed-off-by: Feng Wang <feng.wang@databricks.com>
2022-10-06 21:37:59 -07:00
Archana Shinde
6e2d39c588 Merge pull request #5311 from likebreath/0930/clh_v27.0
Upgrade to Cloud Hypervisor v27.0
2022-10-04 10:56:00 -07:00
Fabiano Fidêncio
d5572d5fd5 Merge pull request #5106 from norbjd/fix/microvm-machine-options
microvm: Remove kernel_irqchip=on option
2022-10-04 12:19:37 +02:00
Bo Chen
067e2b1e33 runtime: clh: Use the new API to boot with TDX firmware (td-shim)
The new way to boot from TDX firmware (e.g. td-shim) is using the
combination of '--platform tdx=on' with '--firmware tdshim'.

Fixes: #5309

Signed-off-by: Bo Chen <chen.bo@intel.com>
2022-10-03 10:30:54 -07:00
Bo Chen
5d63fcf344 runtime: clh: Re-generate the client code
This patch re-generates the client code for Cloud Hypervisor v27.0.
Note: The client code of cloud-hypervisor's (CLH) OpenAPI is
automatically generated by openapi-generator [1-2].

[1] https://github.com/OpenAPITools/openapi-generator
[2] https://github.com/kata-containers/kata-containers/blob/main/src/runtime/virtcontainers/pkg/cloud-hypervisor/README.md

Fixes: #5309

Signed-off-by: Bo Chen <chen.bo@intel.com>
2022-10-03 10:30:42 -07:00
Fabiano Fidêncio
0143036b84 Merge pull request #5303 from liubin/fix/5296-typo-unknow
kata-sys-util: fix typo `unknow`
2022-10-03 15:29:45 +02:00
norbjd
17de94e118 microvm: Remove kernel_irqchip=on option
`kernel_irqchip` option doesn't seem to bring any benefits and, on the
contrary, its usage cause issues when using the microvm machine type.

With this in mind, let's remove it.

Fixes: #1984, #4386

Signed-off-by: norbjd <norbjd@users.noreply.github.com>
Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2022-10-03 11:48:05 +02: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
43ae972335 kata-sys-util: delete duplicated get_bundle_path
get_bundle_path has already defined in spec.rs,
delete it from fs.rs.

Fixes: #5299

Signed-off-by: Bin Liu <bin@hyper.sh>
2022-09-30 15:50:58 +08:00
Bin Liu
ac04831223 kata-sys-util: fix typo unknow
Change `unknow` to `unknown`.

Fixes: #5296

Signed-off-by: Bin Liu <bin@hyper.sh>
2022-09-30 15:47:34 +08:00
Bin Liu
805e80b2a2 Merge pull request #5278 from openanolis/chao/update_linux_loader_ut
dragonball: update ut for kernel config
2022-09-30 11:12:29 +08:00
Jianyong Wu
6d585d5919 dragonball: fix no "as_str" error on Arm
Cmdline struct update in the latest linux-loader lib and its as_str
method is changed to as_cstring, thus we need fix it according whereas
the old as_str method is used.

Fixes: #5287
Signed-off-by: Jianyong Wu <jianyong.wu@arm.com>
2022-09-29 21:06:31 +08:00
Bin Liu
949ffcc457 Merge pull request #5281 from liubin/fix/5280-update-cargo-lock
runtime-rs: update Cargo.lock
2022-09-29 17:16:21 +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
457b0beaf0 runtime-rs: update Cargo.lock
src/dragonball/Cargo.toml is updated and the Cargo.lock is not
commited into repo.

Fixes: #5280

Signed-off-by: Bin Liu <bin@hyper.sh>
2022-09-29 13:15:01 +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
Chao Wu
f89ada2de1 dragonball: update ut for kernel config
Since linux loader is updated in the Dragonball and the api for Cmdline
has been changed ( as_str() changed to as_cstring() ), we need to update
unit test in Dragonball.

fixes: #5277

Signed-off-by: Chao Wu <chaowu@linux.alibaba.com>
2022-09-29 11:35:45 +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
2f1a4b02ee Merge pull request #5254 from openanolis/chao/update_linux_loader
Dragonball: update linux_loader to 0.6.0
2022-09-28 15:04:09 +08:00
Bin Liu
0f6884b8c3 Merge pull request #5252 from zhaoxuat/main
modify virtio_net_dev_mgr.rs wrong code comments
2022-09-28 11:34:20 +08:00
Bin Liu
d0be4a285e Merge pull request #5260 from GabyCT/topic/fixrunkdoc
docs: Update urls in runk documentation
2022-09-28 11:30:39 +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
Gabriela Cervantes
9bd941098e docs: Update urls in runk documentation
This PR updates the urls that we have in the runk documentation.

Fixes #5259

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2022-09-27 15:45:43 +00:00
Chao Wu
90ecc015e0 Dragonball: update linux_loader to 0.6.0
Since linux-loader 0.4.0 and 0.5.0 is yanked due to null terminator bug,
we need to update linux-loader to 0.6.0.

And as_str() function should also be changed.

fixes: #5253

Signed-off-by: Chao Wu <chaowu@linux.alibaba.com>
2022-09-27 23:01:44 +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
zhaoxu
abc26b00bb dragonball: modify wrong code comments
modify virtio_net_dev_mgr.rs wrong code comments

Fixes: #5252

Signed-off-by: zhaoxu <zhaoxu@megvii.com>
2022-09-27 18:32:13 +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
Peng Tao
8a2df6b31c Merge pull request #4931 from jpecholt/snp-support
Added SNP-Support for Kata-Containers
2022-09-27 14:17:54 +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
Chelsea Mafrica
de869f2565 Merge pull request #5188 from liubin/fix/5187-incorrect-comments-in-kata-types-hypervisor
runtime-rs: fix incorrect comments
2022-09-22 14:09:20 -07:00