Commit Graph

12991 Commits

Author SHA1 Message Date
Gabriela Cervantes
43a46d5a6b scripts: Add an enhanced die function
This PR adds an enhanced die function in order to dump more information
in a yaml format that will help with the debugging.

Fixes #9105

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2024-02-20 18:27:44 +00:00
Archana Shinde
6d84fe3a37
Merge pull request #8647 from amshinde/cleanup-network
Cleanup network to make sure physical interfaces are restores back to original host driver.
2024-02-20 08:59:53 -08:00
Archana Shinde
6d38fa1530 network: Try removing as many changes as possible during network cleanup
In case an error is encountered while removing a network endpoint during
network cleanup, we cuurently return immediately with the error.
With this change, in case of error we simply log the error and proceed
towards removing the next endpoint. With this, we can cleanup the
network changes made by the shim as much as possible.
This is especially important when multiple interfaces are passed to the
network namespace using a network plugin like multus.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2024-02-20 06:08:05 -08:00
Archana Shinde
b005cda689 network: Move up defer block tp cleanup network
Move the defer for cleaning up network before the call to add network.
This way if any change made by add network is reverted by in case of
failure. This is particulary important for physical network interfaces
as with this step we make sure that driver for the physical interface is
reverted back to the original host driver. Without this the physical
network iterface will remain bound to vfio.

Fixes: #8646

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2024-02-20 06:06:42 -08:00
Ryan Savino
61ce7455c5
Merge pull request #9086 from niteeshkd/nd_snp_upm
packaging: qemu-snp-experimental: support host kernel with gmem
2024-02-19 10:50:13 -06:00
Fabiano Fidêncio
79dc6e95d1
Merge pull request #9108 from fidencio/topic/ci-k8s-fix-wrong-logic-on-confidential-tests
ci: k8s: Fix checks used to skip confidential tests
2024-02-19 12:49:57 +01:00
Xuewei Niu
f9307f6852
Merge pull request #9112 from ChengyuZhu6/vendor
runtime: fix checksum mismatch error in `make vendor`
2024-02-19 10:54:38 +08:00
ChengyuZhu6
96c297cb37 runtime: fix checksum mismatch error in make vendor
Fix checksum mismatch error in `make vendor`.

Fixes: #9111

Signed-off-by: ChengyuZhu6 <chengyu.zhu@intel.com>
2024-02-18 22:22:38 +08:00
Fabiano Fidêncio
3468ac3b6e
ci: k8s: Fix checks used to skip confidential tests
This has been introduced by 53bc4a432b,
where the condition was changed.

The correct condition is:
* If the list of supported tees does not contain the kata hypervisor
  and the list of supported non tees does not contain the kata
  hypervisor.

The error is that we were checking whether kata-hypervisor would contain
the list of supported tees, and that would almost always be false
(unless in the case where the list had an one and only one element).

