Commit Graph

4961 Commits

Author SHA1 Message Date
Peng Tao
6fc7d4b238
Merge pull request #457 from liubin/feature/405-add-memory-info-for-kata-env
runtime: add CPU cores and memory basic info for `kata-env` sub-command
2020-07-29 09:45:03 +08:00
Julio Montes
d5d7c22d42
Merge pull request #460 from devimc/2020-07-27/update-qemu5
update to QEMU 5
2020-07-28 10:11:04 -05:00
bin liu
fe99e7e165 runtime: add CPU cores and memory basic info for kata-env sub-command
Add host memory size(Total/Free/Avaiable) and CPU cores in host info
for `kata-runtime kata-env`.

Fixes: #405

Signed-off-by: bin liu <bin@hyper.sh>
2020-07-28 20:41:51 +08:00
Peng Tao
ad62eeffcb
Merge pull request #431 from liangxianlong/2.0-dev
rootfs-builder: Don't modify /sbin/init on the build host
2020-07-28 20:06:45 +08:00
Peng Tao
3246bdce7c
Merge pull request #445 from liubin/fix/444-remove-docs-about-shim-proxy
docs: remove shim/proxy topics and fix docs links
2020-07-28 20:06:02 +08:00
GabyCT
dbd9f0000c
Merge pull request #433 from GabyCT/topic/fixurl
docs: Update travis and go report card url
2020-07-27 14:24:25 -05:00
Julio Montes
1c5002c127
Merge pull request #447 from jongwu/clh
package: enable cloud-hypervisor for arm64
2020-07-27 11:27:04 -05:00
Gabriela Cervantes
1f8e4f67e1 docs: Update travis and go report card url
This PR fixes travis and go report carl url for the runtime README for kata
2.0

Fixes #432

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2020-07-27 10:39:42 -05:00
Julio Montes
3c415d93fe virtcontainers: 9p: shares multiple devices with only one export
Use 'remap' behaviour to deal with multiple devices being shared with
a 9p export.

Fixes the following warning:

```
9p: Multiple devices detected in same VirtFS export, which might lead to file
ID collisions and severe misbehaviours on guest!
You should either use a separate export for each device shared from host or
use virtfs option 'multidevs=remap'!
```

fixes #378

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-07-27 10:18:18 -05:00
Julio Montes
17fe0104a4 vendor: update govmm
bring fixes for the 9p filesystem

shortlog:
abca6f3 Add multidevs option to fsdev

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-07-27 10:18:14 -05:00
Julio Montes
b6e910ceb4 versions: update QEMU to 5.0.0
New features that can improve/impact in kata containers:

