Commit Graph

6359 Commits

Author SHA1 Message Date
Jianyong Wu
b7f59fa71d clh: correct cloud-hypervisor installation
Currently, there is cloud hypervisor binary released only for x86, thus
we must build from source code when install cloud hypervisor on arm64.

Fixes: #2440
Signed-off-by: Jianyong Wu <jianyong.wu@arm.com>
2021-08-17 15:34:28 +08:00
Jianyong Wu
5d86916e03 qemu/arm: remove nvdimm/"ReadOnly" option on arm64
There is a new "ReadOnly" option added to nvdimm device in qemu
and now added to kata. However, qemu used for arm64 is a little
old and has no this feature. Here we remove this feature for arm.

Depends-on: github.com/kata-containers/tests#3831
Fixes: #2320
Signed-off-by: Jianyong Wu <jianyong.wu@arm.com>
2021-08-17 15:33:32 +08:00
Fabiano Fidêncio
b52f719e4b
Merge pull request #2366 from likebreath/0730/backport_clh_v17.0
stable-2.1 | versions: Upgrade to Cloud Hypervisor v17.0
2021-08-12 22:07:07 +02:00
Bo Chen
a8c05914b8
Merge pull request #2200 from likebreath/0708/backport_clh_remove_version_check
[backport] runtime: Remove the version check for cloud hypervisor
2021-08-11 17:29:38 -07:00
Bo Chen
b6a8a71afa versions: Upgrade to Cloud Hypervisor v17.0
Highlights from the Cloud Hypervisor release v17.0: 1) ARM64 NUMA
support using ACPI; 2) `Seccomp` support for MSHV backend; 3) Hotplug of
macvtap devices; 4) Improved SGX support; 5) Inflight tracking for
`vhost-user` devices; 6) Bug fixes.

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

Note: The client code of cloud-hypervisor's OpenAPI is automatically
generated by `openapi-generator` [1-2]. As the API changes do not
impact usages in Kata, no additional changes in kata's runtime are
needed to work with the current version of cloud-hypervisor.

