Commit Graph

6351 Commits

Author SHA1 Message Date
bin
84ee8aa8b2 agent: delete not used functions
In file src/agent/rustjail/src/validator.rs,
these two functions are not used:
- get_namespace_path
- check_host_ns

Fixes: #1783

Signed-off-by: bin <bin@hyper.sh>
2021-04-30 19:17:41 +08:00
Fabiano Fidêncio
ea9936e004 versions: Bump runc to v1.0.0-rc93
Let's bump runc to its latest release.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2021-04-30 11:43:18 +02:00
Fabiano Fidêncio
9c333b2c79 versions: Bump CRI-O version to 1.21.x
For CRI-O, let's rely on the "release-1.21" branch, as this is the
branch getting backports for the 1.21.x cycle.

Relying on the branch avoids our needs to keep bumping it every now and
then.

Fixes: #1688

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2021-04-30 11:42:42 +02:00
Fabiano Fidêncio
e33f207b7d versions: Bump critools version to 1.21.0
Let's bump critools version to the same version of the kubernetes.

Fixes: #1686

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2021-04-30 11:42:42 +02:00
Fabiano Fidêncio
8e5df72302 versions: Bump kubernetes version to 1.21.0
1.21.0 is the latest k8s release.

Fixes: #1685

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2021-04-30 11:42:42 +02:00
Fabiano Fidêncio
d15f84c956 versions: Remove Docker entry
It's been some time already, since
https://github.com/kata-containers/tests/pull/3272, that we don't depend
on a specific version of docker.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2021-04-30 11:42:42 +02:00
Fabiano Fidêncio
516f4ec06e versions: Remove OpenShift entry
Tested between Kata Containers and OpenShift are already being done via
the OpenShift CI.  This entry is only related to the OpenShift 3.x,
which is not tested anymore via our CI in any possible way.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2021-04-30 11:42:42 +02:00
Fabiano Fidêncio
be101ac1ef versions: Remove CRI-O meta dependencies
CRI-O meta dependencies (crictl and openshift) are a left over from the
OCP 3.x era.  Currently we don't need those as we have Kata Containers
onboard with the OpenShift CI, and we don't test OCP 3.x in any way
nowadays.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2021-04-30 11:42:42 +02:00
Fabiano Fidêncio
bd486f7bf3
Merge pull request #1720 from ManaSugi/update-seccomp-spec
agent: Update seccomp configuration for errnoRet and flags
2021-04-30 10:52:42 +02:00
Bo Chen
1ca6bedf3e versions: Upgrade to cloud-hypervisor v15.0
Quotes from the cloud-hypervisor release v15.0:

This release is the first in a new version numbering scheme to represent that
we believe Cloud Hypervisor is maturing and entering a period of stability.
With this new release we are beginning our new stability guarantees.

Other highlights from the latest release include: 1) Network device rate
limiting; 2) Support for runtime control of `virtio-net` guest offload;
3) `--api-socket` supports file descriptor parameter; 4) Bug fixes on
`virtio-pmem`, PCI BARs alignment, `virtio-net`, etc.; 5) Deprecation of
the "LinuxBoot" protocol for ELF and bzImage in the coming release.

Details can be found: https://github.com/cloud-hypervisor/cloud-hypervisor/releases/tag/v15.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: #1779

Signed-off-by: Bo Chen <chen.bo@intel.com>
2021-04-29 10:56:22 -07:00
Eric Ernst
906c0df405 kata-deploy: don't update worker pool nodes
Our cluster's life is shorter than time it takes to update nodes; for
better stability of the kata-deploy test, let's not update the nodes.

Signed-off-by: Eric Ernst <eric_ernst@apple.com>
2021-04-29 09:24:51 -07:00
Hui Zhu
d8896157df ci/install_yq.sh: install_yq: Check version before return
Check the yq version before return.

Fixes: #1776

Signed-off-by: Hui Zhu <teawater@antfin.com>
2021-04-29 18:19:18 +08:00
Jakob Naucke
3ee61776d6
virtcontainers: Enable virtio-fs on s390x
Allow and configure vhost-user-fs devices (virtio-fs) on s390x. As a
consequence, appendVhostUserDevice now takes a context, which affects
its signature for other architectures.

