Commit Graph

6491 Commits

Author SHA1 Message Date
Eric Ernst
3f0f1ceba0 docs: inotify: add initial documentation
We're introducing a workaround for enabling users to utilize inotify on
mounts that are backed by virtiofs. Let's add some documentation on how
this work.

Signed-off-by: Eric Ernst <eric_ernst@apple.com>
2021-06-24 10:07:06 -07:00
Maksym Pavlenko
6a93e5d593 agent: Initial watchable-bind implementation
Add support for watchable-bind storage driver. When watchable-bind storage
is present, the agent will create a watchable path in a tmpfs, and poll the
watchable-bind source to keep this new mount-point up to date.

This poll will allow the agent to present the mount-point to the
container, allowing for inotify usage by the container workload.

If a mount becomes too large, either in file count or in overall size,
we want to stop treating it as watchable, and instead just treat as a
bindmount. This'll help avoid DoS by growing tmpfs too large, as well
as limiting time spent scanning files. If a watchable-bind grows beyond
8 files (arbitrary sane number for certs/secrets) or 1MB (limit on ConfigMap size),
we treat it as a normal bind.

Fixes: #1879

Signed-off-by: Eric Ernst <eric_ernst@apple.com>
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
Signed-off-by: Samuel Ortiz <samuel.e.ortiz@protonmail.com>

agent: watcher: SandboxStorages check loop cleanup
2021-06-24 10:07:06 -07:00
Eric Ernst
57c0cee0a5 runtime: Cleanup mountSharedDirMounts, shareFile parameters
There's no reason to pass the paths; they can be
determined when they are actually used.

