Commit Graph

6456 Commits

Author SHA1 Message Date
snir911
1faaf5f35d
Merge pull request #2000 from ManaSugi/update-mount-flags
agent: Add some mount options and sort the options alphabetically
2021-06-17 11:53:11 +03:00
Tim Zhang
90029032b4
Merge pull request #2049 from liubin/2048/fix-log-field
runtime: using detail propertites instead of function name in log field
2021-06-17 10:53:12 +08:00
Wainer Moschetta
9e6f1f7794
Merge pull request #2041 from wainersm/fix_qemu_5_2
qemu: Add nvdimm read-only file support
2021-06-16 20:48:17 -03:00
Wainer dos Santos Moschetta
3f39df0d18 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>
2021-06-16 17:03:05 -04:00
Fabiano Fidêncio
1bad9999fd
Merge pull request #2051 from wainersm/hot_fix_snap_ci
ci: snap: Fetch history to all branches and tags
2021-06-16 22:41:02 +02:00
Wainer dos Santos Moschetta
23d31d5a7c 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-06-16 13:34:09 -04:00
bin
2022c64f94 runtime: using detail propertites instead of function name in log field
To print the correct value of kernel parameters, the log field
value should not be a function name. And for that qemuArchBase
doesn't contain debug flag, so the log contains debug/non-debug
parameters.

Fixes: #2048

Signed-off-by: bin <bin@hyper.sh>
2021-06-17 00:17:16 +08:00
Julio Montes
85bb5cffe1
Merge pull request #2017 from devimc/2021-06-11/fixPmemCSI
memory_offset must be larger than 32 bit
2021-06-16 09:10:48 -05:00
Julio Montes
361bee91f7 runtime/virtcontrainers: fix alignment structures
fix alignment of qemuArchBase and HypervisorConfig structures

Signed-off-by: Julio Montes <julio.montes@intel.com>
2021-06-16 07:16:49 -05:00
Julio Montes
6be8bf5c66 docs: update annotations documentation
update documentation to reflect value type of `memory_offset`

Signed-off-by: Julio Montes <julio.montes@intel.com>
2021-06-16 07:16:49 -05:00
Julio Montes
7834f4127f virtcontainers: change memory_offset to uint64
`memory_offset` is used to increase the maximum amount of memory
supported in a VM, this offset is equal to the NVDIMM/PMEM device that
is hot added, in real use case workloads such devices are bigger than
4G, which is the current limit (uint32).

fixes #2006

Signed-off-by: Julio Montes <julio.montes@intel.com>
2021-06-16 07:16:49 -05:00
Manabu Sugimoto
bd27f7bab5 agent: Sort PROPAGATION and OPTIONS alphabetically to scan easily
It's hard to visually scan over the list currently.
Therefore, we should sort the list alphabetically to scan easily.

Fixes: #1999

Signed-off-by: Manabu Sugimoto <Manabu.Sugimoto@sony.com>
2021-06-16 17:23:05 +09:00
snir911
fb318532b9
Merge pull request #2044 from devimc/2021-06-15/skipTestIoCopy
containerd-shim-v2: Skip TestIoCopy unit test
2021-06-16 09:59:35 +03:00
Chelsea Mafrica
6abe7caecb
Merge pull request #2039 from Amulyam24/pef-tests
ppc64le: Adding test for appendProtectionDevice
2021-06-15 16:19:05 -07:00
Julio Montes
ad06eb90db containerd-shim-v2: Skip TestIoCopy unit test
TestIoCopy unit test is failing randonly, skip it until we have a fix

fixes #2043

Signed-off-by: Julio Montes <julio.montes@intel.com>
2021-06-15 13:17:05 -05:00
Amulya Meka
ea9bb8e9ad ppc64le: Adding test for appendProtectionDevice
Fixes: #2038

