Commit Graph

7290 Commits

Author SHA1 Message Date
Jianyong Wu
fa922517d9 runtime: kernel version with '+' as suffix panic in parse
The current kernel version parse lib can't process suffix '+', as the
modified kernel version will add '+' as suffix, thus panic will occur.

For example, if the current kernel version is "5.14.0-rc4+", test
TestHostNetworkingRequested will panic:
--- FAIL: TestHostNetworkingRequested (0.00s)
panic: &{DistroName:ubuntu DistroVersion:18.04
KernelVersion:5.11.0-rc3+ Issue: Passed:[] Failed:[] Debug:true
ActualEUID:0}: failed to check test constraints: error: Build meta data
is empty

Here, remove the suffix '+' in kernel version fix helper.

Fixes: #2809
Signed-off-by: Jianyong Wu <jianyong.wu@arm.com>
2021-10-23 15:07:25 +08:00
Manohar Castelino
52268d0ece hypervisor: Expose the hypervisor itself
Export the top level hypervisor type

s/hypervisor/Hypervisor

Fixes: #2880

Signed-off-by: Manohar Castelino <mcastelino@apple.com>
Signed-off-by: Eric Ernst <eric_ernst@apple.com>
2021-10-22 16:46:02 -07:00
Eric Ernst
a72bed5b34 hypervisor: update tests based on createSandbox->CreateVM change
Fixup a couple of broken tests.

Signed-off-by: Eric Ernst <eric_ernst@apple.com>
2021-10-22 16:45:35 -07:00
Manohar Castelino
f434bcbf6c hypervisor: createSandbox is CreateVM
Last of a series of commits to export the top level
hypervisor generic methods.

s/createSandbox/CreateVM

Fixes #2880

Signed-off-by: Manohar Castelino <mcastelino@apple.com>
Signed-off-by: Eric Ernst <eric_ernst@apple.com>
2021-10-22 16:45:35 -07:00
Manohar Castelino
76f1ce9e30 hypervisor: startSandbox is StartVM
s/startSandbox/StartVM

Signed-off-by: Manohar Castelino <mcastelino@apple.com>
Signed-off-by: Eric Ernst <eric_ernst@apple.com>
2021-10-22 16:45:35 -07:00
Manohar Castelino
fd24a695bf hypervisor: waitSandbox is waitVM
renaming...

Signed-off-by: Manohar Castelino <mcastelino@apple.com>
2021-10-22 16:45:35 -07:00
Manohar Castelino
a6385c8fde hypervisor: stopSandbox is StopVM
Renaming. There is no Sandbox specific logic except tracing.

Signed-off-by: Manohar Castelino <mcastelino@apple.com>
2021-10-22 16:45:35 -07:00
Manohar Castelino
f989078cd2 hypervisor: resumeSandbox is ResumeVM
renaming...

Signed-off-by: Manohar Castelino <mcastelino@apple.com>
2021-10-22 16:45:35 -07:00
Manohar Castelino
73b4f27c46 hypervisor: saveSandbox is SaveVM
rename

Signed-off-by: Manohar Castelino <mcastelino@apple.com>
2021-10-22 16:45:35 -07:00
Manohar Castelino
7308610c41 hypervisor: pauseSandbox is nothing but PauseVM
renaming

Signed-off-by: Manohar Castelino <mcastelino@apple.com>
2021-10-22 16:45:35 -07:00
Manohar Castelino
8f78e1cc19 hypervisor: The SandboxConsole is the VM's console
update naming

Signed-off-by: Manohar Castelino <mcastelino@apple.com>
2021-10-22 16:45:35 -07:00
Manohar Castelino
4d47aeef2e hypervisor: Export generic interface methods
This is in preparation for creating a seperate hypervisor package.
Non functional change.

Signed-off-by: Manohar Castelino <mcastelino@apple.com>
2021-10-22 16:45:35 -07:00
Manohar Castelino
6baf2586ee hypervisor: Minimal exports of generic hypervisor internal fields
Export commonly used hypervisor fields and utility functions.
These need to be exposed to allow the hypervisor to be consumed
externally.

Note: This does not change the hypervisor interface definition.
Those changes will be separate commits.

Signed-off-by: Manohar Castelino <mcastelino@apple.com>
2021-10-22 16:45:35 -07:00
Eric Adams
37fa453dd2 osbuilder: Update QAT driver in Dockerfile
This is to bump the OOT QAT 1.7 driver version to the
latest version. I dida test on my QAT enabled system and
everything functioned as expected.

Fixes: #2877

Signed-off-by: Eric Adams <eric.adams@intel.com>
2021-10-22 00:08:24 +00:00
GabyCT
03877f3479
Merge pull request #2872 from likebreath/1020/clh_v19.0
Upgrade to Cloud Hypervisor v19.0
2021-10-21 10:26:55 -05:00
James O. D. Hunt
8c8bcb7b00
Merge pull request #2810 from mythi/sgx-doc
docs: use-cases: Update Intel SGX use case
2021-10-21 12:28:29 +01:00
James O. D. Hunt
09741272bc
Merge pull request #2783 from likebreath/1001/clh_enable_seccomp
virtcontainers: clh: Enable the `seccomp` feature
2021-10-21 09:21:33 +01:00
Bo Chen
8030b6caf0 virtcontainers: clh: Re-generate the client code
This patch re-generates the client code for Cloud Hypervisor v19.0.
Note: The client code of cloud-hypervisor's (CLH) OpenAPI is
automatically generated by openapi-generator [1-2].