Fixes: #1753

Signed-off-by: Jakob Naucke <jakob.naucke@ibm.com>
2021-04-29 09:54:08 +02:00
Jakob Naucke
8385ff9554
runtime: Re-vendor GoVMM
for vhost-user-fs-ccw devno support

shortlog:
f0e9a35 Merge pull request #171 from Jakob-Naucke/fix-virtiofs-s390x
abd3c7e qemu: VhostUserDevice CCW device numbers
3eaeda7 qemu: Refactor vhostuserDev.QemuParams
7183b12 Merge pull request #166 from kata-containers/egernst-patch-1
092293f Merge pull request #169 from QiuMike/master
511cf58 Fix qemu commandline issue with empty romfile
8ba62b0 Merge pull request #164 from devimc/2021-03-30/tdxSupport
b3eac95 qmp: remove frequent, chatty log
3141894 qemu: add support for tdx-guest object

Signed-off-by: Jakob Naucke <jakob.naucke@ibm.com>
2021-04-29 09:53:54 +02:00
Jakob Naucke
adba4532a4
virtcontainers: Revert "virtcontainers: Allow s390x appendVhostUserDevice"
This reverts commit 7f60911333.
Patch allowed other vhost user devices besides FS not supported on s390x
and failed to attach a CCW device number, which results in the
inavailability to use more devices after vhost-user-fs-ccw.

Signed-off-by: Jakob Naucke <jakob.naucke@ibm.com>
2021-04-29 09:43:33 +02:00
Eric Ernst
b20dff8027
Merge pull request #1759 from kata-containers/fix_update
Fix the issue that sandbox size is not right after update
2021-04-28 14:48:24 -07:00
Eric Ernst
ede078bc85 kata-deploy: aks-test: bump kubernetes/containerd
Bump to 1.20, latest aks-engine

Signed-off-by: Eric Ernst <eric_ernst@apple.com>
2021-04-28 10:41:28 -07:00
Eric Ernst
484af12b54 kata-deploy: update to handle new runtimeclass path
Runtimeclass paths changed. Update the kata-deploy action's test
accordingly.

Signed-off-by: Eric Ernst <eric_ernst@apple.com>
2021-04-28 10:41:28 -07:00
Eric Ernst
05c224c3d4 runtimeclass: add nodeSelector
To ensure we run on nodes which have Kata installed, let's add the
nodeSelector to the runtimeclass definition, and have it match the label
that we applied during installation of the kata artifacts.

Signed-off-by: Eric Ernst <eric_ernst@apple.com>
2021-04-28 10:41:28 -07:00
zyt312074545
ee7de8abcc tools: fix build kernel shell error
Build kernel shell setup with -f, don't find patches directory path,
because patches_path is none, so fix this error.

Fixes: #1768

Signed-off-by: zyt312074545 <zyt312074545@hotmail.com>
2021-04-28 12:54:18 +00:00
Fabiano Fidêncio
783f5aba68
Merge pull request #1733 from c3d/issue/1728-subpath-limitation
docs: Document limitation regarding subpaths
2021-04-28 08:27:58 +02:00
Eric Ernst
23a8179184
Merge pull request #1756 from egernst/leave-no-virtiofs-behind
qemu: kill virtiofsd if failure to start VMM
2021-04-27 17:16:33 -07:00
Fabiano Fidêncio
cd1c1ae239
Merge pull request #1765 from wainersm/qemu_1
runtime/virtcontainers: Fix typo on qmp error msg
2021-04-27 21:23:32 +02:00
Christophe de Dinechin
7d5a4252b6 docs: Document limitation regarding subpaths
Subpaths are not supported at the moment. Document that fact.

Fixes: #1728

Signed-off-by: Christophe de Dinechin <christophe@dinechin.org>
2021-04-27 18:53:45 +02:00
Wainer dos Santos Moschetta
3677640811 runtime/virtcontainers: Fix typo on qmp error msg
"negotiate" was misspelled on qemu's qmp error message.