[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

Fixes: #2333

Signed-off-by: Bo Chen <chen.bo@intel.com>
(cherry picked from commit cc0bb9aebc)
2021-08-11 10:52:58 -07:00
Bo Chen
87b7d054fb runtime: Remove the version check for cloud hypervisor
It looks like the version check for cloud hypervisor (clh) was added
initially when clh was actively evolving its API. We no longer need the
version check as clh API has been fairly stable for its recent releases.

Fixes: #1991

Signed-off-by: Bo Chen <chen.bo@intel.com>
(cherry picked from commit d08603bebb)
2021-08-11 10:48:37 -07:00
Fabiano Fidêncio
d20ba7da17
Merge pull request #2413 from nubificus/fix_jailed_fc-stable-2.1
stable-2.1 | virtcontainers: fc: properly remove jailed block device
2021-08-10 14:42:23 +02:00
Anastassios Nanos
adcd2aeaea virtcontainers: fc: properly remove jailed block device
When running a firecracker instance jailed, block devices
are not removed correctly, as the jailerRoot path is not
stripped from the PATCH command sent to the FC API.

This patch differentiates the jailed case from the non-jailed
one and allows the firecracker instance to be properly
terminated.

Fixes #2387

Signed-off-by: Anastassios Nanos <ananos@nubificus.co.uk>
(cherry picked from commit 64dd35ba4f)
2021-08-09 16:16:12 +01:00
Fabiano Fidêncio
8de95b7c3b
Merge pull request #2226 from snir911/backporting-2.1
stable 2.1 | Backports
2021-08-04 21:44:29 +02:00
Julio Montes
b54ca3de6a vendor: update govmm
Bring read-only nvdimm support

Shortlog:
335fa81 qemu: fix golangci-lint errors
61b6378 .github/workflows: reimplement github actions CI
9d6e797 go: support go modules
0d21263 qemu: support read-only nvdimm
ff34d28 qemu: Consistent parameter building

Signed-off-by: Julio Montes <julio.montes@intel.com>
(Based-on: 070590fb53)
2021-08-04 16:35:12 +03:00
Julio Montes
d3bab50496 runtime: virtcontainers: make rootfs image read-only
Improve security by making rootfs image read-only, nobody
will be able to modify it from the guest.

fixes #1916

Signed-off-by: Julio Montes <julio.montes@intel.com>
2021-08-04 10:38:41 +03:00
Francesco Giudici
6456cb282b osbuilder/scripts: add support to yq version 4 and above
yq changed syntax in an incompatible way starting from version 4 and
above. Deal with that.

Fixes: #2297

Signed-off-by: Francesco Giudici <fgiudici@redhat.com>
2021-08-03 11:32:15 +03:00
bin
c1dcc5f7f1 osbuilder: Skip installing golang for building rootfs
Building rootfs does not depend on golang, delete intalling
golang may save build time.

And there is only rust agent now, the code for golang agent should
be deleted too.

Fixes: #2170

Signed-off-by: bin <bin@hyper.sh>
2021-08-02 17:54:54 +03:00
Snir Sheriber
e7322e235a ci: static checks: use defined target_branch
Fixes: #2214
Signed-off-by: Snir Sheriber <ssheribe@redhat.com>
2021-08-02 10:30:40 +03:00
fupan.lfp
0f7a54adf3 qemu: stop the virtiofsd specifically
We'd better stop the virtiofsd specifically after stop qemu,
instead of depending on the qemu's termination to notify virtiofsd
to exit.

Fixes: #2211

Signed-off-by: fupan.lfp <fupan.lfp@antgroup.com>
2021-08-02 10:30:40 +03:00
fupan.lfp
f3cf46a621 shimv2: fix the issue of leaking the hypervisor processes
Since we only send an shutdown qmp command to qemu when do
stopSandbox, and didn't wait until qemu process's exit, thus
we'd better to make sure it had exited when shimv2 terminated.
Thus here to do the last cleanup of the hypervisor.

Fixes: #2198

Signed-off-by: fupan.lfp <fupan.lfp@antgroup.com>
2021-08-02 10:30:40 +03:00
David Gibson
2e045fc105 agent: Fix to parsing of /proc/self/mountinfo
get_mounts() parses /proc/self/mountinfo in order to get the mountpoints
for various cgroup filesystems.  One of the entries in mountinfo is the
"device" for each filesystem, but for virtual filesystems like /proc, /sys
and cgroups, the device entry is arbitrary.  Depending on the exact rootfs
setup, it can end up being "-".

This breaks get_mounts() because it uses " - " as a separator.  There
really is a " - " separator in mountinfo, but in this case the device entry
shows up as a second one.  Fix this, by changing a split to a splitn, which
will effectively only consider the first " - " in the line.

While we're there, make the warning message more useful, by having it
actually show which line it wasn't able to parse.

fixes #2182

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2021-08-02 10:30:40 +03:00
Tim Zhang
aa4a3053a0 agent: enhance tests of execute_hook
Use which to find the full path of exe before run execute_hook
to avoid error: 'No such file or directory'

Fixes: #2172

Signed-off-by: Tim Zhang <tim@hyper.sh>
2021-08-02 10:30:40 +03:00
bin
0fd747c752 agent: update netlink libraries
Update rtnetlink to use crate.io to make cargo vendor work.
Add vendor/ to .gitignore.

Fixes: #2111

Signed-off-by: bin <bin@hyper.sh>
2021-08-02 10:30:40 +03:00
fupan.lfp
754e73ca99 shimv2: fix the issue of leaking wait goroutines
After create an container/exec successfully, containerd
would wait it immediately, and if start it failed, there
is no chance to send value to exitCh, thus the wait goroutine
would blocked for ever and had no chance to exit.

Fixes: #2087

Signed-off-by: fupan.lfp <fupan.lfp@antgroup.com>
2021-08-02 10:30:40 +03:00
Julio Montes
8138a16b8b runtime: do not hot-remove PMEM devices
PMEM devices cannot be hot-removed from a running VM.

fixes #2018

Signed-off-by: Julio Montes <julio.montes@intel.com>
2021-08-02 10:30:40 +03:00
Wainer dos Santos Moschetta
5454c3d710 ci: snap: Fetch history to all branches and tags
The snap/snapcraft.yaml set AGENT_VERSION to the current VERSION. The osbuilder script
will try to checkout the AGENT_VERSION tag. Let's ensure that all tags and branches
are fetched by the github's checkout action so the tag checkout does not fail.

Fixes #2052
Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
2021-08-02 10:30:40 +03:00
Jakob Naucke
d1de06c9ea virtcontainers: Don't fail memory hotplug
Architectures that do not support memory hotplugging will fail when
memory limits are set because that amount is hotplugged. Issue a warning
instead. The long-term solution is virtio-mem.

Fixes: #1412
Signed-off-by: Jakob Naucke <jakob.naucke@ibm.com>
2021-08-02 10:30:40 +03:00
Tim Zhang
8dbf4f3ade agent: Upgrade mio to v0.7.13 to fix epoll_fd leak problem
Fixes: #2035
Fixes: tokio-rs/tokio/#3809

Signed-off-by: Tim Zhang <tim@hyper.sh>
2021-08-02 10:30:40 +03:00
Fabiano Fidêncio
ce11a6f632 versions: Update containerd to v1.3.10
Bump containerd version to the latest v1.3.x, so we don't have to do
intrusive changes in our codebase (as done for in the main branch).

Fixes: #2350

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2021-07-31 11:16:44 +02:00
Bin Liu
cf482802b0
Merge pull request #2154 from GabyCT/backvirtiofs
docs: Fix url in virtiofs documentation
2021-07-01 14:03:36 +08:00
Gabriela Cervantes
fab58301a2 docs: Fix url in virtiofs documentation
This PR updates the url for virtiofs documentation.

Fixes #2134

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2021-06-30 17:33:04 +00:00
Chelsea Mafrica
28a815abe1
Merge pull request #2100 from GabyCT/stable2.1docreq
stable-2.1 | docs: Update urls for Documentation Requirements document
2021-06-23 23:33:03 -07:00
Chelsea Mafrica
7369ee8de3
Merge pull request #2099 from littlejawa/issue_crio_ctr_6
stable-2.1 | runtime: report finish time in containers stats
2021-06-23 23:27:49 -07:00
Gabriela Cervantes
7c80f31bf5 docs: Update urls for Documentation Requirements document
This PR updates the proper urls for the Documentation Requirements document.

Fixes #2094

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2021-06-23 17:12:12 +00:00
Julien Ropé
962cb94c6b runtime: report finish time in containers stats
Make sure we report the exit time for the container when we answer a "Status" request.

Fixes: #2098

Signed-off-by: Julien Ropé <jrope@redhat.com>
2021-06-23 17:51:33 +02:00
Chelsea Mafrica
babc87da12
Merge pull request #2076 from GabyCT/backdoc
backport stable-2.1
2021-06-22 18:19:51 -07:00
Gabriela Cervantes
6db24bbe16 docs: Update kata-deploy urls for installation document
This PR updates the proper url for kata-deploy scripts at the
minikube installation.

Fixes #2072

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2021-06-21 20:10:21 +00:00
Gabriela Cervantes
2162422bd9 docs: Update url for installation guides
This PR updates the correct url for kata installation guides in kata 2.x

Fixes #2069

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2021-06-21 20:09:53 +00:00
Wainer Moschetta
e77a99c34f
Merge pull request #2055 from wainersm/stable-2.1-fix_qemu_5_2
stable-2.1 | qemu: Add nvdimm read-only file support
2021-06-18 10:11:50 -03:00
Wainer dos Santos Moschetta
72e8c1e494 qemu: Add nvdimm read-only file support
For QEMU 5.0.0 it is applied the patches/5.0.x/0002-memory-backend-file-nvdimm-support-read-only-files-a.patch
to fix an issue with the use of read-only files as backend memory of nvdimm devices. When Kata Containers bumped
to QEMU 5.2.0 that patch was left behind by mistake. In meanwhile a proper feature ("nvdimm: read-only file support")
was proposed and merged upstream (see https://mail.gnu.org/archive/html/qemu-devel/2021-01/msg00258.html).

This contain the backport of the commit 8360ebeb4f4a from QEMU master which should be applied on QEMU 5.2.0
so that feature is available to Kata Containers.

Fixes #2011

Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
(cherry picked from commit 3f39df0d18)
2021-06-17 09:20:10 -04:00
snir911
bf99c4f14a
Merge pull request #2028 from likebreath/0614/clh_v16.0-stable-2.1
[backport stable-2.1] versions: Upgrade to cloud-hypervisor v16.0
2021-06-16 10:04:54 +03:00
Bo Chen
b35506d124 versions: Upgrade to cloud-hypervisor v16.0
Highlights from the Cloud Hypervisor release v16.0: 1) Improved live
migration support; 2) Improved `vhost-user` support; 3) ARM64 ACPI and
UEFI support; 4) Bug fixes.

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

