Commit Graph

9858 Commits

Author SHA1 Message Date
GabyCT
c6b7f69040
Merge pull request #5837 from deagon/doc-fix
docs: add hint of probing loop module
2023-01-11 12:20:47 -06:00
Tim Zhang
c91b142587
Merge pull request #6035 from liubin/fix/5376-set-a-fixed-cgroups-version
tools: add --locked option for cargo install
2023-01-11 20:44:23 +08:00
Bin Liu
64c9114a39 tools: add --locked option for cargo install
There is a broken release of cgroup-rs, but cargo install will not use
the version in Cargo.lock, so add the `--locked` option to use the version
specified in the Cargo.toml

Fixes: #5376

Signed-off-by: Bin Liu <bin@hyper.sh>
2023-01-11 19:34:46 +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
Eric Ernst
07e77f5be7
Merge pull request #5994 from dcantah/virtcontainers_tests_darwin
virtcontainers: tests: Ensure Linux specific tests are just run on Linux
2023-01-10 17:13:28 -08:00
Fabiano Fidêncio
147c56bb8d
Merge pull request #6019 from liubin/fix/6018-virtiofsd-cache-mod
Change cache mode from none to never
2023-01-10 23:12:13 +01:00
Bin Liu
709483425f
Merge pull request #6014 from GabyCT/topic/fixinidentationaks
tools: Fix indentation for setup aks script
2023-01-10 17:49:27 +08:00
Bin Liu
8225d8044e
Merge pull request #6003 from dcantah/fs-skeleton
virtcontainers: fs_share: Add Darwin skeleton
2023-01-10 17:48:45 +08:00
Bin Liu
86a82cace9 runtime: 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 17:29:48 +08:00
Bin Liu
82c59efd65 runtime-rs: 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 16:14:59 +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
Bin Liu
fee4e7c7c4 docs: 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:19:25 +08:00
Eric Ernst
4d53303a7d
Merge pull request #6005 from dcantah/vfw-skeleton
virtcontainers: Add a Virtualization.framework skeleton
2023-01-09 15:50:04 -08:00
Gabriela Cervantes
f8a93a1ded tools: Fix indentation for setup aks script
This PR fixes the indentation for setup aks script being used
in tools.

Fixes #6013

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-01-09 15:27:50 +00:00
Tim Zhang
6628891666
Merge pull request #5982 from liubin/fix/5981-remove-tests-func
kata-ctl: remove get_kata_version_by_url function
2023-01-09 18:18:21 +08:00
Bin Liu
03de5f41b2 kata-ctl: remove get_kata_version_by_url function
In `src/tools/kata-ctl/src/check.rs`, there is a function
`get_kata_version_by_url` in the tests mod,
indeed we can use the `get_kata_all_releases_by_url` in the main mod
to replace it.

Fixes: #5981

Signed-off-by: Bin Liu <bin@hyper.sh>
2023-01-09 15:32:16 +08:00
Fupan Li
2b34f0a54f
Merge pull request #5992 from liubin/fix/5987-kata-ctl-s390x-build-error
kata-ctl: fix build error on s390x
2023-01-09 15:28:37 +08:00
Bin Liu
1bae41a4d4
Merge pull request #5996 from dcantah/vfw-initial
virtcontainers: Introduce hypervisor_darwin
2023-01-09 11:37:02 +08:00
Jianyong Wu
464d4c94de runtime-rs: process single_container
Process single_container like pod_sandbox when create container but like
pod_container when get the size info of memory/cpu from oci/spec.

Fixes: #6006
Signed-off-by: Jianyong Wu <jianyong.wu@arm.com>
2023-01-09 10:29:01 +08: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
Samuel Ortiz
fa9ae9362c virtcontainers: Add a Virtualization.framework skeleton
Fixes: #6004

A Virtualization.framework based Hypervisor implementation.
This is just stubs for now to eventually get this building.

Signed-off-by: Samuel Ortiz <s.ortiz@apple.com>
Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-01-08 07:40:21 -08:00
Eric Ernst
d48b22bb13 virtcontainers: fs_share: add Darwin skeleton
Fixes: #6002