Fixes #1764
Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
2021-04-27 11:52:42 -04:00
Eric Ernst
12a65d2359 runtimeclass: drop stale runtimeclass definitions
- 1.13/1.14 are very old now; let's drop
- move from k8s-1.18 to just runtimeclasses directoy
- update docs to reflect the new reality

Fixes: #1425

Signed-off-by: Eric Ernst <eric_ernst@apple.com>
2021-04-27 08:06:09 -07:00
Hui Zhu
0787ea8073 cgroupsCreate: not set resources to c.config.Resources
cgroupsCreate will just keep the CPU resources infomation but not the
others.
Set it to c.config.Resources will clean most of resources of the
container.

This commit remove it to handle the issue.

Fixes: #1758

Signed-off-by: Hui Zhu <teawater@antfin.com>
2021-04-27 16:44:30 +08:00
Hui Zhu
831224aa22 Sandbox: Fix ContainerConfig ptr in CreateContainer and createContainers
The pointer that send to newContainer in CreateContainer and
createContainers is not the pointer that point to the address in
s.config.Containers.

This commit fix this issue.

Fixes: #1758

Signed-off-by: Hui Zhu <teawater@antfin.com>
2021-04-27 16:44:22 +08:00
Eric Ernst
a57c8ab1be qemu: kill virtiofsd if failure to start VMM
If the QEMU VMM fails to launch, we currently fail to kill virtiofsd,
resulting in leftover processes running on the host. Let's make sure we
kill these, and explicitly cleanup the virtiofs socket on the
filesystem.

Ideally we'll migrate QEMU to utilize the same virtiofsd interface that
CLH uses, but let's fix this bug as a first step.

Fixes: #1755

Signed-off-by: Eric Ernst <eric_ernst@apple.com>
2021-04-26 21:07:20 -07:00
bin
95e54e3f48 docs: add per-Pod Kata configurations for enable_pprof
Now enabling enable_pprof for individual pods is supported,
but not documented.

This commit will add per-Pod Kata configurations for `enable_pprof`
in file `docs/how-to/how-to-set-sandbox-config-kata.md`

Fixes: #1744

Signed-off-by: bin <bin@hyper.sh>
2021-04-26 22:20:49 +08:00
Fabiano Fidêncio
fb30c58847
Merge pull request #1747 from liubin/fix/1746-deleted-not-used-files
cli: delete not used files
2021-04-26 09:57:19 +02:00
bin
13c23fec11 cli: delete tracing code for kata-runtime binary
There are no pod/container operations in kata-runtime binary,
tracing in this package is meaningless.

Fixes: #1748

Signed-off-by: bin <bin@hyper.sh>
2021-04-26 11:11:22 +08:00
bin
ff2b9e5478 cli: delete not used files
Delete two files that not used anymore:
- src/runtime/cli/console.go
- src/runtime/cli/console_test.go

Fixes: #1746

Signed-off-by: bin <bin@hyper.sh>
2021-04-25 17:46:56 +08:00
bin
0d0a520d42 clh: return error if apiSocketPath failed
If apiSocketPath failed, should return the error, but not nil

Fixes: #1724

Signed-off-by: bin <bin@hyper.sh>
2021-04-25 10:25:42 +08:00
Lars Lehtonen
fc6bb01a7f
runtime: fix dropped error
Fixes: #212

Signed-off-by: Lars Lehtonen <lars.lehtonen@gmail.com>
2021-04-24 14:18:50 -07:00
Chelsea Mafrica
8587e3a00b
Merge pull request #1732 from liubin/fix/1731-delete-builtin-parameter
runtime: delete not used function parameter builtIn
2021-04-23 18:30:55 -07:00
Fabiano Fidêncio
fe2311cd4c
Merge pull request #1739 from pmores/virtiofsd-extra-args-annotation-handling
add io.katacontainers.config.hypervisor.virtio_fs_extra_args handling
2021-04-23 23:22:01 +02:00
Pavel Mores
30ff6ee88b runtime: handle io.katacontainers.config.hypervisor.virtio_fs_extra_args
Users can specify extra arguments for virtiofsd in a pod spec using the
io.katacontainers.config.hypervisor.virtio_fs_extra_args annontation.
However, this annotation was ignored so far by the runtime.  This commit
fixes the issue by processing the annotation value (if present) and
translating it to the corresponding hypervisor configuration item.