Signed-off-by: Amulya Meka <amulmek1@in.ibm.com>
2021-06-15 10:23:38 +00:00
James O. D. Hunt
685d631c4c
Merge pull request #2004 from houfangdong/3849/fix-rust-version-for-tokio
agent: Update rust version for tokio
2021-06-15 11:06:37 +01:00
Fupan Li
1ab64e30aa
Merge pull request #2034 from Tim-Zhang/fix-mio-epoll-fd-leak
Upgrade mio to v0.7.13 to fix epoll_fd leak problem
2021-06-15 15:33:10 +08:00
Tim Zhang
c881899903
Merge pull request #1990 from liubin/1989/fix-log-message
osbuilder: fix log message that is not error but seems like an error
2021-06-15 15:13:21 +08:00
Tim Zhang
799cb27234 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-06-15 11:35:49 +08:00
bin
45fd58d11c osbuilder: fix log message that is not error but seems like an error
Only show checkout failed message if AGENT_VERSION is set
and the checkout is failed.

Fixes: #1989

Signed-off-by: bin <bin@hyper.sh>
2021-06-15 10:26:52 +08:00
GabyCT
2f322b8be0
Merge pull request #2032 from GabyCT/topic/fixkernelreadme
docs: Update url for breaking compatibility
2021-06-14 16:40:27 -05:00
Julio Montes
383041959d
Merge pull request #2030 from GabyCT/topic/fixsys
docs: Remove docker support with kata 2.x and sysctls
2021-06-14 16:22:46 -05:00
Gabriela Cervantes
2fb176ddee docs: Update url for breaking compatibility
This PR updates the proper url for breaking compatibility for
kata 2.x

Fixes #2031

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2021-06-14 14:45:42 -05:00
Gabriela Cervantes
601e2b65c5 docs: Remove docker support with kata 2.x and sysctls
Currently in kata 2.x, we do not have docker support, this PR removes
the docker documentation with sysctls.

Fixes #2029

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2021-06-14 14:20:14 -05:00
Julio Montes
9d585935b5
Merge pull request #2020 from GabyCT/topic/fixreadruntime
docs: Update README for runtime documentation
2021-06-14 10:37:20 -05:00
Fabiano Fidêncio
5a71786986
Merge pull request #1674 from jimcadden/stable-2.0-SEV
Support SEV
2021-06-12 16:56:51 +02:00
Fabiano Fidêncio
be31694554 virtcontainers: Fix TestQemuAmd64AppendProtectionDevice()
Since SEV support has been added, an implementation mistake was also
added to TestQemuAmd64AppendProtectionDevice.

appendProtectionDevice() will, as it name says, append the protection
device to whatever was there previously.  So, when SEV was added, we
broke the comparison done for TDX as we didn't append the expected
output for TDX with what we already had for SEV.

