Commit Graph

8126 Commits

Author SHA1 Message Date
Julio Montes
955d359f9e kernel: add missing config fragment for TDx
Add kernel config fragment that enables TDx

fixes #3659

Signed-off-by: Julio Montes <julio.montes@intel.com>
2022-02-14 07:40:12 -06:00
James O. D. Hunt
8f80dffead
Merge pull request #3648 from yaoyinnan/index-in-for
runtime: The index variable is initialized multiple times in for
2022-02-14 12:36:46 +00:00
James O. D. Hunt
3d3af84cde
Merge pull request #3636 from Kvasscn/kata_dev_fix_check_build_type
scripts: fix a typo while to check build_type
2022-02-14 12:33:59 +00:00
Fabiano Fidêncio
7ae8901a66
Merge pull request #3483 from fidencio/wip/bump-crio-to-its-1.23-release
versions: bump CRI-O to its 1.23 release
2022-02-14 10:06:51 +01:00
Bin Liu
cf53ec2c71
Merge pull request #2977 from luodw/support_nydus
feature(nydusd): add nydusd support to introduce lazyload ability
2022-02-14 13:08:50 +08:00
Eric Ernst
172fac5cc8
Merge pull request #3613 from hxtmdev/markdown-relative
docs: Fix relative links in Markdown
2022-02-13 21:01:41 -08:00
Fabiano Fidêncio
56c51fba4b
Merge pull request #3651 from devimc/2022-02-11/packaging/supportKernelTDx
kernel: support TDx
2022-02-13 13:13:38 +01:00
yaoyinnan
42a878e6c1 runtime: The index variable is initialized multiple times in for
Change the variables `mountTypeFieldIdx := 8`, `mntDestIdx := 4` and `netNsMountType := "nsfs"` to const.

And unify the variable naming style, modify `mntDestIdx` to `mountDestIdx`.

Fixes: #3646

Signed-off-by: yaoyinnan <yaoyinnan@foxmail.com>
2022-02-12 11:10:10 +08:00
Julio Montes
1797b3eb04 packaging/kernel: build TDX guest kernel
Add support for building TDX kernel from github.com/intel/tdx

To build a guest kernel that supports Intel TDx run:

```
./build-kernel.sh -s -x tdx -d setup
./build-kernel.sh -s -x tdx -d install
```

fixes #3650

Signed-off-by: Julio Montes <julio.montes@intel.com>
2022-02-11 16:00:32 -06:00
Julio Montes
9875252917 versions: add url and tag for tdx kernel
Add url and tag for tdx kernel

Signed-off-by: Julio Montes <julio.montes@intel.com>
2022-02-11 15:44:18 -06:00
Julio Montes
bc8464e04f packaging/kernel: add option -s option
Add -s option to skip .config checks

Signed-off-by: Julio Montes <julio.montes@intel.com>
2022-02-11 15:44:03 -06:00
Julio Montes
dfbde2e06c
Merge pull request #3643 from dgibson/vfio-env-fix
device: Actually update PCIDEVICE_ environment variables for the guest
2022-02-11 10:47:33 -06:00
luodaowen.backend
2d9f89aec7 feature(nydusd): add nydusd support to introduse lazyload ability
Pulling image is the most time-consuming step in the container lifecycle. This PR
introduse nydus to kata container, it can lazily pull image when container start. So it
can speed up kata container create and start.

Fixes #2724

Signed-off-by: luodaowen.backend <luodaowen.backend@bytedance.com>
2022-02-11 21:41:17 +08:00
Daniel Höxtermann
b19b6938a8 docs: Fix relative links in Markdown
Relative links within this repository allow for easier navigation to
the corresponding file / directory in the current commit / for the
selected version.

Link text was slightly changed / fixed in
- docs/Unit-Test-Advice.md
- docs/how-to/how-to-run-docker-with-kata.md

Fixes #3045

Signed-off-by: Daniel Höxtermann <daniel@hxtm.dev>
2022-02-11 13:49:42 +01:00
David Gibson
9590874d9c device: Update PCIDEVICE_ environment variables for the guest
In commit 78dff468bf1 we introduced logic to rewrite PCIDEVICE_ environment
variables for the container so that they contain correct addresses for the
Kata VM rather than for the host.  Unfortunately, we never actually invoked
the function to do this.

It turns out we need to do this not only at container creation time, but
also for environment variables supplied to processes exec-ed into the
container after creation (e.g. with crictl exec).  Add calls to make both
those updates.

fixes #3634

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2022-02-11 13:46:36 +11:00
David Gibson
7b7f426a3f device: Keep host to VM PCI mapping persistently
add_devices() generates a mapping of host to guest PCI addresses which is
used to update some environment variables for the workload.  Currently it
just does this locally, but it turns out we're going to need the same map
again in order to correct environment variables for processes exec-ed into
the existing container.

