Commit Graph

10701 Commits

Author SHA1 Message Date
Bin Liu
47a02dcc7f
Merge pull request #6767 from ngpatel6/Issue-5403
kata-ctl:  Add the option to install kata-ctl to a user specified directory
2023-05-16 10:43:40 +08:00
Chao Wu
911d8a5a7f
Merge pull request #6804 from pmores/fix-rust-version-in-docs
runtime-rs: fix building instructions to use correct required Rust ve…
2023-05-16 10:14:05 +08:00
Bin Liu
2cd2d02d1f
Merge pull request #6812 from ZhangShuaiyi/dev/write_bootparams
Dragonball: use LinuxBootConfigurator::write_bootparams
2023-05-16 09:54:41 +08:00
GabyCT
3d8185863d
Merge pull request #6835 from GabyCT/topic/buildkataproxy
kata-deploy: Add http_proxy as part of the docker build
2023-05-15 16:15:27 -06:00
Narendra Patel
593840e075 kata-ctl: Allow INSTALL_PATH= to be specified
Update the kata-ctl install rule to allow it to be installed to a given directory

The Makefile was updated to use an INSTALL_PATH variable to track where the
kata-ctl binary should be installed.  If the user doesn't specify anything,
then it uses the default path that cargo uses.  Otherwise, it will install it
in the directory that the user specified.  The README.md file was also updated
to show how to use the new option.

Fixes #5403

Co-authored-by: Cesar Tamayo <cesar.tamayo@intel.com>
Co-authored-by: Kevin Mora Jimenez <kevin.mora.jimenez@intel.com>
Co-authored-by: Narendra Patel <narendra.g.patel@intel.com>
Co-authored-by: Ray Karrenbauer <ray.karrenbauer@intel.com>
Co-authored-by: Srinath Duraisamy <srinath.duraisamy@intel.com>
Signed-off-by: Narendra Patel <narendra.g.patel@intel.com>
2023-05-15 17:21:49 -04:00
Peteris Rudzusiks
bdb75fb21e runtime: use enable_vcpus_pinning from toml
Set the default value of runtime's EnableVCPUsPinning to value read from .toml.

Fixes: #6836

Signed-off-by: Peteris Rudzusiks <rye@stripe.com>
2023-05-15 21:41:20 +02:00
Tamas K Lengyel
20cb875087 virtcontainers/qemu_test.go: Improve test coverage
Rework TestQemuCreateVM routine to be a table driven test with
various config variations passed to it. After CreateVM a handful
of additional functions are exercised to improve code-coverage.
Also add partial coverage for StartVM routine.

Currently improving from 19.7% to 35.7%

Credit PR to Hackathon Team3

Fixes: #267

Signed-off-by: Tamas K Lengyel <tamas.lengyel@intel.com>
2023-05-15 15:26:35 -04:00
Fabiano Fidêncio
da877a603d
Merge pull request #6829 from fidencio/topic/kata-deploy-remove-tarball-from-payload-image
kata-deploy: Do not ship the kata tarball
2023-05-15 19:01:14 +02:00
Gabriela Cervantes
b9a1db2601 kata-deploy: Add http_proxy as part of the docker build
Add http_proxy and https_proxy as part of the docker build arguments
in order to build properly when we are behind a proxy.

Fixes #6834

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-05-15 15:57:29 +00:00
Peteris Rudzusiks
3e85bf5b17 resource-control: fix setting CPU affinities on Linux
With this fix the vCPU pinning feature chooses the correct
physical cores to pin the vCPU threads on rather than always using core 0.

Fixes #6831

Signed-off-by: Peteris Rudzusiks <rye@stripe.com>
2023-05-15 16:46:36 +02:00
Pavel Mores
5f3f844a1e runtime-rs: fix building instructions with respect to required Rust version
Fixes: #6803

Signed-off-by: Pavel Mores <pmores@redhat.com>
2023-05-15 16:30:41 +02:00
Fabiano Fidêncio
9e83795fca
Merge pull request #6825 from fidencio/topic/kata-deploy-build-improvements
kata-deploy: Build improvements
2023-05-15 13:49:15 +02:00
Fabiano Fidêncio
802cd2f673
Merge pull request #6821 from stevenhorsman/container-image-arch-consistency
deploy: Fix arch in image tag
2023-05-15 11:16:01 +02:00
Fabiano Fidêncio
815b4e8dac
Merge pull request #6816 from fidencio/topic/kata-deploy-fixes
Revert "kata-deploy: Use readinessProbe to ensure everything is ready"
2023-05-15 10:24:58 +02:00
Fabiano Fidêncio
777c3dc8d2 kata-deploy: Do not ship the kata tarball
There's absolutely no reason to ship the kata-static tarball as part of
the payload image, as:
* The tarball is already part of the release process
* The payload image already has uncompressed content of the tarball
* The tarball itself is not used anywhere by the kata-deploy scripts

Fixes: #6828

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-05-15 09:22:39 +02:00
LiuWeijie
50cc9c582f tests: Improve coverage for virtcontainers/pkg/compatoci/ for Kata 2.0
Add test cases for ParseConfigJson function and GetContainerSpec function

