Commit Graph

11227 Commits

Author SHA1 Message Date
Fabiano Fidêncio
3661d57bea kata-deploy: Use apt-key.gpg from k8s.io
We're facing some issues to download / use the public key provided by
google for installing kubernetes as part of the kata-deploy image.
```
The following signatures couldn't be verified because the public key is
not available: NO_PUBKEY B53DC80D13EDEF05
Reading package lists... Done
W: GPG error: https://packages.cloud.google.com/apt kubernetes-xenial
   InRelease: The following signatures couldn't be verified because the
   public key is not available: NO_PUBKEY B53DC80D13EDEF05 E: The
   repository 'https://apt.kubernetes.io kubernetes-xenial InRelease' is
   not signed.
N: Updating from such a repository can't be done securely, and is
   therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user
   configuration details.
```

Let's work this around following the suggestion made by @dims, at:
https://github.com/kubernetes/k8s.io/pull/4837#issuecomment-1446426585

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
(cherry picked from commit 636539bf0c)
2023-05-23 09:18:45 +01:00
stevenhorsman
e8f8179d62 osbuilder: Bump fedora image version
- Swap out an EoL fedora image for the latest

Fixes: #6923
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
(cherry picked from commit b8ffcd1b9b)
2023-05-22 20:42:22 +01:00
Steve Horsman
2ba029f3e1
Merge pull request #6902 from fidencio/topic/cc-bring-back-root-hashes-logic
CC | local-build: Bring back root_hash logic
2023-05-19 18:21:39 +01:00
Fabiano Fidêncio
f27f29d8b8 local-build: Bring back root_hash logic
I cannot easily pin-point which commit dropped it, but my gut feeling is
that it's the result of an erroneous conflict resolution when merging
content from main to the CCv0 branch.

Regardless of when / why it happened, as the root_hash logic ended up
being dropped, workflows that depend on that are now failing.

With everything said in mind, let's bring the logic back.

Fixes: #6901

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-05-19 15:18:50 +02:00
Fabiano Fidêncio
6763c41d7e
Merge pull request #6886 from fidencio/topic/cc-stick-to-2022ww44-for-tdx
CC: tdx: Stick to the 2022ww44 TDX stack for the CCv0 branch
2023-05-19 11:55:13 +02:00
Fabiano Fidêncio
ac99d2d63e
Merge pull request #6869 from fidencio/topic/cc-use-static-sandbox-resource-mgmt-for-TEEs
CC | runtime: Use static_sandbox_resource_mgmt=true for TEEs
2023-05-19 08:56:15 +02:00
Fabiano Fidêncio
c29e5036a6 Revert "versions: Move QEMU TDX to its own experimental entry"
This reverts commit 800ee5cd88.

As the Jenkins TDX CI is running on a system with a TDX stack called
"2022ww44", we should keep the QEMU / kernel / OVMF versions matching
what's provided in that stack.

The reason we were able to update this on `main` is because the GHA TDX
CI is running on a TDX stack called "2023ww01", but we have decided to
NOT take the bullet, NOT updating the Jenkins CI in order to avoid
unexepected breakages.

This regression was introduced as part of the last CCv0 merge to main,
and would've been caught by the CI, and should've been caught by the
reviewer (myself :-)), but CI was having a hard time to even build the
compoenents and I wrote in the PR and I'm quoting it here: "I rather
deal with possible breakages on this later on, than block this PR to get
in." ... and here we are. :-)

Fixes: #6884

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-05-18 19:47:10 +02:00
Fabiano Fidêncio
7f13329c6a Revert "versions: Update QEMU TDX version"
This reverts commit 3018c9ad51.

As the Jenkins TDX CI is running on a system with a TDX stack called
"2022ww44", we should keep the QEMU / kernel / OVMF versions matching
what's provided in that stack.

The reason we were able to update this on `main` is because the GHA TDX
CI is running on a TDX stack called "2023ww01", but we have decided to
NOT take the bullet, NOT updating the Jenkins CI in order to avoid
unexepected breakages.

