Commit Graph

8399 Commits

Author SHA1 Message Date
GabyCT
d9cd8cde2b
Merge pull request #3909 from fidencio/wip/clh-allow-testing-a-specific-pr
static-build,clh: Add the ability to build from a PR
2022-03-23 15:24:34 -06:00
Fabiano Fidêncio
7a8b96b857
Merge pull request #3942 from dgibson/kata1420
Don't use a globally installed mock hook for hook tests
2022-03-23 17:57:16 +01:00
David Gibson
c77e34de33 runtime: Move mock hook source
src/runtime/virtcontainers/hook/mock contains a simple example hook in Go.
The only thing this is used for is for some tests in
src/runtime/pkg/katautils/hook_test.go.  It doesn't really have anything
to do with the rest of the virtcontainers package.

So, move it next to the test code that uses it.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2022-03-23 19:37:35 +11:00
David Gibson
86723b51ae virtcontainers: Remove unused install/uninstall targets
We've now removed the need to install the mock hook binary for unit tests.
However, it turns out that managing that was the *only* thing that the
install and uninstall targets in the virtcontainers Makefile handled.

So, remove them.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2022-03-23 19:37:18 +11:00
David Gibson
0e83c95fac virtcontainers: Run mock hook from build tree rather than system bin dir
Running unit tests should generally have minimal dependencies on
things outside the build tree.  It *definitely* shouldn't modify
system wide things outside the build tree.  Currently the runtime
"make test" target does so, though.

Several of the tests in src/runtime/pkg/katautils/hook_test.go require a
sample hook binary.  They expect this hook in
/usr/bin/virtcontainers/bin/test/hook, so the makefile, as root, installs
the test binary to that location.

Go tests automatically run within the package's directory though, so
there's no need to use a system wide path.  We can use a relative path to
the binary build within the tree just as easily.

fixes #3941

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2022-03-23 19:34:50 +11:00
David Gibson
e65db838ff virtcontainers: Remove VC_BIN_DIR
The VC_BIN_DIR variable in the virtcontainers Makefile is almost unused.
It's used to generate TEST_BIN_DIR, and it's created in the install target.
However, we also create TEST_BIN_DIR, which is a subdirectory of VC_BIN_DIR
with mkdir -p, so it will necessarily create VC_BIN_DIR along the way.

So we can drop the unnecessary mkdir and expand the definition of
VC_BIN_DIR in the definition of TEST_BIN_DIR.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2022-03-22 16:53:59 +11:00
David Gibson
c20ad2836c virtcontainers: Remove unused Makefile defines
The INSTALL_EXEC and UNINSTALL_EXEC definitions from the virtcontainers
Makefile (unlike those from the runtime Makefile in the parent directory)
are entirely unused.  Remove them.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2022-03-22 16:40:57 +11:00
David Gibson
c776bdf4a8 virtcontainers: Remove unused parameter from go-test.sh
The check-go-test target passes the path to the mock hook test binary to
go-test.sh when it invokes it.  But go-test.sh just calls run_go_test from
ci/lib.sh, which invokes a script from the tests repo *without* any
parameters.

That is, this parameter is ignored anyway, so remove it.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2022-03-22 16:39:22 +11:00
Fabiano Fidêncio
aa6886f1ed
Merge pull request #2482 from Bevisy/main-815
ci: Weekly check whether the docs url is alive
2022-03-21 17:15:40 +01:00
James O. D. Hunt
3edf25b6c9
Merge pull request #3682 from Jakob-Naucke/cross
Multistrap Ubuntu & enable cross-building guest
2022-03-21 11:11:47 +00:00
James O. D. Hunt
f8fb0d3bb6
Merge pull request #3322 from Kvasscn/kata_dev_block_driver_option
device: using const strings for block-driver option instead of hard coding
2022-03-21 10:56:25 +00:00
Fabiano Fidêncio
ebec6903b8 static-build,clh: Add the ability to build from a PR
Right now it doesn't do much for us, as we're always building from a
specific version.  However, this opens the possibility for us to add a
CI, similar to the one we have for CRI-O, for testing against each
cloud-hypervisor PR, on the cloud-hypervisor branch.

Fixes: #3908

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2022-03-20 11:24:40 +01:00
GabyCT
f194c8da1b
Merge pull request #3912 from devimc/2022-03-17/updateSGXDoc
doc: update Intel SGX use cases document
2022-03-18 14:08:53 -06:00
Julio Montes
24b29310b2 doc: update Intel SGX use cases document
Installation section is not longer needed because of the latest
default kata kernel supports Intel SGX.
Include QEMU to the list of supported hypervisors.

fixes #3911

Signed-off-by: Julio Montes <julio.montes@intel.com>
2022-03-18 09:19:09 -06:00
Julio Montes
bc3f63bf0a
Merge pull request #3903 from devimc/2022-03-15/bumpQEMU6.2
tools: update QEMU to 6.2
2022-03-17 10:28:23 -06:00
Julio Montes
18d4d7fb1d tools: update QEMU to 6.2
bring Intel SGX support