[1] https://github.com/OpenAPITools/openapi-generator
[2] https://github.com/kata-containers/kata-containers/blob/main/src/runtime/virtcontainers/pkg/cloud-hypervisor/README.md

Signed-off-by: Bo Chen <chen.bo@intel.com>
2021-10-20 15:48:55 -07:00
Bo Chen
8296754e07 versions: Upgrade to Cloud Hypervisor v19.0
Highlights from the Cloud Hypervisor release v19.0: 1) Improved PTY
handling for serial and virtio-console; 2) PCI boot time optimisations;
3) Improved TDX support; 4) Live migration enhancements (support with
virtio-mem and virtio-balloon); 5) virtio-mem support with vfio-user; 6)
AArch64 for virtio-iommu; 7) Various bug fixes for live-migration and
VFIO passthrough.

Details can be found: https://github.com/cloud-hypervisor/cloud-hypervisor/releases/tag/v19.0

Fixes: #2871

Signed-off-by: Bo Chen <chen.bo@intel.com>
2021-10-20 15:39:53 -07:00
James O. D. Hunt
de45c783ca
Merge pull request #2864 from liubin/fix/2791-delete-cri-containerd-from-versions
runtime: delete cri containerd plugin from versions.yaml
2021-10-20 13:21:34 +01:00
James O. D. Hunt
c1adb075ad
Merge pull request #1937 from jodh-intel/add-tracing-docs
docs: Write tracing documentation
2021-10-20 10:14:46 +01:00
Binbin Zhang
2b13944964 docs: Fix outdated links
fix outdated links which were checked out by workflow/docs-url-alive-check

Fixes #2630

Signed-off-by: Binbin Zhang <binbin36520@gmail.com>
2021-10-20 16:54:39 +08:00
Archana Shinde
6abc70725f
Merge pull request #2523 from Bevisy/main-2295
runtime: delete useless src/runtime/cli/exit.go
2021-10-20 01:37:20 -07:00
Mikko Ylinen
4f75ccb903 docs: use-cases: Update Intel SGX use case
The upstream kernel SGX support has changed drastically since
the initial version of the Intel SGX use case doc was written.

The updated use case documents how to easily setup SGX with
Kata Containers running in a Kubernetes cluster.

Fixes: #2811
Depends-on: github.com/kata-containers/tests#4079

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
Co-authored-by: James O. D. Hunt <james.o.hunt@intel.com>
2021-10-20 09:20:57 +03:00
Binbin Zhang
4f018b5287 runtime: delete useless src/runtime/cli/exit.go
simply use os.Exit() replace exit()
delete useless ci/go-no-os-exit.sh;

Fixes: #2295

Signed-off-by: Binbin Zhang <binbin36520@gmail.com>
2021-10-20 11:42:37 +08:00
Shiming Zhang
7a80aeb0b8 docs: Moving from EOT to EOF
Only this uses EOT, the others are EOF, uniformly changed to EOF to
avoid confusion

Fixes: #2550

Signed-off-by: Shiming Zhang <wzshiming@foxmail.com>
2021-10-20 01:27:23 +08:00
James O. D. Hunt
09a5e03f4a docs: Write tracing documentation
Add documentation explaining how to trace the runtime and agent.

Fixes: #1892.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2021-10-19 17:33:01 +01:00
Julio Montes
448fe0a5ed
Merge pull request #2853 from devimc/2021-10-15/snap/clh+expKernel
snap: add cloud-hypervisor and experimental kernel
2021-10-19 11:19:11 -05:00
bin
b625f62d4b runtime: delete cri containerd plugin from versions.yaml
Delete cri containerd plugin from versions.yaml.

Releated to:
- https://github.com/kata-containers/tests/issues/4061
- https://github.com/kata-containers/kata-containers/issues/2791

Fixes: #2791

Signed-off-by: bin <bin@hyper.sh>
2021-10-19 21:36:08 +08:00
Julio Montes
24fff57c23 snap: make curl commands consistent
remove -k and -Ssf from curl commands

Signed-off-by: Julio Montes <julio.montes@intel.com>
2021-10-19 08:36:06 -05:00
Julio Montes
2b9f79cfc9 snap: add cloud-hypervisor and experimental kernel
Add cloud-hypervisor and experimental kernel as part of the kata snap

fixes #2852

