Commit Graph

12405 Commits

Author SHA1 Message Date
Manabu Sugimoto
ff4cfcd8a2 runk: Add Docker guide to README
`runk` can launch containers using Docker, so add the guide
to it's README.

```sh
$ sudo dockerd --experimental --add-runtime="runk=/usr/local/bin/runk"
$ sudo docker run -it --rm --runtime runk busybox echo hello runk
hello runk
```

Fixes: #7431

Signed-off-by: Manabu Sugimoto <Manabu.Sugimoto@sony.com>
2023-07-25 20:10:49 +09:00
Fabiano Fidêncio
471e23cb12 cc: kernel-tdx: Ensure we try the cache for the specific CC version
Otherwise we'd have to build the component every single time as the main
version is different from the CC one.

Fixes: #7422

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-07-25 13:06:43 +02:00
Fabiano Fidêncio
3f309fad01 cc: qemu-tdx: Ensure we try the cache for the specific CC version
Otherwise we'd have to build the component every single time as the main
version is different from the CC one.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-07-25 13:01:15 +02:00
Fabiano Fidêncio
d03685004e cc: tdvf: Ensure we try the cache for the specific CC version
Otherwise we'd have to build the component every single time as the main
version is different from the CC one.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-07-25 13:01:15 +02:00
Fabiano Fidêncio
0749022f8c cc: clh: Ensure we try the cache for the specific CC version
Otherwise we'd have to build the component every single time as the main
version is different from the CC one.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-07-25 12:41:17 +02:00
Jeremi Piotrowski
c8ac56569a cache: kernel: Harmonize commit with fetching side
kata-deploy-binaries.sh uses the last commit in
tools/packaging/static-build/kernel for its version check, while the cache
generation uses tools/packaging/kernel. Use tools/packaging/static-build/kernel
as $kata_config_version is already part of the version string and covers any
changes to tools/packaging/kernel.

Fixes: #7403
Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
2023-07-25 12:23:05 +02:00
Jeremi Piotrowski
81775ab1b3 cache: kernel: Fix SEV kernel caching
The SEV kernel cache calls create_cache_asset() twice, once for the kernel and
once for modules. Both calls need to use the same version string, otherwise the
second call overwrites the "latest" file of the first one and the cache is not
used.

Fixes: #7403
Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
2023-07-25 11:58:19 +02:00
Jeremi Piotrowski
717f775f30 gha: ci: Add skeleton of vfio job
This job will run on a nested virt capable Azure VM (improving test
concurrency). This is just a placeholder while we adapt the test to GHA.

Fixes: #6555
Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
2023-07-25 11:13:04 +02:00
Manabu Sugimoto
b9f100b391 agent,libs: Remove unused 'mut' keywords
Remove unused `mut` because the agent compilation fails
when the rust compiler is >= 1.71. This is related to #7425

Fixes: #7438

Signed-off-by: Manabu Sugimoto <Manabu.Sugimoto@sony.com>
2023-07-25 17:41:08 +09:00
Fabiano Fidêncio
19a86aa072
Merge pull request #7434 from fidencio/topic/CCv0-converge-build-and-payload-scripts-follow-up-1
gha: Fix typo in the workflow name
2023-07-25 10:02:11 +02:00
Fabiano Fidêncio
a40ea43413 gha: Fix typo in the workflow name
Kudos to Magnus who has a better vision than I do.
exprimental -> experimental

Fixes: #7422

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-07-25 09:56:18 +02:00
Fabiano Fidêncio
eb82e0d4b9
Merge pull request #7402 from fidencio/topic/CCv0-converge-build-and-payload-scripts
CCv0 | Ensure kata-deploy scripts from CCv0 are as close to main as possible
2023-07-25 08:45:16 +02:00
Fabiano Fidêncio
a56f96bb2b kata-deploy: Allow shim creation based on what's passed to the daemonset
Instead of hardcoding shims as part of the script, let's ensure we can
allow them to be created based on environment variables passed to the
daemonset.

This change brings no functionality change as the default values in the
daemonset are exactly what has been used as part of the scripts.

Fixes: #7407

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-07-25 08:30:00 +02:00
Fabiano Fidêncio
5ce0b4743f
Merge pull request #7382 from zvonkok/vfio-ap-debug
s390x: Fixing device.Bus assignment
2023-07-25 08:26:25 +02:00
Fabiano Fidêncio
068e535b9d runtime: tdx: Adjust QEMU TDX path
We need to use qemu-system-x86_64-tdx-experimental instead of
qemu-system-x86_64-tdx.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-07-25 00:39:52 +02:00
Fabiano Fidêncio
7204b991e7 kata-deploy-binaries: kernel_cache: Take module_dir into account
`module_dir` has been passed to the function but was never assigned to a
var, leading to errors when trying to use it.