As a first pass for testing, let's add a skeleton for filesystem
sharing support on Darwin..

Signed-off-by: Eric Ernst <eric_ernst@apple.com>
Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-01-07 19:56:47 -08:00
Bin Liu
2c10b37172
Merge pull request #5991 from dcantah/darwin-sigs
runtime: Define Darwin handled signals list
2023-01-07 11:19:48 +08:00
Bin Liu
bc8a6423e0
Merge pull request #5986 from dcantah/nydus-nonetns
nydus: net-ns handling needs to be only executed on Linux hosts
2023-01-07 11:19:07 +08:00
Bo Chen
8265aad380
Merge pull request #6001 from fidencio/topic/add-network-hotplug-support-for-clh
clh: Ensure it works with Docker / Moby
2023-01-06 13:06:57 -08:00
Eric Ernst
fafc7a8b1a virtcontainers: tests: Ensure Linux specific tests are just run on Linux
Fixes: #5993

Several tests utilize linux'isms like Mounts, bindmounts, vsock etc.

Let's ensure that these are still tested on Linux, but that we also skip
these tests when on other operating systems (Darwin). This commit just
moves tests; there shouldn't be any functional test changes. While the
tests still won't be runnable on Darwin/other hosts yet, this is a necessary
step forward.

Signed-off-by: Eric Ernst <eric_ernst@apple.com>
Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-01-06 11:09:11 -08:00
Fabiano Fidêncio
efa4fc0b25 clh: Add hotplug support for network devices
This is needed in order to have Moby / Docker working properly with
Cloud Hypervisor, as Moby / Docker relies on hotplugging a network
device to the VM as a preStartHook.

Fixes: #5997

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-01-06 18:59:47 +01:00
Fabiano Fidêncio
1074d2c1d3 clh: Make vmAddNetPutRequest capable of doing hotplugs
THe only bit needed for having the vmAddNetPutRequest() capable of
dealing with hotplugs, instead of only coldplugs, is making sure it
doesn't error out in case a `200` response is returned.

The 200 response means:
"""
The new device was successfully added to the VM instance.
"""

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-01-06 18:55:55 +01: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
Fabiano Fidêncio
175794458f
Merge pull request #5972 from bergwolf/github/hook
fix moby prestart hook handling
2023-01-06 14:54:39 +01:00
Eric Ernst
9ec8a13985 virtcontainers: introduce hypervisor_darwin
Fixes: #5995

Placeholder skeleton at this point - implementation will be added after
basic build refactoring lands.

Signed-off-by: Eric Ernst <eric_ernst@apple.com>
Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-01-06 02:03:34 -08:00
Peng Tao
8bb68a9f28 vc/network: skip existing endpoints when scanning for new ones
So that addAllEndpoints() becomes re-entrant and we can use it to scan
netns changes.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2023-01-06 10:01:19 +00:00
Bin Liu
c21a8d5ff8 kata-ctl: fix build error on s390x
Some type is not imported in s390x's mod file.

Fixes: #5987

Signed-off-by: Bin Liu <bin@hyper.sh>
2023-01-06 13:27:28 +08:00
Bin Liu
31abe170fc
Merge pull request #5984 from dcantah/schedcore-nonlinux
schedcore: Make buildable on !linux
2023-01-06 10:38:39 +08:00
Samuel Ortiz
3b4420eb8e runtime: Define Darwin handled signals list
Fixes: #5990

Some signals may not be defined on non Linux host OSes, like
SIGSTKFLT for example. It's also not defined on certain architectures,
but irrelevant for this.

Signed-off-by: Samuel Ortiz <s.ortiz@apple.com>
Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-01-05 17:50:47 -08:00
Danny Canter
24b05a99b6 schedcore: Make buildable on !linux
Fixes: #5983

sched-core only makes sense on Linux hosts. Let's add stub/error for
other platforms.