Changes tha may impact in Kata Containers
Arm:
The 'virt' machine now supports an emulated ITS
The 'virt' machine now supports more than 123 CPUs in TCG emulation mode
The pl031 real-time clock device now supports sending RTC_CHANGE QMP events

PowerPC:
Improved POWER10 support for the 'powernv' machine
Initial support for POWER10 DD2.0 CPU added
Added support for FORM2 PAPR NUMA descriptions in the "pseries" machine
 type

s390x:
Improved storage key emulation (e.g. fixed address handling, lazy
 storage key enablement for TCG, ...)
New gen16 CPU features are now enabled automatically in the latest
 machine type

KVM:
Support for SGX in the virtual machine, using the /dev/sgx_vepc device
 on the host and the "memory-backend-epc" backend in QEMU.
New "hv-apicv" CPU property (aliased to "hv-avic") sets the
 HV_DEPRECATING_AEOI_RECOMMENDED bit in CPUID[0x40000004].EAX.

virtio-mem:
QEMU now fully supports guest memory dumps with virtio-mem.
QEMU now cleanly supports precopy migration, postcopy migration and
 background snapshots with virtio-mem.

fixes #3902

Signed-off-by: Julio Montes <julio.montes@intel.com>
2022-03-16 10:35:39 -06:00
Fabiano Fidêncio
55e1304fef
Merge pull request #3901 from GabyCT/topic/fixcommitm
action: Update link for format patch documentation
2022-03-15 20:13:15 +01:00
Gabriela Cervantes
62351637da action: Update link for format patch documentation
This PR updates the link for the format patch documentation for the
commit message check.

Fixes #3900

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2022-03-15 16:11:43 +00:00
Feng Wang
84aebac327
Merge pull request #3875 from fengwang666/fix-shim-leak
runtime: properly handle ESRCH error when signaling container
2022-03-14 12:47:35 -07:00
Feng Wang
aa5ae6b17c runtime: Properly handle ESRCH error when signaling container
Currently kata shim v2 doesn't translate ESRCH signal, causing container
fail to stop and shim leak.

Fixes: #3874

Signed-off-by: Feng Wang <feng.wang@databricks.com>
2022-03-14 11:03:05 -07:00
GabyCT
bbcdfaa494
Merge pull request #3868 from cmaf/update-k8s-docs-1
docs: Update k8s documentation
2022-03-14 09:32:58 -06:00
James O. D. Hunt
afa090ad7b
Merge pull request #3867 from Shensd/main
rustjail: optimization, merged several writelns into one
2022-03-14 10:05:48 +00:00
Peng Tao
2edb33ee4a
Merge pull request #3880 from garrettmahin/fix-readme-typo
doc: fix kata-deploy README typo
2022-03-14 16:20:01 +08:00
zhanghj
efa19c41eb device: use const strings for block-driver option instead of hard coding
Currently, the block driver option is specifed by hard coding, maybe it
is better to use const string variables instead of hard coded strings.
Another modification is to remove duplicate consts for virtio driver in
manager.go.

Fixes: #3321

Signed-off-by: Jason Zhang <zhanghj.lc@inspur.com>
2022-03-14 09:20:43 +08:00
Garrett Mahin
dacf6e3955 doc: fix filename typo
Corrects a filename typo in cleanup cluster part
of kata-deploy README.md

Fixes: #3869
Signed-off-by: Garrett Mahin <garrett.mahin@gmail.com>
2022-03-13 17:39:08 -05:00
Fabiano Fidêncio
358081c4ae
Merge pull request #3873 from likebreath/0311/clh_v22.1
versions: Upgrade to Cloud Hypervisor v22.1
2022-03-12 10:27:53 +01:00
Jack Hance
92ce5e2dc4 rustjail: optimization, merged several writelns into one
Optimized several writelns by merging them into one in src/utils.rs

Fixes: #3772

Signed-off-by: Jack Hance <jack.hance@ndsu.edu>
2022-03-11 13:18:58 -06:00
Bo Chen
7a18e32fa7 versions: Upgrade to Cloud Hypervisor v22.1
This is a bug fix release. The following issues have been addressed:
1) VFIO ioctl reordering to fix MSI on AMD platforms; 2) Fix virtio-net
control queue.

Details can be found: https://github.com/cloud-hypervisor/cloud-hypervisor/releases/tag/v22.1

Fixes: #3872

Signed-off-by: Bo Chen <chen.bo@intel.com>
2022-03-11 08:27:08 -08:00
James O. D. Hunt
095bc2d50a
Merge pull request #3858 from jodh-intel/kata-manager-add-more-options
Add debug and self-test control options to Kata Manager
2022-03-11 13:42:00 +00:00
Chelsea Mafrica
5c434270d1 docs: Update k8s documentation
Update documentation with missing step to untaint node to enable
scheduling and update the example to run a pod using the kata runtime
class instead of untrusted workloads, which applies to versions of CRI-O
prior to v1.12.