Fixes #1523

Signed-off-by: Pavel Mores <pmores@redhat.com>
2021-04-23 21:09:28 +02:00
Fabiano Fidêncio
5eaf7a9982
Merge pull request #1049 from c3d/feature/1043-entropy-source-annotation
Entropy source annotation
2021-04-23 20:16:11 +02:00
bin
677f0d9904 runtime: delete not used function parameter builtIn
Parametr builtIn is not used in function updateRuntimeConfigAgent,
delete it from updateRuntimeConfigAgent and LoadConfiguration
function signature.

Fixes: #1731

Signed-off-by: bin <bin@hyper.sh>
2021-04-23 17:42:42 +08:00
Fabiano Fidêncio
a4fffa1f22
Merge pull request #1714 from littlejawa/issue_1713
runtime: Fix stdout/stderr output from container being truncated
2021-04-22 23:00:47 +02:00
Fabiano Fidêncio
b41d9a99b4
Merge pull request #1703 from lifupan/main_fix
fix the issue of missing set fsGroup for EphemeralStorage
2021-04-22 20:29:36 +02:00
Christophe de Dinechin
dcb9f40394 config: Protect annotation for entropy_source
It would be undesirable to be given an annotation like "/dev/null".
Filter out bad annotation values.

Fixes: #1043

Suggested-by: James O. D. Hunt <james.o.hunt@intel.com>
Signed-off-by: Christophe de Dinechin <dinechin@redhat.com>
2021-04-22 15:26:40 +02:00
fupan.lfp
f4c26aad00 agent: fix the issue of missing set fsGroup for EphemeralStorage
For k8s emptyDir volume, a specific fsGroup would
be set for it, thus guest should get this fsGroup
from runtime and set it properly on the EphemeralStorage
volume in guest.

Fixes: #1580

Signed-off-by: fupan.lfp <fupan.lfp@antfin.com>
2021-04-22 21:09:02 +08:00
fupan.lfp
628d55bf4c kata-agent: fix the issue of fsGroup missing
For k8s emptyDir volume, a specific fsGroup would
be set for it, thus runtime should pass this fsGroup
for EphemeralStorage to guest and set it properly on
the emptyDir volume in guest.

Fixes: #1580

Signed-off-by: fupan.lfp <fupan.lfp@antfin.com>
2021-04-22 21:08:52 +08:00
Fabiano Fidêncio
14dca3fe1f
Merge pull request #1718 from egernst/qemu-assert-fix
qemu: Fix assertion failure on shutdown
2021-04-22 12:57:25 +02:00
David Gibson
e91591fff2
Merge pull request #1701 from dgibson/clippy
Assorted clippy fixes for Rust agent
2021-04-22 20:36:49 +10:00
Bin Liu
db4fbac1d3
Merge pull request #1722 from Tim-Zhang/use-channle-for-process-exit
agent: use channel instead of pipe(2) to send exit signal of process
2021-04-22 15:27:36 +08:00
David Gibson
0405beb2d8 agent: Remove unused Default implementation for NamespaceType
Currently we implement the Default trait for NamespaceType.  It doesn't
really make sense to have a default for this type though - you really need
to know what type of namespace you're setting.  In fact the Default
implementation is never used, so we can just drop it.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2021-04-22 11:54:02 +10:00
David Gibson
7b83b7ec1f agent/uevent: Better initialize Uevent in test
We had some code that initialized a Uevent to the default value, then set
specific fields to various values.  This can be accomplished inside the one
initialized using the ..Default::default() syntax.  Making this change
stops clippy from complaining.

fixes #1611

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2021-04-22 11:53:57 +10:00