Commit Graph

5116 Commits

Author SHA1 Message Date
Jianyong Wu
b61c9ca25a Makefile: add CLHCMD in arm64-options.mk
As cloud-hypervisor has enabled for arm64, add CLHCMD in
arm64-options.mk

Fixes: #468
Signed-off-by: Jianyong Wu <jianyong.wu@arm.com>
2020-07-29 16:38:19 +08:00
Hui Zhu
aeb4cfe7e7
Merge pull request #462 from bergwolf/releasing-2.0.0-alpha3
release: Kata Containers 2.0.0-alpha3
2020-07-29 15:09:53 +08:00
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
7a825fb55a release: Kata Containers 2.0.0-alpha3
The new alpha release brings in following changes:

1f8e4f67 docs: Update travis and go report card url
db93a163 runtime: remove mock shim
e5910c9b sandbox: Stop and clean up containers that fail to create
1283febd ci: checkout TRAVIS_BRANCH
d7f75dce docs: remove shim/proxy topics and fix docs links
0b3cbee8 virtcontainers: Add additional unit tests for sandbox
c0720179 package: enable cloud-hypervisor for arm64
07a307b4 virtcontainers: Remove duplicate unit tests
d914f018 virtcontainers: Move unit tests for types/sandbox.go
33b1865e actions: Pin to a particular sha for actions
8564c99e actions: Add github actions to perform DCO check
c5081624 actions: Add action to perform WIP check for pull requests
7bbb9e81 rootfs-builder: Don't modify /sbin/init on the build host
3d467505 device: Ease device access for rootfs device to allow node creation
f554cdec virtcontainers: Add to bridges unit test
1d7d944f fc: refactor --daemonize option
7f3e8959 console-watcher: use console watcher to monitor guest console outputs
1099a288 kata 2.0: delete use_vsock option and proxy abstraction
73bf9329 cgroup: fix the issue of crashed when meet unsupported cgroup
ab7afae6 docs: Clarifying minimum version of containerd for annotations
5b15e9ef runtime: consolidate types definition
c6e4d092 agent: sandbox shared pid namespace support
afcf269c rustjail: fix the issue of missing join pid namespace
f3da6900 docs: add link to CRI Configuration for pods
4291eb17 runtime: add monitor_address to .gitignore
1c56abb7 runtime: virtcontainers: vhost-user-blk/scsi are block device nodes
bbf85170 runtime: add pprof interface for shim
0790ca49 runtime: add pod overhead metrics
ae83c96d Modifie to proper CPU architecture name for ppc64le.
f404f4d9 Modified Makefile to pick up correct architecture name for ppc64le.
cdbba6ac agent: Make LIBC configurable
2afbfcab virtcontainers: print a warning when the device to append is not supported
919fc4cd virtcontainer/cgroup: create cgroup manager after creating the network
a134c2e0 virtcontainers/network: Change signature of Enpoint Attach method
9a9721c2 drivers: change BindDevicetoVFIO signature
66219d16 device: support vfio cold plug
3eb694c5 device: add ColdPlug flag
3cf8b470 runtime: delete Stateful from SandboxConfig
069505e2 runtime: delete unused sub-commands.
a0a96db2 runtime: handle unimplemented RPC call by NotFound status code
bd8f03a5 runtime: remove agent abstraction
41c04648 runtime: fix wrong issue links
83b23665 config: there is no need to check vhost-vosck for FC
d96b3063 docs: add metrics design documents for Kata 2.0
b28b850a versions: Revert "versions: update QEMU to 5.0.0"
5ff53037 tools: fix branch and runime repo
24ea3f01 virtcontainers: GetOOMEvent should have no timeout
1b75daa0 runtime: add new command to collect metrics from Kata containers
5200ac06 runtime: remove old store
186fed2a runtime: add implementation of GetMetrics
0c4c69de agent: add GetMetrics implementation
9fd3e48c agent: add new pb message GetMetrics
9c501f3d agent: device: Allow "VmPath" to be used when adding block devices
15af20b6 versions: update QEMU to 5.0.0
a06d01e1 versions: specify rust version
7ae4376b clh: vsock: Use the updated VsockConfig
d8a333b9 versions: Move to cloud-hypervisor v0.8.0
9177d3a3 virtiofsd: Use cache=auto
d66f2192 cli: Fix kata-env output on Power
94fdec4e clh: Allow add virtiofs args and cache options from config
653df674 kata_agent: Add unit tests
6da49a04 clh: Clear the "PCIAddr" field while blk device hotplug
2d6c0731 kata_agent: Pass "VirtPath" with "PCIAddr" of blk devices to agent
56ae2099 kata_agent: Allow to use "VirtPath" as volume source for blk devices
bdd386ba qemu: Fix rtc parameter is not set to qemu
51a6d60a qemu: Remove PMU feature for Power (ppc64le) platform
3ece4130 runtime: clean up shim abstraction
3a17e7aa qemu: Remove pmu limitation in nested virtualization of amd/ppc64le
06571f03 build: Add "pmu=off" to default cpu_features option
115dfa19 annotations: add cpu_features
fa9d619e qemu: add cpu_features option
520295b9 network: Detect and add static ARP entries
117ce4ac clh: remove slow boot debug flags from kernel cmdline
70137962 clh: Remove vsock log port in kernel cmdline
fd5d1394 clh: Improve hypervisor logging
21f83348 clh: Set 'virtio-blk' as the default block device driver
8b5eed70 clh: Enable disk block device hotplug support
883af9c7 agent: set hostname when running as init
899b75f2 agent: fix the issue of missing found right shell
2a8650ba agent-ctl: add Cargo.lock
a8430b37 gitignore: ignore more files
be9ca0d5 qemu: Don't leak file descriptors in case of error
60606647 virtiofsd: Improve logging
7e250f29 shim: exit out of oom polling if unimplemented
9f8d1baa virtcontainers: tests fix, nit fix
d3b3e8be virtcontainers: x86: Support microvm machine type
19833936 virtcontainers: add support for getOOMEvent agent endpoint to sandbox
7c205be2 virtcontainers: add support for getOOMEvent agent endpoint to sandbox
380f07ec proto: update agent protocol
dbc1c30d versions: Remove golangci-lint and gometalinter entries
6e7dd435 qemu: arm64: Set defaultGICVersion to 3 to limit the max vCPU number
93d1f7b4 versions: Misc changes to descriptions
17b3021b qemu: arm64: Don't detect gic version by /proc/interrupts
4cda90ab dax: enable dax on arm64
7a440254 Makefile: add trace-forwarder/agent-ctl missing targets
61e011e8 vc: Version support check is ineffective in createSandbox
ebfbca03 osbuilder: use newest golang
0fd1eb59 Makefile: add default rule
3f8d4b68 trace-forwarder: add Cargo.lock
b68d4e45 shimv2: Removing function as no longer used
f570a2cd shimv2 : Remove workaround for sharedPidNs
b2cc403e build: Improve top-level Makefile
f2a19966 agent: Rename check rule to test
ea1d799f qemu: Only one element of qemuPaths map is relevant
5dffffd4 qemu: Remove useless table from qemuArchBase
97a02131 qemu: Detect and fail a bad machine type earlier
d6e7a58a qemu: Clarify test with bad machine type

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-07-28 20:11:47 +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
Chelsea Mafrica
e1a79e6945 virtcontainers: Add function to capabilities test
Add function that tests multiqueue functions in types/capabilities.go.

Fixes #428

Signed-off-by: Chelsea Mafrica <chelsea.e.mafrica@intel.com>
2020-07-27 16:15:50 +00:00
Chelsea Mafrica
d1d5c69b64 virtcontainers: Expand unit test coverage for asset
Add additional test cases that cover more asset types and functions to
increase unit test coverage.

Fixes #424

Signed-off-by: Chelsea Mafrica <chelsea.e.mafrica@intel.com>
2020-07-27 16:14:41 +00: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