Let's make the return values more comparable to the other mount handling
functions (we'll add storage object in future commit), and pass the mount maps as
function parameters.

...No functional changes here...

Signed-off-by: Eric Ernst <eric_ernst@apple.com>
2021-06-24 10:07:06 -07:00
Chelsea Mafrica
ac0bd57748
Merge pull request #2003 from cmaf/fix-span-runHooks
tracing: Make runHooks() span creation return context
2021-06-24 07:50:42 -07:00
Samuel Ortiz
9ab6e07330
Merge pull request #2107 from Jakob-Naucke/protvirt-kernel
kernel: Add Secure Execution guest
2021-06-24 15:29:15 +02:00
Jakob Naucke
3b356be87c
Merge pull request #2068 from Jakob-Naucke/podman-qemu
packaging: Support Podman in QEMU build
2021-06-24 15:16:30 +02:00
Fabiano Fidêncio
bb4a256a30
Merge pull request #2104 from eadamsintel/update-qat-version
Update qat version
2021-06-24 11:41:14 +02:00
Jakob Naucke
772c117d4e
kernel: Add Secure Execution guest
Add `CONFIG_PROTECTED_VIRTUALIZATION_GUEST=y` to s390's guest kernel
config, which enables running with a secure image (as generated by
s390-tools' `genprotimg`).

Fixes: #2106
Signed-off-by: Jakob Naucke <jakob.naucke@ibm.com>
2021-06-24 11:34:28 +02:00
Jakob Naucke
f35ba94d30
packaging: Support Podman in QEMU build
Use Podman instead of Docker when $USE_PODMAN is set. This enables
running with Podman, e.g. to import images for CRI-O.

Fixes: #2067

Signed-off-by: Jakob Naucke <jakob.naucke@ibm.com>
2021-06-24 11:08:47 +02:00
Fabiano Fidêncio
5a22e0e3b1
Merge pull request #2093 from Jakob-Naucke/doc-s390x-gnu
docs: Set LIBC=gnu for s390x too
2021-06-24 08:08:48 +02:00
Eric Adams
ecd13ec43d docs: Update QAT docs with newer driver version
This updates the QAT docs to the latest driver version.

Fixes: #2103

Signed-off-by: Eric Adams <eric.adams@intel.com>
2021-06-23 23:51:20 +00:00
Eric Adams
a822cdf64d osbuilder: Update QAT driver version
This updates the QAT driver version to the latest version.

Fixes: #2103

Signed-off-by: Eric Adams <eric.adams@intel.com>
2021-06-23 23:49:19 +00:00
Fabiano Fidêncio
f5d9d89b73
Merge pull request #2089 from lifupan/fix_wait
shimv2: fix the issue of leaking wait goroutines
2021-06-23 23:06:11 +02:00
Fabiano Fidêncio
c47a597568
Merge pull request #2097 from littlejawa/issue_crio_ctr_6_main
runtime: report finish time in containers stats
2021-06-23 22:53:12 +02:00
GabyCT
a1d6c3c551
Merge pull request #2077 from davidhay1969/debug_doc_change
docs: Fix typos in Developer Guide
2021-06-23 14:11:48 -05:00
GabyCT
d7ce78cf6a
Merge pull request #2095 from GabyCT/topic/fixDocuRe
docs: Update urls for Documentation Requirements document
2021-06-23 11:11:21 -05:00
Julien Ropé
6a1a051c65 runtime: report finish time in containers stats
Make sure we report the exit time for the container when we answer a "Status" request.

Fixes: #2096

Signed-off-by: Julien Ropé <jrope@redhat.com>
2021-06-23 17:36:47 +02:00
Jakob Naucke
fe0085ca55
docs: Set LIBC=gnu for s390x too
The Developer Guide instructs to install the agent from
`${ARCH}-unknown-linux-${LIBC}`, where `$LIBC` is set to `gnu` for
ppc64le (because Rust has no musl target there). The same is true for
s390x. Also set this for s390x.

Fixes: #2092

Signed-off-by: Jakob Naucke <jakob.naucke@ibm.com>
2021-06-23 17:25:33 +02:00
Gabriela Cervantes
08984b6e31 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 15:16:13 +00:00
Fabiano Fidêncio
951bb6a78f
Merge pull request #2086 from liubin/fix/2085-change-machinetype-to-q35
runtime: update default machine type to q35
2021-06-23 14:26:40 +02:00
fupan.lfp
b3623a2c40 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-06-23 19:29:26 +08:00
Jakob Naucke
2a1b6d376a
Merge pull request #2080 from focus-zhaos/initrd-doc
docs: fix brackets usage error for developer guide
2021-06-23 13:13:43 +02:00
bin
2322f935c1 runtime: update default machine type to q35
The machine type of pc is deleted, generated configuration
should update too.

Fixes: #2085

Signed-off-by: bin <bin@hyper.sh>
2021-06-23 17:08:44 +08:00
focus-zhaos
11f9a914b9 docs: fix brackets usage error for developer guide
Fixed 3 errors which misused the bracket to substitute parameter for initrd-img creation at the developer guide.

Fixes: #2079

Signed-off-by: focus-zhaos <zhaos@nbjl.nankai.edu.cn>
2021-06-23 17:01:57 +08:00
Dave Hay
1316fa5300 docs: Fix typos in Developer Guide
- Adding missing `$` symbols to 3 references to `sandbox_id` variable
- Adding missing `'` symbol to QEMU-related `socat` command

Fixes #2075

Signed-off-by: Dave Hay <david_hay@uk.ibm.com>
2021-06-23 08:46:43 +01:00
David Gibson
c0cc6d5978
Merge pull request #1954 from marcel-apf/remove-pc
Remove the pc machine
2021-06-23 12:00:05 +10:00
Julio Montes
b9e611e363
Merge pull request #2066 from devimc/2021-06-17/fixTeardownPmem
runtime: do not hot-remove PMEM devices
2021-06-22 09:06:59 -05:00
Marcel Apfelbaum
ac6b9c53d2 runtime: Hot-plug virtio-mem device on PCI bridge
Currently the virtio-mem device is hotplugged on the root bus.
This doesn't work for PCIe machines like q35.

Hotplug the virtio-mem device into the pci bridge instead.

Fixes #1953
Signed-off-by: Marcel Apfelbaum <marcel@redhat.com>
2021-06-22 12:34:48 +03:00
Marcel Apfelbaum
789a59549e virtcontainers: Remove the pc machine
Keeping around two different x86 machines has no added value
and require more tests and maintenance. Prefer the q35 machine
since it has more features and drop the pc machine.

Fixes #1953
Depends-on: github.com/kata-containers/tests#3586
Signed-off-by: Marcel Apfelbaum <marcel@redhat.com>
2021-06-22 11:54:07 +03:00
GabyCT
757ddf7b83
Merge pull request #2073 from GabyCT/topic/updateminikube
docs: Update kata-deploy urls for installation document
2021-06-21 14:13:28 -05:00
GabyCT
8bb9192e83
Merge pull request #2070 from GabyCT/topic/updateinstallurl
docs: Update url for installation guides
2021-06-21 11:37:33 -05:00
Gabriela Cervantes
bd20701f35 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-18 18:48:56 +00:00
Gabriela Cervantes
a9aa36cebc 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-18 16:48:07 +00:00
Julio Montes
ecdd137c6f 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-06-18 09:02:03 -05:00
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