This should be enough to get the tests passing.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2021-06-12 08:56:15 -04:00
Fabiano Fidêncio
723c0ac4d5
Merge pull request #1832 from littlejawa/issue_1713
test: Add a unit test for ioCopy()
2021-06-12 00:34:28 +02:00
Gabriela Cervantes
240aae96dd 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-11 16:01:20 -05:00
GabyCT
66e4c77a54
Merge pull request #1993 from likebreath/0610/clh_v16.0
versions: Upgrade to cloud-hypervisor v16.0
2021-06-11 15:11:11 -05:00
Fabiano Fidêncio
e754ff37e4
Merge pull request #2015 from fidencio/2.2.0-alpha0-branch-bump
# Kata Containers 2.2.0-alpha0
2021-06-11 18:51:08 +02:00
Julio Montes
6e7b55baa9
Merge pull request #1995 from GabyCT/topic/removetravisreference
docs: Remove old travis reference
2021-06-11 09:23:47 -05:00
Fabiano Fidêncio
54832cd052 release: Kata Containers 2.2.0-alpha0
- Update CC=gcc setting for Fedora s390x
- osbuilder: Streamline s390x CMake & musl handling
- runtime: remove the call to storeSandbox at the end of createSandboxFromConfig
- virtcontainers: Add support for Secure Execution
- agent: Conform to the latest nix version (0.21.0)
- docs: Update the stable branch strategy to what was proposed in our ML
- runtime: add more traces for network
- tools/packaging: clone meson and dependencies before building QEMU
- runtime: remove covertool from cli test
- factory: Use lazy unmount
- docs: Fix Release Process document
- Add sandbox and container ID to trace spans
- agent: Fix fd leak caused by netlink
- metrics: Add virtiofsd exporter
- versions: Update kubernetes to 1.21.1
- tracing: Add basic VSOCK tracing
- agent: Upgrade tokio-vsock to fix fd leak of vsock socket
- runtime: fix some comments and logs
- runtime: Add support for PEF
- cleanup TODOs in runtime
- tracing: Make runtime span attributes more consistent
- virtiofsd: refactor qemu.go to use code in virtiofsd.go
- runtime: remove unused doc.go
- cgroup: fix the issue of set mem.limit and mem.swap
- agent: re-enable the standard SIGPIPE behavior
- virtiofsd: Fix file descriptors leak and return correct PID
- runtime: and cgroup and SandboxCgroupOnly check for check sub-command
- kernel: add ppc64le fragments
- docs: Use --ignore-preflight-errors=all flag
- agent: fix start container failed when dropping all capabilities
- agent: Remove unnecessary underscore(_) variables
- docs: Add instructions for getting QEMU source
- qemu: align before memory hotplug on arm64
- workflows: release kata 2.x snap through the stable channel
- Sandbox bindmount cleanup
- docs: Update add customer agent command
- agent: Stop relying in the unmaintained prctl crate
- how-to-use-virtio-mem-with-kata.md: Update doc to make it clear
- docs: Add document for memory hotplug on arm64
- github: Run require porting labels only at main
- kernel: add confidential guest build option
- rustjail: separated the propagation flags from mount flags
- runtime: improve sandbox cleanup logic
- docs: add note for connecting debug console for old versions
- image_build: align image size to 128M for arm64
- agent: avoid reaping the exit signal of execute_hook in the reaper
- agent: move the dependency tempfile to the dev-dependencies section
- docs: Document test repository changes when creating a stable branch
- docs: Remove horizontal ruler markers that disable spell checks
- docs/Developer-Guide: Add instructions to apply QEMU patches
- runtime: make dialing timeout configurable
- Get sandbox metrics cli
- Support TDx
- packaging/kata-cleanup: add k3s containerd volume
- osbuilder: Upgrade alpine version to 3.13.5
- Monitor cleanup
- Open CONFIG_VIRTIO_MEM in x86_64 Linux kernel
- agent: delete code which is no longer used
- cli: delete tracing code for kata-runtime binary
- docs: add per-Pod Kata configurations for `enable_pprof`
- Fix issue of virtio-mem
- Set fixed NOFILE limit value for kata-agent
- ci/install_yq.sh: install_yq: Check version before return
- runtime: use s.ctx instead ctx for checking cancellation
- runtime: fix some comments