Fixes: #258

Signed-off-by: LiuWeijie <weijie.liu@intel.com>
2023-05-15 11:58:17 +08:00
Fabiano Fidêncio
136e2415da static-build: Download firecracker instead of building it
There's no reason for us to build firecracker instead of simply
downloading the official released tarball, as tarballs are provided for
the architectures we want to use them.

Fixes: #6770

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-05-12 22:05:33 +02:00
Fabiano Fidêncio
3bf767cfcd static-build: Adjust ARCH for nydus
When building from aarch64, just use "arm64" as that's what's used in
the name of the released nydus tarballs.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-05-12 22:05:33 +02:00
Fabiano Fidêncio
ac88d34e0c static-build: Use relased binary for CLH (aarch64)
There's no need to build Cloud Hypervisor aarch64 as, for a few releases
already, Cloud Hypervisor provides an official release binary for the
architecture.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-05-12 22:05:01 +02:00
Archana Shinde
32b39ee347
Merge pull request #6763 from nedsouza/266/tests_coverage_virtcontainers_fc
virtcontainers: Improved test coverage for fc.go from 4.6% to 18.5%
2023-05-12 11:53:27 -07:00
James O. D. Hunt
73913c8eb7 kata-manager: Fix '-o' syntax and logic error
Fix the syntax and logic error that is only displayed if the user runs
the script with `-o`. This option requests that "only" Kata Containers
is installed and stops containerd from being installed.

Fixes: #6822.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2023-05-12 16:44:24 +01:00
stevenhorsman
2856d3f23d 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>
2023-05-12 16:14:19 +01:00
Fabiano Fidêncio
42dce15b1f
Merge pull request #6450 from singhwang/main
main | release: Fix multi-arch publishing is not supported
2023-05-12 15:25:59 +02:00
Fabiano Fidêncio
e8f81ee93d Revert "kata-deploy: Use readinessProbe to ensure everything is ready"
This reverts commit 5ec9ae0f04, for two
main reasons:
* The readinessProbe was misintepreted by myself when working on the
  original PR
* It's actually causing issues, as the pod ends up marked as not
  healthy.
2023-05-12 14:28:23 +02:00
SinghWang
cfe63527c5 release: Fix multi-arch publishing is not supported
When release is published, kata-deploy payload and kata-static package
can support multi-arch publishing.

Fixes: #6449

Signed-off-by: SinghWang <wangxin_0611@126.com>
Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-05-12 13:36:44 +02:00
Shuaiyi Zhang
197c336516 Dragonball: use LinuxBootConfigurator::write_bootparams to writes
the boot parameters into guest memory.

Fixes: #6813

Signed-off-by: Shuaiyi Zhang <zhang_syi@qq.com>
2023-05-12 16:07:44 +08:00
Fabiano Fidêncio
181017d1d8
Merge pull request #6811 from fidencio/topic/yet-more-fixes-for-nvidia-gpu-kernels
cache: More fixes to nvidia-gpu kernels caching
2023-05-12 10:02:08 +02:00
Amulya Meka
76f975e5e6
Merge pull request #6742 from Amulyam24/agent-build
runtime: remove overriding ARCH value by default for ppc64le
2023-05-12 12:34:50 +05:30
Archana Shinde
20ac3917ad
Merge pull request #6739 from byron-marohn/fix_5561
gha: Fix Body Line Length action flagging empty body commit messages
2023-05-11 15:17:07 -07:00
Archana Shinde
1ad442e656
Merge pull request #6748 from nedsouza/fix-snap
gha: Fix snap creation workflow
2023-05-11 15:09:22 -07:00
Fabiano Fidêncio
4d17ea4a01 cache: Fix nvidia-snp caching version
All the kernel-foo instances, such as "kernel-sev" or "kernel-snp",
should be transformed into "kernel.foo" when looking at the
versions.yaml file.

This was already done for SEV, but missed on the SNP case.

Fixes: #6777

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-05-11 21:26:58 +02:00
Fabiano Fidêncio
a133fadbfa cache: Fix nvidia-gpu-tdx-experimental cache URL
We were passing "kernel-nvidia-gpu-tdx", missing the "-experimental"
part, leading to a non-valid URL.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-05-11 21:20:06 +02:00
Fabiano Fidêncio
a7dd6cbadd
Merge pull request #6807 from fidencio/topic/fix-nvidia-gpu-cache
cache: Fix nvidia-gpu version
2023-05-11 17:40:41 +02:00
Fabiano Fidêncio
b9990c2017 cache: Fix nvidia-gpu version
c9bf7808b6 introduced the logic to
properly get the version of nvidia-gpu kernels, but one important part
was dropped during the rebase into main, which is actually getting the
correct version of the kernel.

Fixing this now, and using the old issue as reference.