Fixes: #9055 -- part II

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-02-18 10:10:45 +01:00
Niteesh Dubey
0538bbfc49 packaging: qemu-snp-experimental: support host kernel with gmem
This is required to allow creation of SNP coco on host kernel
(e.g. https://github.com/AMDESE/linux ,branch:snp-host-latest)
supporting guest private memory for SNP using gmem.

Note: This qemu does not work if the host kernel does not support
gmem/UPM.

Fixes: #9092

Signed-off-by: Niteesh Dubey <niteesh@us.ibm.com>
2024-02-15 16:33:46 +00:00
Wainer Moschetta
db744aa8d2
Merge pull request #9023 from ldoktor/webhook-path
tools.kata-webhook: Fix lib path
2024-02-15 12:34:01 -03:00
Fabiano Fidêncio
28b4e5ce51
Merge pull request #9099 from BbolroC/skip-k8s-sandbox-vcpus-allocation-s390x
CI|k8s: Skip vcpu allocation test for s390x
2024-02-15 16:05:18 +01:00
James O. D. Hunt
d1513b2030
Merge pull request #9091 from jodh-intel/packaging-add-kata-manager-script
packaging: Add the kata manager script
2024-02-15 13:08:36 +00:00
Hyounggyu Choi
8b3f7f353d CI|k8s: Skip vcpu allocation test for s390x
A test `vcpu allocation k8s test` exhibits different behavior on s390x
For more details, please refer to issue #9093.
This commit is to make the test skipped until the issue is resolved on
the platform.

Fixes: #9093

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2024-02-15 12:26:35 +01:00
Fabiano Fidêncio
9178541dfb
Merge pull request #9098 from fidencio/topic/runtime-update-runc-to-v1.1.12
runtime: Update runc to v1.1.12
2024-02-15 09:29:10 +01:00
Fabiano Fidêncio
eea4277fbf
runtime: Update runc to v1.1.12
Although we don't seem to be affected by
https://nvd.nist.gov/vuln/detail/CVE-2024-21626, we vendor and use the
runc package in a few different places of our code, and we better update
the package to its latest release.

Fixes: #9097

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-02-14 23:13:39 +01:00
James O. D. Hunt
8c51e02f55 packaging: Add the kata manager script
Add `kata-manager.sh` to the release packages.

Fixes: #9066.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2024-02-14 17:44:42 +00:00
James O. D. Hunt
e49aeec97f packaging: Use variable for default binary permissions
Create a variable for the default binary permissions.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2024-02-14 17:44:35 +00:00
James O. D. Hunt
cc2d96671f packaging: Remove extraneous whitespace
Remove some unnecessary whitespace from a couple of `kata-deploy` files.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>

whitespace

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2024-02-14 17:44:08 +00:00
Fabiano Fidêncio
c95c37d2ab
Merge pull request #9026 from fidencio/topic/packaging-remove-tee-specific-leftovers
packaging: Remove leftovers from the transition from TEE specific kernel / initrd / image to the "confidential" ones
2024-02-13 22:14:26 +01:00
GabyCT
9cf343779f
Merge pull request #9062 from GabyCT/topic/nonteet
tests: Add ability to run non-TEE environments
2024-02-13 14:28:07 -06:00
Fabiano Fidêncio
74c8d243ea
versions: Remove TEE specific kernels
We've switched to using the confidential one, instead.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-02-13 19:07:33 +01:00
Fabiano Fidêncio
adbe24c283
versions: Remove non-used tdx / sev image and initrd entries
We've switched to using the confidential ones, instead.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-02-13 19:07:33 +01:00
Fabiano Fidêncio
6c3338271b
packaging: kernel: Remove sev/snp/tdx specific stuff
Now we're using a "confidential" image that has support for all of
those.

Fixes: #9010 -- part II
       #8982 -- part II
       #8978 -- part II

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-02-13 19:07:33 +01:00
Gabriela Cervantes
598c77409a gha: docker: Pull docker image as part of the dependencies
This PR pulls the docker image needed for the test as part of the dependencies
in order to avoid failures of timeouts mainly because the image was not
properly download it and it is unable to find it.

Fixes #9089

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2024-02-13 17:48:31 +00:00
Gabriela Cervantes
53bc4a432b tests: Add ability to run non-TEE environments
This PR adds the ability to run k8s confidential tests in a
non-TEE environment.

Fixes #9055

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2024-02-13 17:27:55 +00:00
Fabiano Fidêncio
14f4480f12
packaging: Remove specific TEEs image / initrd leftovers
Let's remove the targets as those are not built anymore as part of our
CI.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-02-13 18:03:12 +01:00
Fabiano Fidêncio
0c761f14b3
packaging: Remove specific TEEs kernel leftovers
Let's remove the targets as those are not built anymore as part of our
CI.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-02-13 18:03:11 +01:00
Fabiano Fidêncio
28488f0790
Merge pull request #9082 from fidencio/topic/cleanup-kata-deploy-leftovers-before-start-a-test
tests: Remove kata-deploy-tdx test and ensure kata-deploy is always cleaned up before starting the tests
2024-02-13 18:01:16 +01:00
Gabriela Cervantes
54d1f34650 gha: nydus: Fix indentation in gha run script
This PR fixes the indentation in gha run script for nydus.

Fixes #9087

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2024-02-13 16:53:28 +00:00
Fabiano Fidêncio
a867e19da1
gha: tdx: Stop running kata-deploy tests on TDX
We only have one TDX machine, let's not make it busier than needed.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-02-13 14:14:57 +01:00
Fabiano Fidêncio
3877a9f49a
ci: Clean up kata-deploy ds before starting the tests
This will ensure no leftovers are in the node, which has been cause the
TDX CI to fail every now and then.

Fixes: #9081

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-02-13 14:10:44 +01:00
Fabiano Fidêncio
8fe7349d3e
Merge pull request #9080 from fidencio/topic/dont-add-the-pause-image-to-the-released-tarball
release: Don't ship the pause-image / coco-guest-components as part of the release artefacts
2024-02-13 12:34:29 +01:00
Fabiano Fidêncio
443a5b8327
release: Don't ship the coco-guest-components
In the same way that doesn't make sense to ship the pause-image, it also
doesn't make sense to ship the coco-guest-components itself as part an
release artefact.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-02-13 09:47:26 +01:00
Fabiano Fidêncio
0462b33a5b
release: Don't ship the pause-image
It doesn't make sense to ship the pause-image itself as an release
artefact.

The reason we build it and cache it is in order to use it inside the
rootfs, and that's it, there's not need to ship it as part of the
release, at all.

Fixes: #9032 -- part II

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-02-13 09:45:50 +01:00
GabyCT
00be9ae872
Merge pull request #9070 from microsoft/danmihai1/debug-containers
tests: k8s: avoid deleting unrelated pods
2024-02-12 15:24:15 -06:00
Gabriela Cervantes
69b325a31c docs: Update CI link into the README
This PR updates the CI link into the README as currently we are
using GHA workflows and they are now part of the kata containers
repository.

Fixes #9078

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2024-02-12 20:53:25 +00:00
Greg Kurz
532567bfe9
Merge pull request #8936 from fidencio/topic/fix-cri-o-ci
tests: cri-o: Use packages from pkgs.k8s.io
2024-02-12 10:04:53 +01:00
Dan Mihai
42d13a0f33
Merge pull request #9068 from microsoft/danmihai1/dockerfile-linux-musl-gcc
tools: avoid rootfs-image build "ln -s" error
2024-02-11 18:02:53 -08:00
Greg Kurz
d7afd31fd4
Merge pull request #8455 from BbolroC/runtime-rs-qemu-config
runtime-rs: Add a new config option for QEMU
2024-02-10 08:48:23 +01:00
Dan Mihai
a21ca9b7c9 tests: k8s: avoid deleting unrelated pods
Delete the debugger pod created during the test, rather than already
existing debugger pods.

Also, send the output of "kubectl delete" to stderr, just in case it's
useful for debugging.

Fixes: #9069

Signed-off-by: Dan Mihai <dmihai@microsoft.com>
2024-02-09 22:48:41 +00:00
Dan Mihai
a054462eb7
Merge pull request #9051 from microsoft/danmihai1/k8s-copy-file
tests: k8s: k8s-copy-file auto-generated policy
2024-02-09 12:30:49 -08:00
Hyounggyu Choi
05c4c8055c runtime-rs: Configure argument replacement for QEMU in Makefile
Last but not least, all placeholders for argument replacement
should be configured to generate a configuration file when `QEMUCMD`
is defined. This enriches those variables.

Additionally, this involves creating a symbolic link to `configuration-qemu.toml`
if QEMU is defined as the default hypervisor.

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2024-02-09 19:31:20 +01:00
Dan Mihai
fcd005774d tools: avoid rootfs-image build "ln -s" error
Avoid error when building for amd64 using:

USE_CACHE=no AGENT_POLICY=yes DEBUG=1 \
tools/packaging/kata-deploy/local-build/kata-deploy-binaries.sh \
--build=rootfs-image

Fixes: #9067

Signed-off-by: Dan Mihai <dmihai@microsoft.com>
2024-02-09 17:10:35 +00:00
GabyCT
b8f277676f
Merge pull request #9047 from GabyCT/topic/ukd
docs: Remove jenkins reference in kernel documentation
2024-02-09 10:58:06 -06:00
Fabiano Fidêncio
e78a951e03
Merge pull request #8585 from ChengyuZhu6/dependencies-for-guest-pull
gha: Setup nydus snapshotter for CoCo tests
2024-02-09 16:45:42 +01:00
Hyounggyu Choi
27cb30d8ce runtime-rs: Adjust configuration template for runtime-rs
There are some variables newly introduced to runtime-rs, such as:

- runtime.name
- runtime.hypervisor_name
- runtime.agent_name
- vm_rootfs_driver

Additionally some of the placeholders for argument replacement are
made hypervisor-specific based on the changes made for dragonball.

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2024-02-09 16:26:59 +01:00
ChengyuZhu6
97fbf360cc
gha: Cleanup nydus snapshotter by the daemonset
Cleanup nydus snapshotter by the daemonset.

Signed-off-by: ChengyuZhu6 <chengyu.zhu@intel.com>
2024-02-09 14:47:13 +01:00
ChengyuZhu6
43b04fd0c0
gha: Deploy nydus snapshotter by the daemonset
We can use daemonset to deploy nydus snapshotter, which will decrease
one manual step both for Kata Containers and Confidential Containers CI.

Fixes: #8584

Signed-off-by: ChengyuZhu6 <chengyu.zhu@intel.com>
2024-02-09 14:47:09 +01:00
Julien Ropé
236c2c7650
tests: cri-o: Update critools version to 1.29
This will also update the version of crio used in kata-monitor tests.

Signed-off-by: Julien Ropé <jrope@redhat.com>
2024-02-09 12:15:55 +01:00