Signed-off-by: Eric Ernst <eric_ernst@apple.com>
Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-01-05 11:51:04 -08:00
Danny Canter
3886aad199 nydus: net-ns handling needs to be only executed on Linux hosts
Fixes: #5985

With nydus not being its own pkg, it is challenging to implement cleanly
in a virtcontainers package that isn't necesarily Linux-only. The
existing code utilizes network namespace code in order to ensure nydus
is launched in the host netns. This is very Linux specific - so let's
make sure we only carry this out in a linux specific file.

In the Darwin case, to allow for compilation at least, let's add a stub
for doNetNS. Ideally the nydus and vc code can be refactored /
decoupled.

Signed-off-by: Eric Ernst <eric_ernst@apple.com>
Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-01-05 11:48:43 -08:00
Bin Liu
1b46d4fb50
Merge pull request #5611 from wllenyj/dragonball-ut-4
Built-in Sandbox: add more unit tests for dragonball. Part 4
2023-01-05 15:21:36 +08:00
Bin Liu
a40fca1f57
Merge pull request #5976 from yaoyinnan/5825/fix/cleanup-hypervisor
runtime-rs: cleanup the run dir of hypervisor when shut down
2023-01-05 15:14:21 +08:00
Zhongtao Hu
8c4c0d2715
Merge pull request #5467 from tzY15368/feat-katactl-direct-vol
Feat: implementation of kata-ctl direct-volume operations
2023-01-05 14:06:18 +08:00
Bin Liu
4ab9364aa6
Merge pull request #5946 from dcantah/clarify-var
Runtime: Clarify mutability of global var
2023-01-05 13:08:45 +08:00
Bin Liu
649d2d4b8d
Merge pull request #5964 from openanolis/kata-runtime
kata-runtime: add rust runtime path for kata-runtime exec
2023-01-05 09:35:21 +08:00
Fabiano Fidêncio
db372d8897
Merge pull request #5974 from likebreath/0103/clh_v28.1
versions: Upgrade to Cloud Hypervisor v28.1
2023-01-04 19:02:35 +01:00
yaoyinnan
e256903af2 runtime-rs: cleanup the run dir of hypervisor when shut down
Cleanup the run dir of hypervisor when shut down.

Fixes: #5825

Signed-off-by: yaoyinnan <yaoyinnan@foxmail.com>
2023-01-04 22:36:39 +08:00
Bin Liu
e2c7e5f172
Merge pull request #5950 from openanolis/upcall_fea
runtime-rs: add dbs-upcall feature
2023-01-04 16:20:40 +08:00
Tingzhou Yuan
937a41346e kata-ctl: add unit tests for volume ops
Added table driven unit tests and
funcitionality test for functions in volume_ops.

`join_path` relies on safe_path::scoped_join
to validate the unsafe part of the input.
Testcase also takes into account the possibility of specially
constructed string that would get b64-encoded into path-like string.

Fixes #5341

Signed-off-by: Tingzhou Yuan <tzyuan15@bu.edu>
2023-01-04 01:34:40 -05:00
Tingzhou Yuan
8451db7c0c kata-ctl: direct-volume: add Add and Remove handlers
This commit adds direct-volume command handlers for kata-ctl,
 including add, remove, stats and resize. Stats and resize
makes HTTP over UDS calls to runtime-rs while add and remove
 runs locally on the host.

Fixes #5341

Signed-off-by: Tingzhou Yuan <tzyuan15@bu.edu>

kata-ctl: direct-volume: add Add and Remove handlers

This commit adds direct-volume command handlers for kata-ctl,
 including add, remove, stats and resize. Stats and resize
makes HTTP over UDS calls to runtime-rs while add and remove
 runs locally on the host.

Fixes #5341

Signed-off-by: Tingzhou Yuan <tzyuan15@bu.edu>
2023-01-04 01:34:38 -05: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
Bin Liu
38a6bc570d
Merge pull request #5947 from dcantah/yq-darwin
runtime/Makefile: Get some bits happy on darwin
2023-01-04 14:24:43 +08:00