Fixes: #7416

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
(cherry picked from commit d4eba36980)
2023-07-25 00:19:26 +02:00
Fabiano Fidêncio
b8abd6bfee kata-deploy-binaries: Adjust TDVF edk2 tarball name
We must use "edk2-staging-tdx" instead of "edk2-tdx".  The reason for
that is versions diverging between main and CCv0.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-07-25 00:18:35 +02:00
Fabiano Fidêncio
0f022d5771 guest-image: Update kernel_module_dir to main sev kernel
As we're building SEV kernel from the main branch, we can stop relying
on the path produced by the one from the CCv0 branch (which is now
removed).

Fixes: #7422

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-07-25 00:18:35 +02:00
Fabiano Fidêncio
344921849c kata-deploy-binaries: Temporarily disable using cached components
We need to rebuild those with the appropriate path.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-07-25 00:12:21 +02:00
Fabiano Fidêncio
507a89bb32 gha: cc-payload: Adjust to using main componenets
Again, it'll make our lives easier in the near future.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-07-25 00:12:21 +02:00
Fabiano Fidêncio
ef6c0be984 kata-depkoy-binarues: Add tarballs from main to the cc target
Same as the others, it'll help us in the merges.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-07-25 00:12:20 +02:00
Fabiano Fidêncio
20a523f81b kata-deloy-binaries: Get rid of cc_prefix
We'll be using prefix (/opt/kata) from now on, as it simplifies things
on our side.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-07-25 00:12:20 +02:00
Fabiano Fidêncio
4d0b319a8b kata-deploy-binaries: Remove CC OVMF / TDVF
Let's just rely on whatever we have on main.  The big execption here is
TDVF, but we have a big note saying to not update the version n this
branch.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-07-25 00:12:20 +02:00
Fabiano Fidêncio
8d1e1d4b0a kata-deploy-binaries: Remove CC kernel builds
We can simply rely on those coming from main.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-07-25 00:12:20 +02:00
Fabiano Fidêncio
3fa936e492 kata-deploy-binaires: Remove CC virtiofsd build
We can simply ship the one from main.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-07-25 00:12:20 +02:00
Fabiano Fidêncio
f62a88f179 kata-deploy-binaries: Remove CC hypervisor builds
We can just rely on the hypervisors builds from `main`, with the TDX one
being the only discrepancy here.

However, we have a big note in the versions.yaml to **not** update the
TDX hypervisor versions on this branch, so we should be good.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-07-25 00:12:20 +02:00
Fabiano Fidêncio
6f552b010c kata-deploy: Make sure kata-deploy handles kata-deploy-cc content
This will also help us immensely on main -> CCv0 merges

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-07-25 00:12:20 +02:00
Fabiano Fidêncio
4e883fc5be versions: Converge to the same asset names used on main
This will make things easier in the future `main -> CCv0` merges.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-07-25 00:12:16 +02:00
David Esparza
b11d618a3f
Merge pull request #7413 from fidencio/topic/release-publish-builder-images
release: Mention the container images used to build the project
2023-07-24 15:46:31 -06:00
Fabiano Fidêncio
56fdeb1247
Merge pull request #7417 from fidencio/topic/kata-deploy-binaries-cached-kernel-fix
kata-deploy-binaries: kernel_cache: Take module_dir into account
2023-07-24 22:26:09 +02:00
Gabriela Cervantes
4a5ab38f16 metrics: General improvements to json.bash script
This PR adds general improvements like putting function before function
name and consistency in how we declare variables and so on to have
uniformity across the metrics scripts.

Fixes #7429

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-07-24 16:51:38 +00:00
Fabiano Fidêncio
d4eba36980 kata-deploy-binaries: kernel_cache: Take module_dir into account
`module_dir` has been passed to the function but was never assigned to a
var, leading to errors when trying to use it.

Fixes: #7416

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-07-24 18:19:13 +02:00
Fabiano Fidêncio
b7c9867d60 release: Mention the container images used to build the project
This is a small step towards build reproducibility.