This regression was introduced as part of the last CCv0 merge to main,
and would've been caught by the CI, and should've been caught by the
reviewer (myself :-)), but CI was having a hard time to even build the
compoenents and I wrote in the PR and I'm quoting it here: "I rather
deal with possible breakages on this later on, than block this PR to get
in." ... and here we are. :-)

Fixes: #6884

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-05-18 19:47:06 +02:00
Fabiano Fidêncio
7bf6ba11c6 Revert "versions: Move Kernel TDX to its own experimental entry"
This reverts commit 20ab2c2420.

As the Jenkins TDX CI is running on a system with a TDX stack called
"2022ww44", we should keep the QEMU / kernel / OVMF versions matching
what's provided in that stack.

The reason we were able to update this on `main` is because the GHA TDX
CI is running on a TDX stack called "2023ww01", but we have decided to
NOT take the bullet, NOT updating the Jenkins CI in order to avoid
unexepected breakages.

This regression was introduced as part of the last CCv0 merge to main,
and would've been caught by the CI, and should've been caught by the
reviewer (myself :-)), but CI was having a hard time to even build the
compoenents and I wrote in the PR and I'm quoting it here: "I rather
deal with possible breakages on this later on, than block this PR to get
in." ... and here we are. :-)

Fixes: #6884

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-05-18 12:56:37 +02:00
Fabiano Fidêncio
4bdf56a3f8 Revert "versions: Update Kernel TDX version"
This reverts commit f33345c311.

As the Jenkins TDX CI is running on a system with a TDX stack called
"2022ww44", we should keep the QEMU / kernel / OVMF versions matching
what's provided in that stack.

The reason we were able to update this on `main` is because the GHA TDX
CI is running on a TDX stack called "2023ww01", but we have decided to
NOT take the bullet, NOT updating the Jenkins CI in order to avoid
unexepected breakages.

This regression was introduced as part of the last CCv0 merge to main,
and would've been caught by the CI, and should've been caught by the
reviewer (myself :-)), but CI was having a hard time to even build the
compoenents and I wrote in the PR and I'm quoting it here: "I rather
deal with possible breakages on this later on, than block this PR to get
in." ... and here we are. :-)

Fixes: #6884

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-05-18 12:56:22 +02:00
Fabiano Fidêncio
82e6b65f63 Partially revert "versions: Bump OVMF for TDX"
This partially reverts commit 054174d3e6

As the Jenkins TDX CI is running on a system with a TDX stack called
"2022ww44", we should keep the QEMU / kernel / OVMF versions matching
what's provided in that stack.

The reason we were able to update this on `main` is because the GHA TDX
CI is running on a TDX stack called "2023ww01", but we have decided to
NOT take the bullet, NOT updating the Jenkins CI in order to avoid
unexepected breakages.

This regression was introduced as part of the last CCv0 merge to main,
and would've been caught by the CI, and should've been caught by the
reviewer (myself :-)), but CI was having a hard time to even build the
compoenents and I wrote in the PR and I'm quoting it here: "I rather
deal with possible breakages on this later on, than block this PR to get
in." ... and here we are. :-)

Fixes: #6884

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-05-18 12:55:50 +02:00
Fabiano Fidêncio
fe6e918ddc Revert "virtcontainers: Drop check for the tdx CPU flag"
This reverts commit 25b3cdd38c.

As the Jenkins TDX CI is running on a system with a TDX stack called
"2022ww44", we should keep the QEMU / kernel / OVMF versions matching
what's provided in that stack.

The reason we were able to update this on `main` is because the GHA TDX
CI is running on a TDX stack called "2023ww01", but we have decided to
NOT take the bullet, NOT updating the Jenkins CI in order to avoid
unexepected breakages.

This regression was introduced as part of the last CCv0 merge to main,
and would've been caught by the CI, and should've been caught by the
reviewer (myself :-)), but CI was having a hard time to even build the
compoenents and I wrote in the PR and I'm quoting it here: "I rather
deal with possible breakages on this later on, than block this PR to get
in." ... and here we are. :-)

Fixes: #6884

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-05-18 12:55:20 +02:00
Fabiano Fidêncio
2962d8db45 Revert "runtime/qemu: Drop "kvm-type=tdx""
This reverts commit ed145365ec.

