Commit Graph

13566 Commits

Author SHA1 Message Date
Lukáš Doktor
a556ad7e01
ci.ocp: Document how to run openshift-tests with kata
document the ocp pipeline.

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
2024-05-16 20:15:32 +02:00
Lukáš Doktor
ea081bd882
ci.ocp: Add webhook cleanup
cleanup the webhook resources as well.

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
2024-05-16 20:15:31 +02:00
David Esparza
029a6de52b
Merge pull request #9615 from GabyCT/topic/fixlaunchtime
metrics: Update launch times script
2024-05-16 11:28:44 -06:00
Steve Horsman
33e6b241ba
Merge pull request #9647 from stevenhorsman/fix-artefact-tags-unbound-variable
ci: cache: Fix unbound variable
2024-05-16 16:22:47 +01:00
stevenhorsman
9d9487b17f ci: cache: Fix unbound variable
Now we have the workflow updated and can test the changes in caching
we've hit an error:
```
line 1180: artefact_tag: unbound variable
```
so we need to fix that up. Sorry for missing this before.

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2024-05-16 14:30:32 +01:00
Steve Horsman
03c08583c3
Merge pull request #9644 from stevenhorsman/fix-broken-workflow
workflow: Remove if from env conditional
2024-05-16 14:13:25 +01:00
stevenhorsman
f7fd2f9a5d workflow: Fix problems with build-asset workflows
- It appears like the `if` isn't required when setting env as a
conditional
- `inputs.stage` over input.stage
- Swap matrix.component to matrix.asset

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2024-05-16 11:51:46 +01:00
Steve Horsman
d8468cb178
Merge pull request #9550 from stevenhorsman/tag-component-caches
Tag component caches
2024-05-16 11:05:18 +01:00
Steve Horsman
b31ff09b8d
Merge pull request #9617 from zvonkok/artefact-repository
deploy: Add artefact repository
2024-05-16 10:41:23 +01:00
Fabiano Fidêncio
4d073c837d
Merge pull request #9636 from ChengyuZhu6/snapshotter
version: Bump nydus snapshotter to v0.13.13
2024-05-16 02:54:53 +02:00
GabyCT
05cc8fae5e
Merge pull request #9610 from GabyCT/topic/fixrwfio
metrics: Fix random write value for FIO
2024-05-15 17:44:41 -06:00
Gabriela Cervantes
793a02600a metrics: Fix random write value for clh for FIO
This PR decreases the random write value for clh for FIO.

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2024-05-15 22:13:10 +00:00
GabyCT
d752f0aa4f
Merge pull request #9627 from GabyCT/topic/ghacomk8s
gha: Fix indentation in gha run k8s common
2024-05-15 11:55:14 -06:00
stevenhorsman
7f41329010 ci: cache: Optional tag components with tags
- CoCo wants to use the agent and coco-guest-components cached artifacts
so tag them with a helpful version, so make these easier to get

Signed-off-by: stevenhorsman <steven@uk.ibm.com>

 No commands remaining.
2024-05-15 16:56:40 +01:00
stevenhorsman
9999971656 release: Move component's don't ship logic
- We don't want to ship certain components (agent, coco-guest-components)
as part of the release, but for other consumers it's useful to be able to pull in the components
from oras, so rather than not building them, just don't upload it as part of the release.
- Also make the archs all consistent on not shipping the agent

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2024-05-15 16:55:55 +01:00
stevenhorsman
040e6cdf12 gha: release: Set RELEASE env
- Set RELEASE env to 'yes', or 'no', based on if the stage
passed in was 'release', so we can use it in the build scripts

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2024-05-15 16:55:55 +01:00
stevenhorsman
d93156d84d gha: release: Push artifacts to registry on release
For other projects (e.g. CoCo projects) being able to
access the released versions of components is helpful,
so push these during the release process

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2024-05-15 16:55:55 +01:00
Steve Horsman
19ca1a6656
Merge pull request #9638 from BbolroC/use-fixed-len-git-hash-explicitly
CI: Use `--abbrev=9` explicitly for abbreviated commit hash
2024-05-15 16:55:07 +01:00
GabyCT
64b915b86e
Merge pull request #9438 from GabyCT/topic/addnegativetest
tests: Add k8s negative policy test
2024-05-15 08:52:57 -06:00
Hyounggyu Choi
e075150fbe CI: Use --abbrev=9 explicitly for abbreviated commit hash
A length of the result of `git log -1 --pretty=format:%h` could vary
over different CI systems, highly likely messing up their caching
mechanisms.

