Commit Graph

10523 Commits

Author SHA1 Message Date
stevenhorsman
01a88fab2e doc: Remove umoci reference
Remove umoci from doc

Fixes: #3970
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2023-01-25 11:37:56 +00:00
stevenhorsman
ebffb7bc9b kata-deploy: Remove skopeo and umoci
- Now we don't need skopeo and umoci in the rootfs
remove the option from kata-deploy

Fixes: #3970
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2023-01-25 11:37:56 +00:00
stevenhorsman
dd2d6a94f1 osbuilder: Remove option to build skopeo, umoci
Now we don't need to have skopeo and umoci in the rootfs
remove the code that optionally builds and installs them

Fixes: #3970
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2023-01-25 11:37:56 +00:00
stevenhorsman
ee5fb8c998 agent: Remove container_policy_file config
- Remove the container_policy_file config parameter as it was only used
by the skopeo code path

Fixes: #3970
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2023-01-25 11:37:56 +00:00
stevenhorsman
dea1891851 agent: Remove skopeo & umoci
Remove code paths that use skopeo to pull images & umoci to unpack them

Fixes: #3970
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2023-01-25 11:37:56 +00:00
Steve Horsman
49b89c915c
Merge pull request #6117 from stevenhorsman/image-pull-logs
agent: Improve logging of pull image
2023-01-24 08:53:37 +00:00
stevenhorsman
0fc7b4b74d agent: Improve logging of pull image
- Add agent log if pull image fails

Fixes: #6118

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2023-01-23 17:09:39 +00:00
Fabiano Fidêncio
b91337afef
Merge pull request #6066 from fidencio/topic/CC-update-dependencies-for-release
CC | Update dependencies for the v0.3.0 release
2023-01-13 10:06:02 +01:00
Fabiano Fidêncio
7415227645 versions: Bump attestation-agent to v0.3.0
The attestation-agent had its v0.3.0 release earlier Today, following
the Confidential Containers v0.3.0 release process.

Let's bump it on our side, as we've already tested the version that
became this release.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-01-12 19:10:40 +01:00
Fabiano Fidêncio
e87b887589 build: Update image-rs to v0.3.0
image-rs has released its v0.3.0 release earlier Today, following the
v0.3.0 Confidential Containers release process.

The v0.3.0 is based on exactly the same commit we've been using already,
so no changes are expected for us.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-01-12 18:30:59 +01:00
Fabiano Fidêncio
a758cb0f7f versions: Update TD-Shim version to v0.3.0
TD-Shim has released its v0.3.0 release earlier Today, following the
Confidential Containers v0.3.0 release.

Let's update it here.  We need to also bump the toolchain to using the
nightly-2022-11-15

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-01-12 18:19:30 +01:00
Steve Horsman
d1993d2c90
Merge pull request #6057 from stevenhorsman/CCv-no-netns
runtime: fix up disable_netns handling
2023-01-12 13:19:48 +00:00
Peng Tao
d7ca0393d1 runtime: fix up disable_netns handling
With `disable_netns=true`, we should never scan the sandbox netns which
is the host netns in such case.

Fixes: #6021
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
Cherry-picked: 12fd6ff
2023-01-12 08:57:20 +00:00
Steve Horsman
3a46a80fc2
Merge pull request #6034 from fidencio/topic/CC-consider-toolchain-version-for-td-shim-builder-image
CC | packaging: Take toolchain version when using the td-shim builder image
2023-01-11 17:26:08 +00:00
Steve Horsman
cbf2753a28
Merge pull request #6038 from BbolroC/make-target-cc-payload
CC: Support s390x for target cc-payload in Makefile
2023-01-11 17:23:28 +00:00
Hyounggyu Choi
c7148dc2c7 CC: Support s390x for target cc-payload in Makefile
This is to adjust dependencies for a target cc-payload based on
architecture.

Fixes: #6028

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2023-01-11 13:25:33 +01:00
Fabiano Fidêncio
8125f5dc97 packaging: Take toolchain version when using the td-shim builder image
As the toolchain is installed in the image itself, we *must* take the
toolchain into consideration when deciding whether to use a cached image
or building a new one.

Fixes: #6033

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-01-11 12:14:48 +01:00
Fabiano Fidêncio
03631a4360
Merge pull request #6025 from Alex-Carter01/online_kbc_debug
osbuilder: copy efi_secret module for online_sev_kbc
2023-01-10 23:11:44 +01:00
Alex Carter
db22befd78 osbuilder: copy efi_secret module for online_sev_kbc
Bug fix for #5651. Faulty bash syntax let a initrd build complete, but not copy the kernel module.
This change fixes the if logic to work as an 'or' as intended.

Fixes: #6024
Signed-off-by: Alex Carter <Alex.Carter@ibm.com>
2023-01-10 19:04:46 +00:00
Fabiano Fidêncio
ed59cebcbf
Merge pull request #6012 from GeorginaKin/CCv0
CCv0: Merge main into CCv0 branch
2023-01-09 22:51:33 +01:00
Georgina Kinge
73532eb400 runtime: fixing merge conflicts
Signed-off-by: Georgina Kinge <georgina.kinge@ibm.com>
2023-01-09 14:22:32 +00: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
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
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
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
Fabiano Fidêncio
f23b087145
Merge pull request #5977 from stevenhorsman/foreign-CC
CC | agent: unset `CC` for cross-build
2023-01-04 18:36:48 +01:00
James Tumber
f4ececc8ac agent: unset CC for cross-build
When `HOST_ARCH` != `ARCH` unset `CC`

Specifying a foreign CC is incompatible with building libgit2. Thus after the RUSTFLAGS linker
has been set we can safely unset CC to avoid passing this value through the build.

Fixes: #5890

Signed-off-by: James Tumber <james.tumber@ibm.com>
Cherry-picked: 087515a
2023-01-04 15:17:25 +00: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
Fabiano Fidêncio
3db9100a5c
Merge pull request #5651 from Alex-Carter01/online-sev-kbc
osbuilder: Switch to online_sev_kbc
2023-01-04 14:41:59 +01:00