As the Jenkins TDX CI is running on a system with a TDX stack called
"2022ww44", we should keep the QEMU / kernel / OVMF versions matching
what's provided in that stack.

The reason we were able to update this on `main` is because the GHA TDX
CI is running on a TDX stack called "2023ww01", but we have decided to
NOT take the bullet, NOT updating the Jenkins CI in order to avoid
unexepected breakages.

This regression was introduced as part of the last CCv0 merge to main,
and would've been caught by the CI, and should've been caught by the
reviewer (myself :-)), but CI was having a hard time to even build the
compoenents and I wrote in the PR and I'm quoting it here: "I rather
deal with possible breakages on this later on, than block this PR to get
in." ... and here we are. :-)

Fixes: #6884

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-05-18 12:55:03 +02:00
Fabiano Fidêncio
eee621f431 Revert "govmm: Set "sept-ve-disable=on""
This reverts commit 3c5ffb0c85.

As the Jenkins TDX CI is running on a system with a TDX stack called
"2022ww44", we should keep the QEMU / kernel / OVMF versions matching
what's provided in that stack.

The reason we were able to update this on `main` is because the GHA TDX
CI is running on a TDX stack called "2023ww01", but we have decided to
NOT take the bullet, NOT updating the Jenkins CI in order to avoid
unexepected breakages.

This regression was introduced as part of the last CCv0 merge to main,
and would've been caught by the CI, and should've been caught by the
reviewer (myself :-)), but CI was having a hard time to even build the
compoenents and I wrote in the PR and I'm quoting it here: "I rather
deal with possible breakages on this later on, than block this PR to get
in." ... and here we are. :-)

Fixes: #6884

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-05-18 12:54:46 +02:00
Fabiano Fidêncio
e005dfa718 Revert "govmm: Directly pass the firmware using -bios with TDX"
This reverts commit 3e15800199.

As the Jenkins TDX CI is running on a system with a TDX stack called
"2022ww44", we should keep the QEMU / kernel / OVMF versions matching
what's provided in that stack.

The reason we were able to update this on `main` is because the GHA TDX
CI is running on a TDX stack called "2023ww01", but we have decided to
NOT take the bullet, NOT updating the Jenkins CI in order to avoid
unexepected breakages.

This regression was introduced as part of the last CCv0 merge to main,
and would've been caught by the CI, and should've been caught by the
reviewer (myself :-)), but CI was having a hard time to even build the
compoenents and I wrote in the PR and I'm quoting it here: "I rather
deal with possible breakages on this later on, than block this PR to get
in." ... and here we are. :-)

Fixes: #6884

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-05-18 12:50:11 +02:00
Steve Horsman
a4ecf5a3e4
Merge pull request #6862 from stevenhorsman/CCv0-cherry-pick-image-tag-fix-2
deploy: fix shell script error
2023-05-18 09:12:03 +01:00
Fabiano Fidêncio
1222800f7c runtime: Use static_sandbox_resource_mgmt=true for TEEs
When this option is enabled the runtime will attempt to determine the
appropriate sandbox size (memory, CPU) before booting the virtual
machine.

As TEEs do not support memory and CPU hotplug, this approach must be
used.

Fixes: #6818

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-05-17 20:50:45 +02:00
Fabiano Fidêncio
f07b27d445
Merge pull request #6559 from stevenhorsman/CCv0-merge-30th-mar
CCv0: Merge main into CCv0 branch
2023-05-17 17:00:39 +02:00
stevenhorsman
401b7947e3 deploy: fix shell script error
- Remove local introduced by bad copy-paste

Fixes: #6814
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
(cherry picked from commit 1a3f8fc1a2)
2023-05-17 11:10:53 +01:00
Fabiano Fidêncio
c618578908
Merge pull request #6832 from stevenhorsman/CCv0-cherry-pick-image-tag-fix
deploy: Fix arch in image tag
2023-05-16 16:11:07 +02:00
stevenhorsman
e6f7ee218c deploy: Fix arch in image tag
`uname -m` produces `x86_64`, but container image convention
is to use `amd64`, so update this in the tag