x86:
    VMX features can be enabled/disabled via the "-cpu" flag.
    When nested virtualization is enabled with an option like
    "-cpu Haswell,+vmx", the set of VMX features will also be constrained to
    what was available on the corresponding CPU model.
    New "microvm" machine type that has virtio-mmio instead of PCI, and no ACPI
    support (so no hotplug too). The new machine type is meant as a baseline
    for performance optimizations of QEMU, firmware and guests. While inspired
    by Firecracker it is not entirely compatible with it (for example it does
    not have Firecracker's userspace IP stack and MicroVM Metadata Service).
    Reduce memory footprint when booting uncompressed kernels.

ARM:
    We now correctly support more than 256 CPUs when using KVM
    The virt board now supports memory hotplugging, when used with a UEFI
    guest BIOS and ACPI.
    virtio-iommu is now supported with machvirt.
    The Cortex-M7 CPU is now supported.

s390:
    Using KVM now explicitly requires a host kernel version of at least 3.15
    (which includes the 'flic' KVM device). This had been broken since QEMU
    2.10 already.

ppc64le:
    pseries machine type, now consumes less host resources when running a KVM
    guest with XIVE (with a recent enough host kernel). This allows running
    more concurrent guests with KVM accelerated XIVE.
    NVDIMMs with file backend is now supported and SLOF updated to work with
    iommu_platform=on for virtio devices.

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-07-27 10:15:53 -05:00
梁显龙10206246
6c997474a3 Merge remote-tracking branch 'upstream/2.0-dev' into 2.0-dev 2020-07-27 10:59:30 +08:00
Hui Zhu
2fef265701
Merge pull request #443 from bergwolf/fix-ci
ci: checkout TRAVIS_BRANCH
2020-07-27 10:07:13 +08:00
Peng Tao
322d85c48f
Merge pull request #434 from evanfoster/add-container-creation-cleanup
sandbox: Stop and clean up containers that fail to create
2020-07-27 10:00:01 +08:00
Peng Tao
8d3f758716
Merge pull request #450 from cmaf/unit-virtcontainers-sandbox
virtcontainers: Move unit tests for types/sandbox.go
2020-07-27 09:55:10 +08:00
bin liu
db93a1631e runtime: remove mock shim
Remove mock codes for shim

Fixes #444

Signed-off-by: bin liu <bin@hyper.sh>
2020-07-25 09:08:44 +08:00
Archana Shinde
ba251df68d
Merge pull request #427 from amshinde/ease-rootfs-access
device: Ease device access for rootfs device to allow node creation
2020-07-24 17:14:50 -07:00
Evan Foster
e5910c9b88 sandbox: Stop and clean up containers that fail to create
A container that is created and added to a sandbox can still fail
the final creation steps. In this case, the container must be stopped
and have its resources cleaned up to prevent leaking sandbox mounts.

Forward port of https://github.com/kata-containers/runtime/pull/2826

Fixes #2816

Signed-off-by: Evan Foster <efoster@adobe.com>
2020-07-24 09:25:47 -06:00
Peng Tao
1283febdd6 ci: checkout TRAVIS_BRANCH
So that we use 2.0-dev branch for tests.

Fixes: kata-containers/tests#2732
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-07-24 20:06:02 +08:00
bin liu
d7f75dce83 docs: remove shim/proxy topics and fix docs links
And also change links from old documentation to docs sub-directory.

Fixes #444

Signed-off-by: bin liu <bin@hyper.sh>
2020-07-24 17:53:38 +08:00
Chelsea Mafrica
0b3cbee815 virtcontainers: Add additional unit tests for sandbox
Add tests for state change, empty string failures for Volumes and
Sockets. Change two function names to accurately reflect tests.

Signed-off-by: Chelsea Mafrica <chelsea.e.mafrica@intel.com>
2020-07-24 02:57:41 +00:00
Jianyong Wu
c0720179d2 package: enable cloud-hypervisor for arm64
Now, cloud-hypervisor is capable to work on arm64. it's time to
enable it in kata for arm64.
as cloud-hypervisor can only use virtio-fs, a new patch should be
applied to kernel for virtiofs and some config should be removed
temporarily.

Fixes: #446
Signed-off-by: Jianyong Wu <jianyong.wu@arm.com>
2020-07-24 10:07:30 +08:00
Chelsea Mafrica
07a307b4b1 virtcontainers: Remove duplicate unit tests
Remove tests from virtcontainers/sandbox_test.go which were moved to
virtcontainers/types/sandbox_test.go.

Signed-off-by: Chelsea Mafrica <chelsea.e.mafrica@intel.com>
2020-07-24 01:36:12 +00:00
Chelsea Mafrica
d914f01829 virtcontainers: Move unit tests for types/sandbox.go
Move unit tests that were in virtcontainers/sandbox_test.go relating
to Socket, Volume, and SandboxState to types/sandbox_test.go.

Change testSandboxStateTransition function to use SandboxState only
instead of Sandbox from virtcontainers/sandbox.go.

Fixes #435

Signed-off-by: Chelsea Mafrica <chelsea.e.mafrica@intel.com>
2020-07-24 01:36:00 +00:00
Archana Shinde
9377c162a1
Merge pull request #448 from amshinde/2.0-actions
Backport actions from master
2020-07-23 12:33:23 -07:00
Archana Shinde
33b1865e6e actions: Pin to a particular sha for actions
Since actions can access the github token, lets use a
particular version of sha rather than using master.

Fixes: #437

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
(cherry picked from commit 57b64f35e0)
2020-07-23 12:06:04 -07:00
Archana Shinde
8564c99eae actions: Add github actions to perform DCO check
Action performs a check to verify PR raised has commits
that are signed-off.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
(cherry picked from commit 1b157e5015)
2020-07-23 12:05:41 -07:00
Archana Shinde
c5081624c5 actions: Add action to perform WIP check for pull requests
Use github actions for performing WIP checks on PRs.
The action checks for keywords in subject line
as well labels.

Fixes: #437

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
(cherry picked from commit 0d96145c29)
2020-07-23 12:05:17 -07:00
liangxianlong
7bbb9e8122 rootfs-builder: Don't modify /sbin/init on the build host
Don't modify /sbin/init on the build host when using command `AGENT_INIT="yes" ./rootfs.sh centos` to build rootfs.

Fixes: #430

Signed-off-by: liangxianlong <liang.xianlong@zte.com.cn>
2020-07-18 14:19:06 +08:00
Archana Shinde
3d46750596 device: Ease device access for rootfs device to allow node creation
For docker in docker scenario, the nested container created
has entry "b *:* m" in the list of devices it is allowed to access
under /sys/fs/cgroup/devices/docker/{ctrid}/devices.list.

This entry was causing issues while starting a nested container
as we were denying "m" access to the rootfs block devices.
With this change we add back "m" access, the container would be
allowed to create a device node for the rootfs device but will
not have read-write access to the created device node.

This fixes the docker in docker use case while still making sure
the container is not allowed read/write access to the rootfs.
Note, this could also be fixed by simply skipping {"Type : "b"}
while creating the device cgroup with libcontainer.
But this seems to be undocumented behaviour at this point,
hence refrained from taking this approach.

Fixes #426

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2020-07-17 15:33:41 -07:00
Peng Tao
c5c3f5c31d
Merge pull request #423 from cmaf/unit-virtcontainers-bridges
virtcontainers: Add to bridges unit test
2020-07-17 20:07:08 +08:00
Chelsea Mafrica
f554cdec2c virtcontainers: Add to bridges unit test
Add function that creates new bridges to increase unit test coverage
for virtcontainers/types/bridges. Also adds test for address formats.

Fixes #422

Signed-off-by: Chelsea Mafrica <chelsea.e.mafrica@intel.com>
2020-07-16 16:34:49 +00:00
James O. D. Hunt
6263d2635b
Merge pull request #390 from Pennyzct/remove_use_vsock_option
kata 2.0: delete use_vsock option and proxy abstraction
2020-07-16 14:49:01 +01:00
Penny Zheng
1d7d944f2c fc: refactor --daemonize option
Option --daemonize is invalid to firecarcker, and only valid to
jailer.

Fixes: #389

Signed-off-by: Penny Zheng penny.zheng@arm.com
2020-07-16 05:26:28 +00:00
Penny Zheng
7f3e8959c5 console-watcher: use console watcher to monitor guest console outputs
Import new console watcher to monitor guest console outputs, and will be
only effective when we turn on enable_debug option.
Guest console outputs may include guest kernel debug info, agent debug info,
etc.

Fixes: #389

Signed-off-by: Penny Zheng penny.zheng@arm.com
2020-07-16 05:26:19 +00:00
Penny Zheng
1099a28830 kata 2.0: delete use_vsock option and proxy abstraction
With kata containers moving to 2.0, (hybrid-)vsock will be the only
way to directly communicate between host and agent.
And kata-proxy as additional component to handle the multiplexing on
serial port is also no longer needed.
Cleaning up related unit tests, and also add another mock socket type
`MockHybridVSock` to deal with ttrpc-based hybrid-vsock mock server.

Fixes: #389

Signed-off-by: Penny Zheng penny.zheng@arm.com
2020-07-16 04:20:02 +00:00
Xu Wang
c052e46c66
Merge pull request #416 from bergwolf/cleanup
runtime: consolidate network types definition
2020-07-15 22:46:21 +08:00
Yang Bo
dacb2fded1
Merge pull request #414 from lifupan/2.0-fix
cgroup: fix the issue of crashed when meet unsupported cgroup
2020-07-15 22:22:06 +08:00
fupan.lfp
73bf9329ca cgroup: fix the issue of crashed when meet unsupported cgroup
Fix the issue of applying/set to unsupported cgroups.

Fixes: #408

Signed-off-by: fupan.lfp <fupan.lfp@antfin.com>
2020-07-15 20:54:00 +08:00
James O. D. Hunt
102068f891
Merge pull request #417 from Nordix/annotations-containerd-version-2.x
docs: Clarifying minimum version of containerd for annotations
2020-07-15 13:35:04 +01:00
Georg Kunz
ab7afae6d3 docs: Clarifying minimum version of containerd for annotations
Using pod annotations requires a minimum version of v1.3.0 of containerd
to pass annotations down to kata. This is already somewhat mentioned in
the corresponding how-to, however, it can be mis-read as the minimum
version of kata-containers instead of containerd. This can cause
extended and futile troubleshooting on older distributions such as
Ubuntu 16.04 which ship a version of 1.2.x of containerd. This patch
attempts to clarify this.

Fixes: #690

Signed-off-by: Georg Kunz <georg.kunz@est.tech>
2020-07-15 12:53:02 +02:00
Peng Tao
5b15e9ef4f runtime: consolidate types definition
We do not need the vc types translation for network data structures.
Just use the protocol buffer definitions.

Fixes: #415
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-07-15 17:48:31 +08:00
James O. D. Hunt
d88f8910ab
Merge pull request #402 from sameo/2.0-dev
runtime: virtcontainers: vhost-user-blk/scsi are block device nodes
2020-07-15 09:25:26 +01:00
Hui Zhu
b0e5e12a08
Merge pull request #407 from lifupan/2.0-dev
add rust agent sandbox shared pid namespace support
2020-07-15 09:51:39 +08:00
Peng Tao
fbc6c52625
Merge pull request #406 from liubin/docs/add-link-to-setup-cri-pod-annotations
docs: add link to CRI Configuration for pods
2020-07-13 21:46:49 +08:00
Peng Tao
872ee35ca6
Merge pull request #404 from liubin/bugfix/403-add-monitor_address-to-gitignore
runtime: add monitor_address to .gitignore
2020-07-13 21:46:31 +08:00
fupan.lfp
c6e4d092d6 agent: sandbox shared pid namespace support
Add support shareProcessNamespace.
BTW, this commit only support shared pid namespace by
sharing the infrastructure pause container's pid namespace
with other containers, instead of creating a new pid
namespace different from pause container.

Fixes: #342

Signed-off-by: fupan.lfp <fupan.lfp@antfin.com>
2020-07-13 19:09:35 +08:00
fupan.lfp
afcf269c9b rustjail: fix the issue of missing join pid namespace
It shouldn't skip joining an container existed
pid namespace.

Signed-off-by: fupan.lfp <fupan.lfp@antfin.com>
2020-07-13 18:44:49 +08:00
bin liu
f3da6900c2 docs: add link to CRI Configuration for pods
To pass annotations from CRI to Kata containers, user must configure containerd if containerd is used.

Signed-off-by: bin liu <bin@hyper.sh>
2020-07-13 18:37:56 +08:00
bin liu
4291eb17fb runtime: add monitor_address to .gitignore
monitor_address may be committed to repo by accident

Fixes: #403

Signed-off-by: bin liu <bin@hyper.sh>
2020-07-13 16:24:21 +08:00