Fixes #3863

Signed-off-by: Chelsea Mafrica <chelsea.e.mafrica@intel.com>
2022-03-10 21:11:14 -08:00
Fabiano Fidêncio
036a76e79c
Merge pull request #3865 from jodh-intel/scripts-fix-here-docs
scripts: Change here document delimiters
2022-03-10 20:09:38 +01:00
James O. D. Hunt
5d6d39be48 scripts: Change here document delimiters
Fix the outstanding scripts using non standard shell here document delimiters.

This should have been caught by
https://github.com/kata-containers/tests/pull/3937, but there is a bug
in the checker which is fixed on
https://github.com/kata-containers/tests/pull/4569.

Fixes: #3864.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2022-03-10 09:23:37 +00:00
James O. D. Hunt
be12baf3cf manager: Change here documents to use standard delimiter
All scripts should use `EOF` as the shell here document delimiter as
this is checked by the static checker.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2022-03-10 09:19:29 +00:00
James O. D. Hunt
9576a7da5d manager: Add options to change self test behaviour
Added new `kata-manager` options to control the self-test behaviour. By
default, after installation the manager will run a test to ensure a Kata
Containers container can be created. New options allow:

- The self test to be disabled.
- Only the self test to be run (no installation).

These features allow changes to be made to the installed system before
the self test is run.

Fixes: #3851.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2022-03-10 09:19:29 +00:00
James O. D. Hunt
d4d65bed38 manager: Add option to enable component debug
Added a `-d` option to `kata-manager` to enable Kata Containers
and containerd debug.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2022-03-10 09:19:29 +00:00
James O. D. Hunt
019da91d79 manager: Whitespace fix
Remove additional blank line in the `kata-manager`.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2022-03-10 09:19:29 +00:00
James O. D. Hunt
d234cb76b5 manager: Create containerd link
Make the `kata-manager` create a `containerd` link to ensure the
downloaded containerd systemd service file can find the daemon when
using the GitHub packaged version of containerd.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2022-03-10 09:19:29 +00:00
Fabiano Fidêncio
5a7fd943c1
Merge pull request #3838 from bradenrayhorn/get-memory-info-tests
agent: add tests for get_memory_info function
2022-03-09 23:21:20 +01:00
Braden Rayhorn
c088a3f3ad
agent: add tests for get_memory_info function
Add test coverage for get_memory_info function in src/rpc.rs. Includes
some minor refactoring of the function.

Fixes #3837

Signed-off-by: Braden Rayhorn <bradenrayhorn@fastmail.com>
2022-03-09 11:34:35 -06:00
Fabiano Fidêncio
443c04ec6c
Merge pull request #3857 from jodh-intel/ci-update-gha-token-name
CI: Update GHA secret name
2022-03-09 11:53:00 +01:00
Eric Ernst
e042593208
Merge pull request #3848 from fidencio/wip/release-dont-consider-rc-as-stable
tools: release: Do not consider release candidates as stable releases
2022-03-08 15:09:04 -08:00
Julio Montes
200494cde4
Merge pull request #3853 from devimc/2022-03-08/fix-cve-2022-0847
kernel: fix cve-2022-0847
2022-03-08 13:26:54 -06:00
GabyCT
5620e23c0f
Merge pull request #3855 from GabyCT/topic/updoc
docs: Update contact link in runtime README
2022-03-08 11:44:54 -06:00
James O. D. Hunt
4b1e2f527e CI: Update GHA secret name
Change the secret used by the GitHub Action  that adds the PR size
label to one with the correct set of privileges.

Fixes: #3856.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2022-03-08 17:06:16 +00:00
Gabriela Cervantes
ffdf961ae9 docs: Update contact link in runtime README
This PR updates the contact link in the runtime README document.

Fixes #3854

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2022-03-08 16:27:34 +00:00
Julio Montes
293e61dc6e
Merge pull request #3766 from dgibson/hugepages
Improve error checking of hugepage allocation
2022-03-08 10:21:57 -06:00
Julio Montes
5ec7592dfa kernel: fix cve-2022-0847
bump guest kernel version to fix cve-2022-0847 "Dirty Pipe"

fixes #3852

Signed-off-by: Julio Montes <julio.montes@intel.com>
2022-03-08 09:49:15 -06:00
James O. D. Hunt
6c52168dd8
Merge pull request #3842 from jodh-intel/ci-gha-add-pr-size-label
CI: Create GHA to add PR sizing label
2022-03-08 15:14:10 +00:00
James O. D. Hunt
6a850899c9 CI: Create GHA to add PR sizing label
Created a new GitHub Action workflow file that adds a sizing label to
each PR.

Fixes: #3841.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2022-03-08 14:11:17 +00:00
Peng Tao
99f794ca4d
Merge pull request #3846 from egernst/revert-kata-deploy-changes-after-2.4.0-rc0-release
release: Revert kata-deploy changes after 2.4.0-rc0 release
2022-03-08 13:52:44 +08:00