Fixes: #6820
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
(cherry picked from commit 2856d3f23d)
2023-05-15 10:21:44 +01:00
Fabiano Fidêncio
39d54713f2
Merge pull request #6815 from stevenhorsman/multi-arch-runtime-payload
actions:  multi-arch runtime-payload
2023-05-12 14:17:41 +02:00
stevenhorsman
057db564fd actions: multi-arch runtime-payload
- Create multi-arch manifests for the ci and release runtime-payload
that are tagged with the commit, for use in the operator

Fixes: #6814
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2023-05-12 10:54:49 +01:00
Fabiano Fidêncio
3b9ae6716c
Merge pull request #6774 from bpradipt/fix-6730
CC | runtime: Add configurable context timeout for StopVM
2023-05-04 15:06:08 +02:00
Pradipta Banerjee
1f0d709be6 CC: Add configurable context timeout for StopVM in remote hyp
Add configurable context timeout for StopVM in remote hypervisor
similar to StartVM

Fixes: #6730

Signed-off-by: Pradipta Banerjee <pradipta.banerjee@gmail.com>
2023-05-04 10:42:30 +00:00
stevenhorsman
db26632123 packaging: update builder_registry
Use `CC_BUILDER_REGISTRY`

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2023-05-03 15:08:41 +01:00
stevenhorsman
9bdd9af898 agent: Update image_rpc
- Update image_rpc to reflect the changes in code gen

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2023-04-27 15:12:13 +01:00
stevenhorsman
8b8e71fa65 protocols: Update type
- Fix merge issue

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2023-04-27 11:25:41 +01:00
stevenhorsman
dbe1fd9436 CCv0: Merge main into CCv0 branch
Merge remote-tracking branch 'upstream/main' into CCv0

Fixes: #6558
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2023-04-27 09:42:44 +01:00
Bin Liu
509bc8b6c8
Merge pull request #6718 from openanolis/mengze/keep_abnormal
runtime-rs: support keep_abnormal in toml config
2023-04-26 12:36:52 +08:00
Bin Liu
b6d880510a
Merge pull request #6595 from zvonkok/gpu-snp-tdx-kernel
gpu: Build and Ship an GPU enabled Kernel
2023-04-26 12:33:51 +08:00
Steve Horsman
796c8d5015
Merge pull request #6710 from Jordan9500/cherry-pick-cgroupv2-fix
rustjail: Use CPUWeight with systemd and CgroupsV2
2023-04-25 15:28:29 +01:00
mengze
cc8ea3232e runtime-rs: support keep_abnormal in toml config
This patch adds keep_abnormal in runtime config. If keep_abnormal =
true, it means that 1) if the runtime exits abnormally, the cleanup
process will be skipped, and 2) the runtime will not exit even if the
health check fails.

This option is typically used to retain abnormal information for
debugging and should NOT be enabled by default.

Fixes: #6717

Signed-off-by: mengze <mengze@linux.alibaba.com>
Signed-off-by: quanweiZhou <quanweiZhou@linux.alibaba.com>
2023-04-25 13:47:44 +08:00
David Esparza
7fdaab49bc
Merge pull request #6295 from dborquez/add_kernel_module_checks_kvm
kata-ctl: checks for kvm, kvm_intel modules loaded
2023-04-24 13:33:18 -06:00
Greg Kurz
0ca6d3b726
Merge pull request #6681 from Vlad1mir-D/6677-fix-kata-agent-dbus-connection
osbuilder: Fix D-Bus enabling in the dracut case
2023-04-24 17:31:13 +02:00
Greg Kurz
bc101b7f56 rustjail: Use CPUWeight with systemd and CgroupsV2
The CPU shares property belongs to CgroupsV1. CgroupsV2 uses CPU weight
instead. The correct value is computed in the latter case but it is passed
to systemd using the legacy property. Systemd rejects the request and the
agent exists with the following error :

        Value specified in CPUShares is out of range: unknown

Replace the "shares" wording with "weight" in the CgroupsV2 code to
avoid confusions. Use the "CPUWeight" property since this is what
systemd expects in this case.

Fixes #6636

References:

https://www.freedesktop.org/software/systemd/man/systemd.resource-control.html#CPUWeight=weight
https://www.freedesktop.org/software/systemd/man/systemd.resource-control.html#systemd%20252
https://github.com/containers/crun/blob/main/crun.1.md#cpu-controller

Signed-off-by: Greg Kurz <groug@kaod.org>
(cherry picked from commit c1fbaae8d6)
2023-04-24 15:43:27 +01:00
Bin Liu
3d8688f92e
Merge pull request #6620 from jongwu/docker_fail_start_snap
snap: fix docker start fail issue
2023-04-24 10:53:16 +08:00
Archana Shinde
97291d88e9
Merge pull request #6696 from amshinde/kata-manager-containerd-fix
kata-manager: Fix containerd download
2023-04-21 09:54:30 -07:00
Archana Shinde
96e8470dbe kata-manager: Fix containerd download
Newer containerd releases have an additional static package published.
Because of this,  download_url contains two urls causing curl to fail.
To resolve this, pick the first url from the containerd releases to
download containerd.

Fixes: #6695

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2023-04-20 23:08:51 -07:00
David Esparza
432d407440
kata-ctl: checks for kvm, kvm_intel modules loaded
Ensure that kvm and kvm_intel modules are loaded.
Renames the get_cpu_info() function to read_file_contents()

Fixes #5332

Signed-off-by: David Esparza <david.esparza.borquez@intel.com>
2023-04-20 11:29:36 -06:00
Zvonko Kaiser
b1730e4a67 gpu: Add new kernel build option to usage()
With each release make sure we ship a GPU  enabled kernel

Signed-off-by: Zvonko Kaiser <zkaiser@nvidia.com>
2023-04-20 07:48:30 +00:00
Fupan Li
ceefd50bd0
Merge pull request #6680 from Tim-Zhang/fix-ut-bad-fd
agent: Fix ut issue caused by fd double closed
2023-04-20 11:18:27 +08:00
Fupan Li
a7b4b69230
Merge pull request #6673 from Tim-Zhang/upgrade-ttrpc-protobuf
Bump ttrpc to 0.7.2 and protobuf to 3.2.0
2023-04-20 10:13:43 +08:00
Fupan Li
a1568cd2f5
Merge pull request #6676 from zvonkok/gpu-runtime
gpu: Add GPU enabled confguration and runtime
2023-04-19 13:01:49 +08:00
Vladimir
3e7b902265 osbuilder: Fix D-Bus enabling in the dracut case
- D-Bus enabling now occurs only in setup_rootfs (instead of
prepare_overlay and setup_rootfs)
- Adjust permissions of / so dbus-broker will be able to traverse FS

These changes enables kata-agent to successfully communicate with D-Bus.

Fixes #6677

Signed-off-by: Vladimir <amigo.elite@gmail.com>
2023-04-18 23:17:34 +03:00
Tim Zhang
53c749a9de agent: Fix ut issue caused by fd double closed
Never ever try to close the same fd double times, even in a unit test.

A file descriptor is a number which will be reused, so when you close
the same number twice you may close another file descriptor in the second
time and then there will be an error 'Bad file descriptor (os error 9)'
while the wrongly closed fd is being used.

Fixes: #6679

Signed-off-by: Tim Zhang <tim@hyper.sh>
2023-04-18 23:19:10 +08:00
Hyounggyu Choi
5c032c64ac
Merge pull request #6664 from zvonkok/vfio-fix
gpu: Do not pass-through PCI (Host) Bridges
2023-04-18 19:50:15 +09:00
Tim Zhang
2e3f19af92 agent: fix clippy warnings caused by protobuf3
Fix warnings introduced by protobuf upgrade.

Signed-off-by: Tim Zhang <tim@hyper.sh>
2023-04-17 20:15:49 +08:00
Tim Zhang
4849c56faa agent: Fix unit test issue cuased by protobuf upgrade
Fixes: #6646

Signed-off-by: Tim Zhang <tim@hyper.sh>
2023-04-17 19:49:21 +08:00
Tim Zhang
0a582f7815 trace-forwarder: remove unused crate protobuf
Remove unused crate protobuf.

Signed-off-by: Tim Zhang <tim@hyper.sh>
2023-04-17 19:49:21 +08:00