Fixes: #7412

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-07-24 18:01:57 +02:00
Wainer Moschetta
2e9853c761
Merge pull request #7427 from fidencio/topic/gha-port-nydus-tests-follow-up-1
ci: nydus: Fix typo in "source"
2023-07-24 11:20:05 -03:00
Fabiano Fidêncio
7c4b597816 ci: nydus: Fix typo in "source"
We should source from `nydus_dir`, instead of `cri_containerd_dir`, and
that was a leftover from fb4f7a002c.

Fixes: #6543

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-07-24 14:55:09 +02:00
Fabiano Fidêncio
589672d510
Merge pull request #7426 from fidencio/topic/gha-port-nydus-tests
gha: ci: Add no-op nydus tests to our CI
2023-07-24 13:56:57 +02:00
Fabiano Fidêncio
6a680e241b gha: ci: Add placeholder for the nydus tests as part of the CI
This will triger the nydus tests, but as they currently are they'll just
return "okay" without actually executing.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-07-24 13:37:36 +02:00
Fabiano Fidêncio
fb4f7a002c gha: nydus: Add a no-op GHA for nydus
This newly added GHA does nothing, is not even triggered, and it's just
a placeholder that we'll grow in the next commits / PRs, so we can
actually start running the nydus tests as part of our CI.

Fixes: #6543

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-07-24 13:37:33 +02:00
Fupan Li
0ae987973b
Merge pull request #7367 from openanolis/chao/migrate_dragonball_sandbox
Dragonball: migrate dragonball-sandbox crates to Kata
2023-07-24 17:52:11 +08:00
Fabiano Fidêncio
4a207a16f9 gha: nydus: Bring tests as they are from the tests repo
Let's bring the nydus tests, without any kind of modification, from the
tests repo.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-07-24 10:56:41 +02:00
Jianyong Wu
2c8f83424d runtime-rs: remove unneeded 'mut' keywords
These unneeded 'mut' keywords blocks built by rust 1.71.0. Remove them.

Fixes: #7424
Signed-off-by: Jianyong Wu <jianyong.wu@arm.com>
2023-07-24 08:47:15 +00:00
Zvonko Kaiser
1fc715bc65 s390x: Add AP Attach/Detach test
Now that we have propper AP device support add a
unit test for testing the correct Attach/Detach of AP devices.

Signed-off-by: Zvonko Kaiser <zkaiser@nvidia.com>
2023-07-23 13:44:19 +00:00
Steve Horsman
16d6e37196
Merge pull request #7418 from wainersm/release_0.7.0-fix
workflows: fix malformed CC payload s390x yaml
2023-07-21 20:52:17 +01:00
Wainer dos Santos Moschetta
b366dc6015 workflows: fix malformed CC payload s390x yaml
The measured_boot matrix parameter should be a list.

Fixes #7400
Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
2023-07-21 16:09:11 -03:00
Fabiano Fidêncio
e1a4040a6c
Merge pull request #7326 from fidencio/topic/gha-ci-add-cri-containerd-tests
ci: gha: Add cri-containerd tests (but still do not enable them)
2023-07-21 19:29:38 +02:00
Fabiano Fidêncio
6a59e227b6
Merge pull request #7399 from fidencio/topic/add-kata-debug
packaging/tools: Add kata-debug and use it as part of our CI
2023-07-21 17:05:27 +02:00
Fabiano Fidêncio
f5420e5cf1
Merge pull request #7401 from fitzthum/bump-070
CC | Update to v0.7.0 tags
2023-07-21 16:56:30 +02:00
Fabiano Fidêncio
e91f5edba0 ci: cri-containerd: Fix default typo for testContainerStart()
It must but {1:-0}, instead of {1-0}.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-07-21 16:54:27 +02:00
Fabiano Fidêncio
8b8aef09af ci: cri-containerd: Temporarily disable TestContainerSwap
The test is currently failing with GHA, and I don't think it makes sense
to block all the other tests to get merged while it's happening.

For now, let's disable it and re-enable it as soon as we have it
passing.

Reference: https://github.com/kata-containers/kata-containers/issues/7410

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-07-21 16:54:27 +02:00
Fabiano Fidêncio
56767001cb ci: cri-containerd: Add namespace / uid to the pods
Otherwise crictl will fail to remove them with:
```
getting sandbox status of pod "$pod": metadata.Name, metadata.Namespace
or metadata.Uid is not in metadata "..."
```

A huge shout out to Steven Horsman for helping to debug this one.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-07-21 16:54:27 +02:00