Fixes: #6777

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-05-11 13:55:14 +02:00
Fabiano Fidêncio
14939d00ad
Merge pull request #6778 from fidencio/topic/cache-gpu-related-kernels
cache: Update the KERNEL_FLAVOUR list to include nvidia-gpu
2023-05-11 13:14:45 +02:00
Fabiano Fidêncio
c9bf7808b6 cache: Update the KERNEL_FLAVOUR list to include nvidia-gpu
We need to make sure that, when caching a `-nvidia-gpu` kernel, we still
look at the version of the base kernel used to build the nvidia-gpu
drivers, as the ${vendor}-gpu kernels are based on already existing
entries in the versions.yaml file and do not require a new entry to be
added.

Fixes: #6777

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-05-11 10:56:13 +02:00
Fabiano Fidêncio
3665b42045 gpu: Rename gpu targets to nvidia-gpu
This will make it easier for other GPU vendors to add the needed bits in
the future.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-05-11 10:55:55 +02:00
Fabiano Fidêncio
edfaae85cb
Merge pull request #6700 from fitzthum/snp-artifacts
packaging: Add SEV-SNP artifacts to main
2023-05-11 10:47:10 +02:00
James O. D. Hunt
fe33015075
Merge pull request #6794 from jodh-intel/docs-mark-snap-as-unmaintained
docs: Mark snap installation method as unmaintained
2023-05-11 09:14:25 +01:00
Fabiano Fidêncio
c937d0a5d4
Merge pull request #6591 from UnmeshDeodhar/add-sev-artifacts-to-main
packaging: Add sev artifacts to main
2023-05-11 09:09:36 +02:00
Tobin Feldman-Fitzthum
2c90cac751 local-build: fixup alphabetization
A few pieces of the local-build tooling are supposed to be
alphabetized. Fixup a couple minor issues that have accumulated.

Signed-off-by: Tobin Feldman-Fitzthum <tobin@ibm.com>
2023-05-10 21:23:38 +00:00
Tobin Feldman-Fitzthum
4da6eb588d kata-deploy: Add qemu-snp shim
Now that we have the SNP components in place, make sure that
kata-deploy knows about the qemu-snp shim so that it will be
added to containerd config.

Fixes: #6575

Signed-off-by: Tobin Feldman-Fitzthum <tobin@ibm.com>
2023-05-10 20:55:36 +00:00
Tobin Feldman-Fitzthum
14dd053758 kata-deploy: add kata-qemu-snp runtimeclass
Since SEV-SNP has limited hotplug support, increase
the pod overhead to account for fixed resource usage.

Signed-off-by: Tobin Feldman-Fitzthum <tobin@ibm.com>
2023-05-10 20:55:36 +00:00
Tobin Feldman-Fitzthum
0bb37bff78 config: Add SNP configuration
SNP requires many specific configurations, so let's make
a new SNP configuration file that we can use with the
kata-qemu-snp runtime class.

Signed-off-by: Tobin Feldman-Fitzthum <tobin@ibm.com>
Signed-off-by: Alex Carter <Alex.Carter@ibm.com>
2023-05-10 20:55:36 +00:00
Chelsea Mafrica
13f9ba2298
Merge pull request #6379 from cmaf/kata-ctl-check-kvm-1
kata-ctl: add generic kvm check & unit test
2023-05-10 13:33:57 -07:00
Tobin Feldman-Fitzthum
af7f2519bf versions: update SEV kernel description
SNP and SEV will share a (guest) kernel. Update the description
in versions.yaml to mention this.

Signed-off-by: Tobin Feldman-Fitzthum <tobin@ibm.com>
2023-05-10 20:27:12 +00:00
Tobin Feldman-Fitzthum
dbcc3b5cc8 local-build: fix default values for OVMF build
Existing value has wrong name and compression type
leading to installation failure.

Signed-off-by: Tobin Feldman-Fitzthum <tobin@ibm.com>
2023-05-10 20:27:12 +00:00
Tobin Feldman-Fitzthum
b8bbe6325f gha: build OVMF for tests and release
The x86_64 package of OVMF is required for deployments
that don't use kernel hashes, which includes SEV-SNP
in the short term. We should keep this in the bundle
in the long term in case someone wants to disable
kernel hashes.

Signed-off-by: Tobin Feldman-Fitzthum <tobin@ibm.com>
2023-05-10 20:27:12 +00:00
Tobin Feldman-Fitzthum
cf0ca265f9 local-build: Add x86_64 OVMF target
Add targets to build the "plain" x86_64 OVMF.

This will be used by anyone who is using SEV or SNP
without kernel hashes. The SNP QEMU does not yet
support kernel hashes so the OvmfPkg will be used
by default.

Signed-off-by: Tobin Feldman-Fitzthum <tobin@ibm.com>
Signed-off-by: Alex Carter <Alex.Carter@ibm.com>
2023-05-10 20:24:51 +00:00
Tobin Feldman-Fitzthum
db095ddeb4 cache: add SNP flavor to comments
Update comments to include new SNP QEMU option

Signed-off-by: Tobin Feldman-Fitzthum <tobin@ibm.com>
2023-05-10 20:19:56 +00:00