Note: The client code of cloud-hypervisor's OpenAPI is automatically
generated by `openapi-generator` [1-2]. As the API changes do not
impact usages in Kata, no additional changes in kata's runtime are
needed to work with the current version of cloud-hypervisor.

[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

Fixes: #1992

Signed-off-by: Bo Chen <chen.bo@intel.com>
(cherry picked from commit 85c40001da)
2021-06-15 10:26:09 -07:00
Bo Chen
70d5e72ffc
Merge pull request #2033 from GabyCT/fixdocstable
backport docs: Update README for runtime documentation
2021-06-14 18:11:18 -07:00
Gabriela Cervantes
d761bb22e7 docs: Update README for runtime documentation
This PR removes old links that were used in kata 1.x but not
longer valid for kata 2.x

Fixes #2019

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2021-06-14 16:44:23 -05:00
Fabiano Fidêncio
0e2be438bd
Merge pull request #2007 from fidencio/2.1.1-branch-bump
# Kata Containers 2.1.1
2021-06-11 17:09:11 +02:00
Fabiano Fidêncio
55dede1bce release: Kata Containers 2.1.1
- stable-2.1 | week 23: weekly backports
- stable-2.1 | versions: Update kubernetes to 1.21.1
- stable-2.1 | Port fd leak fixes
- [stable-2.1] Weekly backports to stable-2.1 branch, May 31st 2021
- [backport]runtime: and cgroup and SandboxCgroupOnly check for check sub-command
- Weekly stable 2.1 backports may 24th
- [backport-2.1] workflows: release kata 2.x snap through the stable channel
- [2.1] how-to-use-virtio-mem-with-kata.md: Update doc to make it clear
- github: Do not run require porting labels on stable-2.1

492729f4 tools/packaging: clone meson and dependencies before building QEMU
db8d853b runtime: remove covertool from cli test
3fad5277 docs: Fix Release Process document
175970c9 versions: Update kubernetes to 1.21.1
1cc2ad3f agent: Fix fd leak caused by netlink
ac34f6df agent: Upgrade tokio-vsock to fix fd leak of vsock socket
915fea7b cgroup: fix the issue of set mem.limit and mem.swap
a05e1377 agent: re-enable the standard SIGPIPE behavior
8019f732 virtiofsd: Fix file descriptors leak and return correct PID
e48c9d42 runtime: and cgroup and SandboxCgroupOnly check for check sub-command
7874ab33 agent: fix start container failed when dropping all capabilities
536634e9 qemu: align before memory hotplug on arm64
c51891fe sandbox-bindmount: persist mount information
b137c7ac sandbox: Cleanup if failure to setup sandbox-bindmount occurs
68a77a7d workflows: release kata 2.x snap through the stable channel
550269ff how-to-use-virtio-mem-with-kata.md: Update doc to make it clear
1ea0dc98 github: Do not run require porting labels on stable-2.1

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2021-06-11 09:48:55 +02:00
Fabiano Fidêncio
4d514ba1fb
Merge pull request #1978 from fidencio/wip/weekly-backports-week-23
stable-2.1 | week 23: weekly backports
2021-06-10 10:19:52 +02:00
Julio Montes
492729f443 tools/packaging: clone meson and dependencies before building QEMU
In some distros (Ubuntu 18 and 20) it's not possible to clone meson
and QEMU dependencies from https://git.qemu.org due to problems with
its certificates, let's pull these dependencies from github before
building QEMU.

fixes #1965

Signed-off-by: Julio Montes <julio.montes@intel.com>
(cherry picked from commit 9ec9bbbabc)
2021-06-08 10:37:42 +02:00
Fabiano Fidêncio
645e950b8e
Merge pull request #1963 from fidencio/wip/stable-2.1-update-kubernetes-1.21.0-to-1.21.1
stable-2.1 | versions: Update kubernetes to 1.21.1
2021-06-08 10:02:21 +02:00
Shengjing Zhu
db8d853b99 runtime: remove covertool from cli test
covertool has no active since 2018 and is not compatible with go1.16

  ../vendor/github.com/dlespiau/covertool/pkg/cover/cover.go:76:29: cannot use f (type dummyTestDeps) as type testing.testDeps in argument to testing.MainStart:
  dummyTestDeps does not implement testing.testDeps (missing SetPanicOnExit0 method)

Fixes: #1862

Signed-off-by: Shengjing Zhu <zhsj@debian.org>
(cherry picked from commit 1b60705646)
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2021-06-08 10:00:51 +02:00
Gabriela Cervantes
3fad527734 docs: Fix Release Process document
This PR updates the correct url for github actions as well as it
corrects a misspelling.

Fixes #1960

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
(cherry picked from commit 9158ec68cc)
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2021-06-08 10:00:47 +02:00
Fabiano Fidêncio
175970c93a versions: Update kubernetes to 1.21.1
The reason for doing such is to (try to) avoid random crashes we've been
facing as part of our CI, such as the one reported as part of
https://github.com/kata-containers/tests/issues/3473

Fixes: #1850

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
(cherry picked from commit dbef2b2931)
2021-06-04 15:43:28 +02:00
Tim Zhang
6cea1b146c
Merge pull request #1959 from Tim-Zhang/port-fix-fd-leak-for-stable-2.1
stable-2.1 | Port fd leak fixes
2021-06-03 20:15:23 +08:00
Tim Zhang
1cc2ad3f34 agent: Fix fd leak caused by netlink
See also: little-dude/netlink#165

Fixes: #1952

Because the author of netlink has no time to maintain the crate
(https://github.com/little-dude/netlink/issues/161), so we
need to switch the dependency to github temporarily.

Signed-off-by: Tim Zhang <tim@hyper.sh>
2021-06-03 17:24:09 +08:00