Move the map to the sandbox structure so we can keep it around for those
later uses.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2022-02-11 13:46:17 +11:00
David Gibson
0b2bd64124 device: Rework update_spec_pci() to update_env_pci()
This function updates PCIDEVICE_ environment variables (such as those
supplied by the Kubernetes SR-IOV plugin) in the OCI spec to be correct
for the Kata VM, rather than for the host.

We neglected to actually call this function, however, and it turns out that
when we do, we need to do things slightly different.  We actually need to
adjust envionment variables both in the OCI spec when creating a container
and also in the variables supplied for exec-ing a new process within an
existing container.

Adjust the function so that it can be used for both these cases.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2022-02-11 13:46:05 +11:00
Eric Ernst
88b3e9e848
Merge pull request #3617 from hxtmdev/fluentd-link
docs: Update link to EFK stack docs
2022-02-10 12:50:17 -08:00
Julio Montes
046aae7e52
Merge pull request #3619 from devimc/2021-02-03/supportQEMUSGX
runtime: support QEMU SGX
2022-02-10 11:36:49 -06:00
Julio Montes
982f14fa66 runtime: support QEMU SGX
Enable SGX in QEMU when `sgx.intel.com/epc` annotation is defined

fixes #3436

Signed-off-by: Julio Montes <julio.montes@intel.com>
2022-02-10 09:45:48 -06:00
Daniel Höxtermann
40aa43f429 docs: Update link to EFK stack docs
Fixes #3616

Signed-off-by: Daniel Höxtermann <daniel@hxtm.dev>
2022-02-09 15:32:21 -08:00
Fabiano Fidêncio
0f856da402
Merge pull request #3628 from jongwu/snap_qemu_version
snap: update qemu version to 6.1.0 for arm
2022-02-09 20:12:28 +01:00
zhanghj
54e1faec4c scripts: fix a typo while to check build_type
check $build_type is not an empty string instead of equal to "true".

Fixes: #3635

Signed-off-by: zhanghj <zhanghj.lc@inspur.com>
2022-02-09 17:13:04 +08:00
Eric Ernst
901a9d7cad
Merge pull request #3612 from snir911/release_fixes
Release process related fixes
2022-02-08 16:36:14 -08:00
Samuel Ortiz
07b9d93f5f virtcontainer: Simplify the sandbox network creation flow
We don't need to call NewNetwork() twice, and we can have the VM factory
case return immediatly. That makes the code more readable.

Signed-off-by: Samuel Ortiz <s.ortiz@apple.com>
2022-02-08 22:27:53 +01:00
Samuel Ortiz
2c7087ff42 virtcontainers: Make all endpoints Linux only
All of the networking endpoints are Linux specific.

Signed-off-by: Samuel Ortiz <s.ortiz@apple.com>
2022-02-08 22:27:53 +01:00
Samuel Ortiz
49d2cde1e2 virtcontainers: Split network tests into generic and OS specific parts
Some unit tests are generic while others, mostly because they depend on
netlink, are Linux specific.

Signed-off-by: Samuel Ortiz <s.ortiz@apple.com>
2022-02-08 22:27:53 +01:00
Samuel Ortiz
0269077ebf virtcontainers: Remove the netlink package dependency from network.go
Move the netlink dependent code into network_linux.go.
Other OSes will have to provide the same functions.

Signed-off-by: Samuel Ortiz <s.ortiz@apple.com>
2022-02-08 22:27:53 +01:00
Samuel Ortiz
7fca5792f7 virtcontainers: Unify Network endpoints management interface
And only have AddEndpoints/RemoveEndpoints for all cases (single
endpoint vs all of them, hotplug or not).

Signed-off-by: Samuel Ortiz <s.ortiz@apple.com>
2022-02-08 22:27:53 +01:00
Samuel Ortiz
c67109a251 virtcontainers: Remove the Network PostAdd method
It's used once by the sandbox code and can be implemented directly
there.

Signed-off-by: Samuel Ortiz <s.ortiz@apple.com>
2022-02-08 22:27:53 +01:00
Samuel Ortiz
e0b264430d virtcontainers: Define a Network interface
And move the Linux implementation into a GOOS specific file.

Fixes #3005

Signed-off-by: Samuel Ortiz <s.ortiz@apple.com>
2022-02-08 22:27:53 +01:00
Samuel Ortiz
5e119e90e8 virtcontainers: Rename the Network structure fields and methods
We are converting the Network structure into an interface, so that
different host OSes can have different networking implementations for
Kata.
One step into that direction is to rename all the Network structure
fields and methods to something that is less Linux networking namespace
specific. This will make the Network interface naming consistent.

Signed-off-by: Samuel Ortiz <s.ortiz@apple.com>
2022-02-08 22:27:53 +01:00
Samuel Ortiz
b858d0dedf virtcontainers: Make all Network fields private
Prepare for making it a real interface.