Signed-off-by: Julio Montes <julio.montes@intel.com>
2021-10-19 08:35:06 -05:00
James O. D. Hunt
9db56ffd85
Merge pull request #2863 from wainersm/osbuilder_dracut_rust
osbuilder: Call detect_rust_version() right before install_rust.sh
2021-10-19 11:48:39 +01:00
Archana Shinde
1ba069b303
Merge pull request #2860 from davidhay1969/update_developer_guide
docs: Updating Developer Guide re qemu-img
2021-10-19 01:40:52 -07:00
Bin Liu
29234c6d45
Merge pull request #2859 from ManaSugi/add-libseccomp-dep
versions: Add libseccomp and gperf version
2021-10-19 13:05:00 +08:00
Chelsea Mafrica
4ce2b14e60
Merge pull request #2817 from jodh-intel/clh+fc-agent-tracing
Enable agent tracing for hybrid VSOCK hypervisors
2021-10-18 22:01:52 -07:00
Bin Liu
72d1a04cf1
Merge pull request #2761 from liubin/fix/2752-optimize-test-code
runtime: optimize test code
2021-10-19 12:21:04 +08:00
Bin Liu
78d3f319e2
Merge pull request #2792 from liubin/fix/2791-remove-cri-containerd-from-source
runtime: use containerd package instead of cri-containerd
2021-10-19 10:39:25 +08:00
bin
273a1a9ac6 runtime: optimize test code
This PR includes these optimize changes:

- Remove the dependency on the container engine.
  The old code uses runc to generate config.json and
  Docker to export rootfs, that will be heavy and need
  additional dependency.
  Using a fixed config for busybox image can avoid
  the heavy processing above.

- Moved duplicate code to pkg/katatestutils package

Fixes: #2752

Signed-off-by: bin <bin@hyper.sh>
2021-10-19 09:54:49 +08:00
bin
76f16fd1a7 runtime: use containerd package instead of cri-containerd
cri-containerd project has been merged into containerd repo, and
we should not reference it any more in code and docs.

This commit will use containerd package instead of cri-containerd
package.

Fixes: #2791

Signed-off-by: bin <bin@hyper.sh>
2021-10-19 09:40:20 +08:00
bin
6d55b1bafa docs: use containerd to replace cri-containerd
cri-containerd plugin is deprecated, use containerd instead.

Fixes: #2791

Signed-off-by: bin <bin@hyper.sh>
2021-10-19 09:38:56 +08:00
bin
ed02bc9041 packaging: add containerd to versions.yaml
This commit will add containerd to versions.yaml.

Please at now there are both containerd and cri-containerd
in the versions.yaml.

After updating of kata-containers/tests repo, the cri-containerd
should be removed.

Fixes: #2791

Signed-off-by: bin <bin@hyper.sh>
2021-10-19 09:38:56 +08:00
Wainer dos Santos Moschetta
50da26d3e6 osbuilder: Call detect_rust_version() right before install_rust.sh
When building with dracut method the build_rootfs_distro() is not called, in turn
detect_rust_version() isn't either, so the install_rust.sh script is gave a null
rust version. This changed the script to call detect_rust_version() right before
install_rust.sh.

Related to commit: f34f67d610
Fixes #2862
Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
2021-10-18 16:54:53 -04:00
James O. D. Hunt
41c49a7bf5
Merge pull request #2771 from fengwang666/debug-pid
runtime: update sandbox root dir cleanup behavior in rootless hypervisor
2021-10-18 17:47:47 +01:00
Dave Hay
b4fadc9456 docs: Updating Developer Guide re qemu-img
Adding notes re `qemu-img` dependency for non-Docker builds of image

Fixes #2477

Signed-off-by: Dave Hay <david_hay@uk.ibm.com>
2021-10-18 15:39:15 +01:00
Manabu Sugimoto
b8e69ce5bd versions: Add libseccomp and gperf version
Add `libseccomp` and `gperf` version information to support
for seccomp feature in Kata agent: #1788.

Fixes: #2858

Signed-off-by: Manabu Sugimoto <Manabu.Sugimoto@sony.com>
2021-10-18 23:21:02 +09:00
James O. D. Hunt
d0e5e55e55
Merge pull request #2569 from Bevisy/main-2188
utils: kata-manager: Update kata-manager.sh for new containerd config
2021-10-18 14:50:16 +01:00
Julien Ropé
17a8c5c685 runtime: Fix random failure for TestIoCopy
When running the TestIoCopy test, on some occasions, the test
runs too quick, and closes the stdin pipe before the ioCopy()
routine start to read from it. This causes a SIGSEGV error.

To fix this issue, I am adding additional read/write tests before
closing the pipes. As the read operation waits for the writer to
be done, this actually synchronizes the threads and make sure
the final tests (with closed pipes) works as expected.

Fixes: #2042

Signed-off-by: Julien Ropé <jrope@redhat.com>
2021-10-18 15:25:57 +02:00
James O. D. Hunt
f16a99603c
Merge pull request #2399 from Jakob-Naucke/container-osbuilder-respin
osbuilder: Re-enable building the agent in Docker
2021-10-18 12:06:37 +01:00
Bin Liu
1cb38ecbe7
Merge pull request #2843 from zhaojizhuang/fixroute
agent: Do not fail when trying to adding existing routes
2021-10-18 15:52:29 +08:00
Bin Liu
c2be2dfb61
Merge pull request #2848 from c3d/bug/2847-tag-typo
tracing: Fix typo in "package" tag name
2021-10-18 14:50:47 +08:00