a1247bc0 agent: Conform to the latest nix version (0.21.0)
3130e66d runtime: remove storeSandbox at the end of createSandboxFromConfig
7593ebf9 runtime: Use CC=gcc on Fedora s390x
a484d6db osbuilder: Streamline s390x CMake & musl handling
da2d9ab8 osbuilder: Remove CC=gcc for Fedora s390x
c0c05c73 virtcontainers: Add support for Secure Execution
78f21710 virtcontainers/s390x: Put consts into one block
784025bb runtime: add more traces for network
9ec9bbba tools/packaging: clone meson and dependencies before building QEMU
9158ec68 docs: Fix Release Process document
9e3349c1 agent: Fix fd leak caused by netlink
3d0e0b27 tracing: Add network model to span
8ca02072 tracing: Add sandbox and container ID to trace spans
a9a0eccf tracing: Add basic VSOCK tracing
2234b730 metrics: Add virtiofsd exporter
9bf781d7 agent: Upgrade tokio-vsock to fix fd leak of vsock socket
b68334a1 runtime: fix some comments and logs
1f5b229b runtime: remove FIXME in SandboxState about CgroupPath
fee0004a runtime: remove TODO about hot add memory in qemu.go
2e29ef9c runtime: remove TODO comment from StatusContainer
72cd8f5e virtiofsd: refactor qemu.go to use code in virtiofsd.go
0b22c48d runtime: remove unused doc.go
30f4834c cgroup: fix the issue of set mem.limit and mem.swap
0ae364c8 agent: re-enable the standard SIGPIPE behavior
05a46fed tracing: Make runtime span attributes more consistent
727bfc45 runtime: and cgroup and SandboxCgroupOnly check for check sub-command
b25ad1ab tracing: Make trace-forwarder async
45f02227 tracing: Add trace points
773deca2 virtiofsd: Fix file descriptors leak and return correct PID
37a426b4 runtime: Add support for PEF
fe670c5d docs: Use --ignore-preflight-errors=all flag
5b5047bd docs: Add instructions for getting QEMU source
3e4ebe10 agent: fix start container failed when dropping all capabilities
9a43d76d workflows: release kata 2.x snap through the stable channel
7f1030d3 sandbox-bindmount: persist mount information
089a7484 sandbox: Cleanup if failure to setup sandbox-bindmount occurs
f65acc20 docs: Update add customer agent command
20a382c1 agent: Remove unnecessary underscore(_) variables
4b88532c docs: Don't use Docker as an example of a container manager
4142e424 docs: Don't mention 1.x components as part of the stable branch strategy
a0af2bd7 docs: Use stable-2.x / 2.x.y as example in the branch strategy document
a5e1f66a docs: Maintain only one stable branch per major release
419773b8 docs: Emphasize behaviour changes may be a reason for a major bump
54a75008 docs: Refer to `main` branch in the stable branch strategy document
7dde0b5d kernel: add ppc64le fragments
84906181 kernel: skip fragments for ppc64le
9676b86b kernel: move CONFIG_RANDOMIZE_BASE
bd0cde40 factory: Use lazy unmount
f52468be agent/agent-ctl: Replace prctl crate by the capctl one
d289b1d6 agent-ctl: Perform a `cargo update`
bc36b7b4 qemu: align before memory hotplug on arm64
8aefc793 agent: Perform a `cargo update`
785be0bb how-to-use-virtio-mem-with-kata.md: Update doc to make it clear
f8a16c17 kernel: add confidential guest build option
a65f11ea docs: Add document for memory hotplug on arm64
1b607056 runtime: remove covertool from cli test
fc42dc07 github: Run require porting labels only at main
dbef2b29 versions: Update kubernetes to 1.21.1
35151f17 runtime: sandbox delete should succeed after verifying sandbox state
e5fe572f rustjail: separated the propagation flags from mount flags
ffbb4d9b docs: add note for connecting debug console for old versions
a5bb383c agent: avoid reaping the exit signal of execute_hook in the reaper
ce7a5ba2 agent: move the dependency tempfile to the dev-dependencies section
e24e9462 docs/Developer-Guide: Add instructions to apply QEMU patches
850cf8cd docs: Document test repository changes when creating a stable branch
8068a469 kata-runtime: add `metrics` command
37873061 kata-monitor: export get stats for sandbox
01b56d6c runtime: make dialing timeout configurable
e8038718 osbuilder: Upgrade alpine version to 3.13.5
3caed6f8 runtime: shim: dedup client, socket addr code
4bc006c8 runtime: Short the shim-monitor path
5fdf617e docs: Fix spell-check errors found after new text is discovered
42425456 docs: Remove horizontal ruler markers that disable spell checks
3883e4e2 kernel: configs: Open CONFIG_VIRTIO_MEM in x86_64 Linux kernel
4f61f4b4 virtcontainers: Support TDX
0affe886 virtcontainers: define confidential guest framework
539afba0 runtime: define config options to enable confidential computing
79831faf runtime: use s.ctx instead ctx for checking cancellation
f6d5fbf9 runtime: fix some comments
9381e5f3 packaging/kata-cleanup: add k3s containerd volume
7f7c3fc8 qemu.go: qemu: resizeMemory: Fix virtio-mem resize overflow issue
c9053ea3 qemu.go: qemu: setupVirtioMem: let sizeMB be multiple of 2Mib
a188577e agent: Set fixed NOFILE limit value for kata-agent
88cf3db6 runtime: implement CPUFlags function
2b0d5b25 image_build: align image size to 128M for arm64
d601ae34 agent: delete not used comments
6038da19 agent: delete rustjail/src/configs directory
84ee8aa8 agent: delete not used functions
d8896157 ci/install_yq.sh: install_yq: Check version before return
95e54e3f docs: add per-Pod Kata configurations for enable_pprof
13c23fec cli: delete tracing code for kata-runtime binary

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2021-06-11 16:10:01 +02:00
houfangdong
8825bb298f agent: Update rust version for tokio
This was fixed for tokio's version
    requirements for rust, see:
    https://github.com/tokio-rs/tokio#supported-rust-versions

    Fixes: #3849