This commit is to use an option `--abbrev=9` to standardize the length
to 9 characters for CI.

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2024-05-15 14:22:07 +02:00
Zvonko Kaiser
117e2f2ecc
Merge pull request #9618 from zvonkok/nvidia-rootfs-#1
gpu: Add build targets for GPU rootfs initrd/image
2024-05-15 13:30:42 +02:00
Hyounggyu Choi
6a4ff08156
Merge pull request #9632 from BbolroC/do-not-build-agent-policy-for-s390x
local-build: Ensure the default rootfs is built with AGENT_POLICY=yes
2024-05-15 06:56:22 +02:00
ChengyuZhu6
d48c7ec979 version: Bump nydus snapshotter to v0.13.13
Bump nydus snapshotter to v0.13.13 to fix the gap when switching
different snapshotters in guest pull.

Fixes: #8407

Signed-off-by: ChengyuZhu6 <chengyu.zhu@intel.com>
2024-05-15 12:21:01 +08:00
Fabiano Fidêncio
92bb235723
osbuilder: Log when the default policy is installed
This will help us to debug issues in the future (and would have helped
in the past as well). :-)

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-05-14 20:45:49 +02:00
Fabiano Fidêncio
75bd97e8df
build: Ensure the default rootfs is built with AGENT_POLICY=yes
This is needed, as b1710ee2c0 made the
default agent shipped the one with policy support.  However, we simply
didn't update the rootfs to reflect that, causing then an issue to start
the agent as shown by the strace below:
```
open("/etc/kata-opa/default-policy.rego", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
futex(0x7f401eba0c28, FUTEX_WAKE_PRIVATE, 1) = 1
rt_sigprocmask(SIG_BLOCK, ~[RTMIN RT_1 RT_2], [], 8) = 0
tkill(553681, SIGABRT)                  = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
--- SIGABRT {si_signo=SIGABRT, si_code=SI_TKILL, si_pid=553681, si_uid=1000} ---
+++ killed by SIGABRT (core dumped) +++
```

This happens as the default policy **must** be set when the agent is
built with policy support, but the code path that copies that into the
rootfs is only triggered if the rootfs itself is built with
AGENT_POLICY=yes, which we're now doing for both confidential and
non-confidential cases.

Sadly this was not caught by CI till we the cache was not used for
rootfs, which should be solved by the previous commit.