Signed-off-by: Samuel Ortiz <s.ortiz@apple.com>
2022-02-08 22:27:53 +01:00
Samuel Ortiz
49eee79f5f virtcontainers: Remove the NetworkNamespace structure
It is now replaced with a single Network structure

Signed-off-by: Samuel Ortiz <s.ortiz@apple.com>
2022-02-08 22:27:53 +01:00
Samuel Ortiz
844eb61992 virtcontainers: Have CreateVM use a Network reference
We are replacing the NetworkingNamespace structure with the Network
one, so we should have the hypervisor interface switching to it as well.

Signed-off-by: Samuel Ortiz <s.ortiz@apple.com>
2022-02-08 22:27:53 +01:00
Samuel Ortiz
d7b67a7d1a virtcontainers: Network API cleanups and simplifications
Remove unused parameters.
Reduce the number of parameters by deriving some of them (e.g. a
networking config) from their outer structure (e.g. a Sandbox
reference).

Signed-off-by: Samuel Ortiz <s.ortiz@apple.com>
2022-02-08 22:27:53 +01:00
Samuel Ortiz
2edea88369 virtcontainers: Make the Network structure manage endpoints
Endpoints creations, attachement and hotplug are bound to the networking
namespace described through the Network structure.
Making them Network methods is natural and simplifies the code.

Signed-off-by: Samuel Ortiz <s.ortiz@apple.com>
2022-02-08 22:27:53 +01:00
Samuel Ortiz
8f48e28325 virtcontainers: Expand the Network structure
For simplicity sake, there should only be one networking structure per
sandbox, as opposed to two (Network and NetworkingNamespace) currently.

This commit start expanding the Network structure in order to eventually
make it the single representation of a virtcontainers sandbox
networking.

Signed-off-by: Samuel Ortiz <s.ortiz@apple.com>
2022-02-08 22:27:53 +01:00
Fabiano Fidêncio
193f7a4626
Merge pull request #3606 from wainersm/openshift-ci_stream8
openshift-ci: switch to CentOS Stream
2022-02-08 21:26:15 +01:00
Pierre Kohler
5ef522f7c3 runtime: check kvm module sev correctly
Runtime now accepts both `1` and `Y` as valid values for
kvm_amd module parameter kvm_amd.sev.

Fixes #3273

Signed-off-by: Pierre Kohler <pierre.kohler@cysec.systems>
2022-02-07 23:48:47 +01:00
Jianyong Wu
419d813427 snap: update qemu version to 6.1.0 for arm
Update qemu version of snap for arm to 6.1.0 thus the arch specific qemu
version for arm needs clean up.

Fixes: #3627
Signed-off-by: Jianyong Wu <jianyong.wu@arm.com>
2022-02-07 14:48:23 +08:00
Snir Sheriber
007221875e docs: update Release-Process.md
with a reminder to test kata-deploy

Fixes: #3611
Signed-off-by: Snir Sheriber <ssheribe@redhat.com>
2022-02-06 09:15:57 +02:00
Snir Sheriber
496bc10de2 tools: check for yq before using it
as get_from_kata_deps may be called from scripts that
does not install_yq

Signed-off-by: Snir Sheriber <ssheribe@redhat.com>
2022-02-06 09:14:31 +02:00
Fabiano Fidêncio
88a70d32ba Revert "workflows: Ensure a label change re-triggers the actions"
This reverts commit 7a879164bd, as it's
been proved that re-triggering the checks at every single change is more
painful than having to close / re-open a PR in case we ever use the
`force-skip-ci` label again.

Fixes: #2804

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2022-02-04 00:01:21 +01:00
Eric Ernst
e8eb5e8295
Merge pull request #3609 from egernst/rootless-linux
virtcontainers: Split the rootless package into OS specific parts
2022-02-03 12:19:31 -08:00
GabyCT
3603105669
Merge pull request #3584 from devimc/2022-01-31/splitTDVF
runtime: suppport split firmware
2022-02-03 10:24:20 -06:00
Wainer dos Santos Moschetta
a9bebb3169 openshift-ci: switch to CentOS Stream
The build root container is switched from CentOS 8 to Stream 8 as
the former reached EOL.

Fixes #3605
Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
2022-02-02 19:50:01 -03:00
Eric Ernst
c78ffe4cc8
Merge pull request #3587 from egernst/kata-test-deploy-action
kata-deploy: for testing, make sure we use the PR branch
2022-02-02 12:09:11 -08:00
Eric Ernst
89047901b3 kata-deploy-push: only run if PR modifying tools path
Since we are using this to exercise any changes to osbuilder or
packaging scripts, let's make sure that we only run the test in that
case.

Similarly, don't run for every single push. Just run this workflow for
pull requests.

Fixes: #3594

Signed-off-by: Eric Ernst <eric_ernst@apple.com>
2022-02-02 10:16:18 -08:00
GabyCT
43f68252ff
Merge pull request #3582 from GabyCT/topic/removezun
docs: Remove Zun documentation with kata containers
2022-02-02 10:54:56 -06:00