Signed-off-by: houfangdong <houfangdong@loongson.cn>
2021-06-11 15:01:43 +08:00
Manabu Sugimoto
e544779c61 agent: Add some mount options
Add the following mount options to catch up with the runtime spec
- silent
- loud
- (no)acl
- (no)iversion
- (no)lazytime

Fixes: #1999

Signed-off-by: Manabu Sugimoto <Manabu.Sugimoto@sony.com>
2021-06-11 15:08:46 +09:00
Fabiano Fidêncio
dc4307d3cc
Merge pull request #1974 from Jakob-Naucke/fix-cc-fedora-s390x
Update CC=gcc setting for Fedora s390x
2021-06-11 00:31:51 +02:00
Fabiano Fidêncio
bd195d67d4
Merge pull request #1976 from Jakob-Naucke/streamline-s390x-osbuilder
osbuilder: Streamline s390x CMake & musl handling
2021-06-11 00:31:34 +02:00
Fabiano Fidêncio
24bbcf58d3
Merge pull request #1981 from LiangZhou-CTY/patch-1
runtime: remove the call to storeSandbox at the end of createSandboxFromConfig
2021-06-11 00:30:39 +02:00
Gabriela Cervantes
a668f310c3 docs: Remove old travis reference
This PR removes the travis reference as we currently for kata 2.0,
travis is not being supported.

Fixes #1994

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2021-06-10 17:17:17 -05:00
Fabiano Fidêncio
8239f6fc17
Merge pull request #1772 from Jakob-Naucke/sec-exec
virtcontainers: Add support for Secure Execution
2021-06-11 00:02:01 +02:00
Bo Chen
85c40001da 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>
2021-06-10 10:16:39 -07:00
Fupan Li
9d84272dd1
Merge pull request #1988 from ManaSugi/conform-to-latest-nix
agent: Conform to the latest nix version (0.21.0)
2021-06-10 17:17:03 +08:00
Samuel Ortiz
15e3d1656b
Merge pull request #1877 from fidencio/wip/update-stable-branch-strategy
docs: Update the stable branch strategy to what was proposed in our ML
2021-06-10 10:26:31 +02:00
Manabu Sugimoto
a1247bc0bb agent: Conform to the latest nix version (0.21.0)
We need to fix some agent's code to conform to the latest nix crate
to be able to use new features of the nix.

Fixes: #1987

Signed-off-by: Manabu Sugimoto <Manabu.Sugimoto@sony.com>
2021-06-10 16:58:51 +09:00
Liang Zhou
3130e66d33 runtime: remove storeSandbox at the end of createSandboxFromConfig
Remove storeSandbox() at the end of createSandboxFromConfig(),
because this callchain createSandboxFromConfig -> createContainers
has already calls storeSandbox().
This can improve the startup speed of the container,
even just for a little.

Fixes: #1980

Signed-off-by: Liang Zhou <zhoul110@chinatelecom.cn>
2021-06-10 11:56:40 +08:00
Tim Zhang
f26837a0f1
Merge pull request #1967 from liubin/fix/1956-add-more-traces-for-network
runtime: add more traces for network
2021-06-10 10:56:42 +08:00
Jakob Naucke
7593ebf947
runtime: Use CC=gcc on Fedora s390x
This was fixed for the Go agent back in
https://github.com/kata-containers/osbuilder/issues/217, but is also
required for the runtime.

Fixes: #1973

Signed-off-by: Jakob Naucke <jakob.naucke@ibm.com>
2021-06-08 16:36:24 +02:00
Fabiano Fidêncio
16a835e4a0
Merge pull request #1966 from devimc/2021-06-04/fixSnapCerts
tools/packaging: clone meson and dependencies before building QEMU
2021-06-08 10:36:53 +02:00
Jakob Naucke
a484d6db87
osbuilder: Streamline s390x CMake & musl handling
- Merge codepath in lib.sh with ppc64le -- do not install CMake
- Like ppc64le, do not install musl rather than just not using it

Fixes: #1975

Signed-off-by: Jakob Naucke <jakob.naucke@ibm.com>
2021-06-07 17:39:31 +02:00