Fixes: #9630, #9631

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-05-14 20:39:15 +02:00
Hyounggyu Choi
37060a7d2e
local-build: Stop using cached artifacts when local-build/* is updated
This is to add an info for files at `tools/packaging/kata-deploy/local-build/*
to a version of the components and ensure that the cached artefacts are not used
when the files of interest are updated.

Fixes: #9630

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2024-05-14 19:47:33 +02:00
Fabiano Fidêncio
9a3392993d
Merge pull request #9629 from ldoktor/tdx_not_supported_warning
kata-deploy: Fix tdx_not_supported call
2024-05-14 17:27:56 +02:00
Greg Kurz
f14a1330d4
Merge pull request #9585 from littlejawa/debugging_the_runtime
debugging: adding a script and instructions for debugging the GO shim
2024-05-14 15:31:07 +02:00
Lukáš Doktor
d9ae130031
kata-deploy: Fix tdx_not_supported call
the `tdx_not_supported_warning` function does not exists, the
`tdx_not_supported` should be called instead.

Fixes: #9628

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
2024-05-14 13:26:07 +02:00
Julien Ropé
e7cfc0865a debugging: adding a script and instructions for debugging the GO shim
Using a debugger with the kata runtime is complicated, but it can be done
and can be very useful.

This commits provides a helper script that simplifies it, and updates
the developper's documentation to explain how to use it.

Signed-off-by: Julien Ropé <jrope@redhat.com>
2024-05-14 11:12:31 +02:00
Greg Kurz
e2117d3b71
Merge pull request #9571 from emanuellima1/fix-impl-rtc
runtime-rs: Fix constructing the RTC struct
2024-05-14 09:17:27 +02:00
Gabriela Cervantes
f20a44bba3 gha: Fix indentation in gha run k8s common
This PR fixes the indentation in gha run k8s common script
to have uniformity across the script.

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2024-05-13 20:07:47 +00:00
Fabiano Fidêncio
4d5e90038c
Merge pull request #9626 from fidencio/topic/prepare-for-3.5.0-release
release: Bump VERSIONS file to 3.5.0
2024-05-13 12:52:12 +02:00
Fabiano Fidêncio
0e385452e5 release: Bump VERSIONS file to 3.5.0
Let's bump the VERSIONS file and start preparing for a new release of
the project.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-05-13 10:49:09 +02:00
Fabiano Fidêncio
c64b07f981
Merge pull request #9622 from fidencio/topic/unbreak-nvidia-gpu-build
build: nvidia-gpu: Fix cache usage of the headers tarball
2024-05-12 14:40:22 +02:00
Fabiano Fidêncio
9713558477
k0s: Use a different port for kube-route's metrics
kube-router decided to use :8080 for its metrics, and this seems to be a
change that affected k0s 1.30.0+, leading to kube-router pod crashing
all the time and anything can actually be started after that.

Due to this issue, let's simply use a different port (:9999) and move on
with our tests.

Fixes: #9623

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-05-11 23:18:20 +02:00
Fabiano Fidêncio
4cd048444d build: nvidia-gpu: Fix cache usage of the headers tarball
Whenever we count on having the headers tarball, we must unpack the
cached content into the expected directory, otherwise we'd simply fail,
as we've been failing in our CI, at the end of the process where we
generate the tarball from the cached components.

It's weird to me, sincerely, that the headers tarball end up in such
weird place (build/kernel-nvidia-gpu/builddir/), but I'll leave that to
Zvonko to figure out whether something better can be done, as the intuit
of this PR is simply unblock Kata Containers CI.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-05-11 17:59:53 +02:00
Zvonko Kaiser
693e307f72 deploy: Add artefact repository
New env var so everyone can test the PUSH_TO_REGISTRY feature

export PUSH_TO_REGISTRY=yes
export ARTEFACT_REGISTRY=quay.io
export ARTEFACT_REPOSITORY=my-fancy-kata-containers
export ARTEFACT_REGISTRY_USERNAME=zvonkok
export ARTEFACT_REGISTRY_PASSWORD=<super-secret>

make ...-tarball

Signed-off-by: Zvonko Kaiser <zkaiser@nvidia.com>
2024-05-10 16:41:52 +00:00
Zvonko Kaiser
4dea73b433
Merge pull request #9616 from zvonkok/nv-kernel-hotfix
deploy: Fix wrong pushing of artifacts
2024-05-10 18:38:09 +02:00
Zvonko Kaiser
4d0f42a145 deploy: Fix wrong pushing of artifacts
Added explicit case statements for nvidia-gpu and
nvidia-gpu-confidential

Signed-off-by: Zvonko Kaiser <zkaiser@nvidia.com>
2024-05-10 14:08:32 +00:00
Zvonko Kaiser
85374f55d2 gpu: Add build targets for GPU rootfs initrd/image
Preparation for complete GPU rootfs build step #1/#N

Signed-off-by: Zvonko Kaiser <zkaiser@nvidia.com>
2024-05-10 09:47:21 +00:00
Fabiano Fidêncio
20515fed70
Merge pull request #9484 from zvonkok/nvidia-runtimeclasses
deploy: Add runtimeClasses relating to the NVIDIA GPU
2024-05-10 03:52:12 +02:00
Gabriela Cervantes
80e551ea74 metrics: Update launch times script
This PR updates the launch times scripts by improving the variable
definition as well as trying to use the same format across all the script.

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2024-05-09 21:29:32 +00:00
Emanuel Lima
59c1567f80 runtime-rs: Fix constructing the RTC struct
RTC was being built in a wrong fashion on commit #2bc5e3c6e2ab0145fa9e8be95df0d5086c07a517

RTC was being constructed inside the QemuCmdLine struct,
but it should've been built inside the devices vector.

Signed-off-by: Emanuel Lima <emlima@redhat.com>
2024-05-09 15:00:47 -03:00
Fabiano Fidêncio
2f686b1179
Merge pull request #9608 from fidencio/topic/tdx-depend-on-distro-host-stack-part-II
tdx: Adapt kata-deploy to use QEMU / OVMF from the distros
2024-05-09 10:25:19 +02:00
Zvonko Kaiser
da7e6a0f07
deploy: Add runtimeClasses relating to the NVIDIA GPU
Fixes: #9483

For the added configurations we need to provide runtimeClasses.

Signed-off-by: Zvonko Kaiser <zkaiser@nvidia.com>
Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-05-09 10:00:59 +02:00
Fabiano Fidêncio
96a100f910
Merge pull request #9482 from zvonkok/kernel-headers-tarball
kernel: Add caching of kernel-headers
2024-05-09 09:58:30 +02:00
Fabiano Fidêncio
aba56a8adb
tests: measured-rootfs: Skip policy addition
Let's skip the policy addition for now, in order to get the TDX CI back
up and running, and then we can re-enable it as soon as we get
https://github.com/kata-containers/kata-containers/issues/9612 fixed.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-05-09 07:59:12 +02:00
Fabiano Fidêncio
77f457c0e1
runtime: tdx: Drop sept-ve-disable=on
This was needed when we were using an old (and not maintained anymore)
host stack.  Considering what we have as part of the distros, Today,
this can simply be dropped, as I cannot find any reference of this one
being needed in any up-to-date documentation.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-05-09 07:59:12 +02:00
Fabiano Fidêncio
416d00228c
Revert "qemu: tdx: Adapt command line" (partially)
This reverts commit b7cccfa019.

The `private=on` bit has never made its way upstream, and was removed
from the latest iteration that we're using.  With that in mind, let's
revert its usage in the code.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-05-09 07:59:12 +02:00