Commit Graph

5966 Commits

Author SHA1 Message Date
Tim Zhang
fdc33fb7bf agent/protocols: Generate proto files programmatically
Build proto with build.rs

Fixes: #1019

Signed-off-by: Tim Zhang <tim@hyper.sh>
2020-10-22 16:12:15 +08:00
Peng Tao
710a4f3b76
Merge pull request #1007 from devimc/2020-10-20/ghactions/snap-release
snap: add GH actions jobs to release the snap package
2020-10-22 11:52:21 +08:00
bin liu
f1c3bf6b58 runtime: let kata-collect-data.sh collect kata-monitor info
Collect kata-monitor version in kata-collect-data.sh

Fixes: #1004

Signed-off-by: bin liu <bin@hyper.sh>
2020-10-22 10:32:55 +08:00
bin liu
993a8da3aa kata-monitor: add version subcommand
This add a subcommand/options for `kata-monitor` command.

Fixes: #1004

Signed-off-by: bin liu <bin@hyper.sh>
2020-10-22 10:32:47 +08:00
Fupan Li
074b5332aa
Merge pull request #977 from liubin/fix/951-clear-clippy-warnings
agent: clear clippy warnings
2020-10-22 09:36:45 +08:00
Christophe de Dinechin
4ee78120e6 runtime: Restore QEMUVIRTIOFSPATH variable in Makefile
Due to a bad edit / fixup in commit be6ee2550d, the variable
QEMUVIRTIOFSPATH was incorrectly removed from the makefile.

This problem was found by the 1.x CI checks, see
https://github.com/kata-containers/runtime/pull/3005#issuecomment-712887125

Fixes: #1017

Signed-off-by: Christophe de Dinechin <dinechin@redhat.com>
2020-10-21 14:35:37 +02:00
bin liu
df4ce9fab7 ci: add cargo clippy for agent
To run `cargo clippy`, this commit includes changes:

- add a new Makefile target to run `cargo clippy`
- move `make`/`make check` to last step to let a fast retrun if `fmt`/`clippy` failed

Fixes: #951

Signed-off-by: bin liu <bin@hyper.sh>
2020-10-21 15:14:17 +08:00
bin liu
2e13878880 agent: clear match_like_matches_macro/vec_resize_to_zero warnings
This commit fix these warnings for Rust v1.47.0:

- match_like_matches_macro
- vec_resize_to_zero

Signed-off-by: bin liu <bin@hyper.sh>
2020-10-21 15:13:25 +08:00
bin liu
227edfdc9f agent: clear module_inception/type_complexity warnings
To clear these two warnings, this commit did changes:

- add `#![allow(clippy::module_inception)]` to target files
- use type alias for tuple of `(MessageHeader, Vec<u8>)`

Signed-off-by: bin liu <bin@hyper.sh>
2020-10-21 15:03:16 +08:00
bin liu
698d25b7ee agent: clear redundant_field_names clippy warning
add `#![allow(clippy::redundant_field_names)]` can skip check
`protocols` package, and fix redundant_field_names in other
packages.

Signed-off-by: bin liu <bin@hyper.sh>
2020-10-21 15:03:16 +08:00
bin liu
4dd9bd7aba agent: clear clippy len_zero warnings
Use `.is_empty()` instead of `.len() == 0`, `.len() >0`
and `.len() != 0`

Signed-off-by: bin liu <bin@hyper.sh>
2020-10-21 15:03:16 +08:00
bin liu
bf7dec5c4f agent: clear clippy warnings
This commit clears clippy warings for agent package.

Signed-off-by: bin liu <bin@hyper.sh>
2020-10-21 15:03:16 +08:00
bin liu
56f867ee74 rustjail: clear clippy warnings
This commit clears clippy warings for rustjail package.

Signed-off-by: bin liu <bin@hyper.sh>
2020-10-21 14:54:51 +08:00
bin liu
16757ad490 oci: clear clippy warnings
This commit clears clippy warings for oci package.

Signed-off-by: bin liu <bin@hyper.sh>
2020-10-21 14:54:51 +08:00
bin liu
f32f49bdb7 logging: clear clippy warnings
This commit contains two changes:

- clear clippy warnigns
- add pkg/logging/Cargo.lock to .gitignore

Signed-off-by: bin liu <bin@hyper.sh>
2020-10-21 14:54:51 +08:00
Fupan Li
8c3228c286
Merge pull request #976 from Tim-Zhang/simplify-ttrpc-error
agent: simplify ttrpc error construction
2020-10-21 10:31:40 +08:00
Julio Montes
5b079a3ba7 snap: add GH actions jobs to release the snap package
Use Github actions to build and release the snap package automatically
when a new tag is pushed.

fixes #1006

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-10-20 14:34:59 -05:00
Peng Tao
d80e479ca2
Merge pull request #994 from c3d/bug/993-RUNTIME_NAME
Replace @RUNTIME_NAME@ with the target in generated files
2020-10-20 17:40:45 +08:00
James O. D. Hunt
2738b18b38 runtime: Fix firecracker config
The build was setting a `FCVALIDPATHS` variable for firecracker, but
that was never being used. Conversely, the firecracker configuration
template was expecting a `FCVALIDHYPERVISORPATHS`, but that variable was
never being set.

Resolve by only setting the `FCVALIDHYPERVISORPATHS` variable to ensure
the generated firecracker config is valid once again.

Fixes: #1001.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2020-10-20 09:25:31 +01:00
James O. D. Hunt
e5d4259ab4 runtime: Simplify make variables for clh
Simplify definition of the `CLHVALIDHYPERVISORPATHS` build variable to
use the already defined `CLHPATH`.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2020-10-20 09:14:09 +01:00
Jianyong Wu
9eab301526 arm64: correct bridge type for QEMUVIRT
port forward PR https://github.com/kata-containers/runtime/pull/3017

Fixes: #3016
Signed-off-by: Jianyong Wu <jianyong.wu@arm.com>
2020-10-20 14:09:03 +08:00
Archana Shinde
b25645d7ae
Merge pull request #997 from amshinde/2.0-update-doc
2.0 update doc for hypervisor related information
2020-10-19 16:26:33 -07:00
Archana Shinde
b88aac049d docs: Update how-to Readme with hypervisor information.
While we have setup guides for firecracker and ACRN, as these
need additional configuration, it may confuse users looking
at this guide to find mentions of just these 2 hypervisors.
Call out all the hypervisors supported with Kata here.

Fixes #996

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2020-10-19 14:03:57 -07:00
Archana Shinde
d64641174e docs: Update Readme to remove hypervisor information
The repo https://github.com/kata-containers/qemu has been
archived. We should remove this, as this is not the only
hypervisor we support now.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2020-10-19 14:03:57 -07:00
Archana Shinde
b4f9fb513e docs: Remove docs for nemu
This hypervisor is no longer supported with Kata.
Remove related docs.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2020-10-19 13:35:33 -07:00
Christophe de Dinechin
96a4ed7d70 Makefile: Replace @RUNTIME_NAME@ with the target in generated files
In commit 966bd57 for PR #902, the makefile was changed to automate
the replacement of user variables. However, one variable was treated
specially in the original `sed` replacements, namely `RUNTIME_NAME`
which was replaced by `$(TARGET)`.

This commit adds the `RUNTIME_NAME` variable to the makefile in order
to ensure that the replacement works correctly.

Fixes: #993

Signed-off-by: Christophe de Dinechin <dinechin@redhat.com>
2020-10-19 18:13:49 +02:00
Julio Montes
f162e7e960
Merge pull request #948 from justin-he/max_ports
virtcontainers: Append max_ports to virtio-serial device
2020-10-19 08:55:06 -05:00
Tim Zhang
7159fc2eda agent: simplify ttrpc error construction
Fixes: #975

Signed-off-by: Tim Zhang <tim@hyper.sh>
2020-10-19 13:50:30 +08:00
Bin Liu
ed711b5ab1
Merge pull request #983 from bergwolf/snap
snap: install libseccomp-dev
2020-10-17 20:58:27 +08:00
Peng Tao
0f8949868c snap: install libseccomp-dev
To build qemu with virtio-fs support.

Fixes: #982
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-10-17 17:44:56 +08:00
Xu Wang
80cfd01130
Merge pull request #936 from bergwolf/default-virtiofs
runtime: set virtio-fs as default fs sharing method
2020-10-17 17:28:30 +08:00
Peng Tao
9a351509d2 package: drop qemu-virtiofs shim
We have enabled qemu-virtiofs by default.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-10-17 11:42:56 +08:00
Peng Tao
5f47f224ff
Merge pull request #945 from fidencio/wip/virtiofs-performance-improvements-backport-and-default-settings
VirtioFS: backports & default settings to improve performance
2020-10-17 11:13:22 +08:00
Peng Tao
6ed669a17b packaging: install virtiofsd for normal qemu build as well
For experimental-virtiofs, we use it to test virtiofs with DAX. Let's
rename its virtiofsd to virtiofsd-dax.

Depends-on: github.com/kata-containers/tests#2951
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-10-17 10:58:27 +08:00
Peng Tao
e5262b1c29
Merge pull request #970 from jodh-intel/2.0-dev-agent-ctl-add-missing-apis
tools: Make agent-ctl support more APIs
2020-10-17 10:12:40 +08:00
Jia He
da79b4be67 virtcontainers: Append max_ports to virtio-serial device
Allow API consumers to change the maximum number of ports in the
virtio-serial devices, setting a lower number of ports can improve the
boot time and reduce the attack surface.

Before this patch on arm64:
[    0.028664] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    0.055031] printk: console [hvc0] enabled

After this patch on arm64:
[    0.028484] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    0.031370] printk: console [hvc0] enabled

Fixes: #2676
Signed-off-by: Jia He <justin.he@arm.com>
2020-10-16 23:40:54 +08:00
Peng Tao
bcf4853062 runtime: enable virtiofs by default
We've been shipping it for a long time. It's time to make it default
replacing the old obsolet 9pfs.

Fixes: #935
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-10-16 15:58:35 +08:00
Peng Tao
0d5d69e8cd
Merge pull request #902 from c3d/bug-v2/launchpad-1878234-access
Validate runtime annotations
2020-10-16 15:47:45 +08:00
Peng Tao
e0da3af40b
Merge pull request #974 from egernst/kernel-bump
kernel: update to 5.4.71
2020-10-16 15:41:58 +08:00
James O. D. Hunt
e2221d34bf tools: Improve agent-ctl README
Add a summary to help understand how to use the `agent-ctl` tool.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2020-10-16 07:43:41 +01:00
Peng Tao
6f46be2f2e
Merge pull request #962 from egernst/config-update
config: make virtio-fs part of standard kernel
2020-10-16 10:06:02 +08:00
Fupan Li
cacb27fe4b
Merge pull request #942 from Tim-Zhang/optimize-error-handling
agent: Optimize error handling
2020-10-16 09:15:22 +08:00
Eric Ernst
2d1f2c7b95 kernel: update to 5.4.71
vsock fix was backported to 5.4 stable, so we can drop this patch.

Fixes: #973

Signed-off-by: Eric Ernst <eric.g.ernst@gmail.com>
2020-10-15 16:21:10 -07:00
Salvador Fuentes
18553459d1
Merge pull request #961 from chavafg/topic/update-k8s-1.18
versions: Update Kubernetes, containerd, cri-o and cri-tools
2020-10-15 16:54:21 -05:00
Eric Ernst
d3c9862059 config: make virtio-fs part of standard kernel
Basic virtio-fs support has made it upstream in the Linux kernel, as
well as in QEMU and Cloud Hypervisor. Let's go ahead and add it to the
standard configuration.

Since the device driver / DAX handling is still in progress for
upstream, we will want to still build a seperate experimental kernel for
those who are comfortable trading off bleeding edge stability/kernel
updates for improved FIO numbers.

Fixes: #963

Signed-off-by: Eric Ernst <eric.g.ernst@gmail.com>
2020-10-15 12:21:41 -07:00
James O. D. Hunt
edf02af1d4 tools: Make agent-ctl support more APIs
Added new `agent-ctl` commands to allow the following agent API calls to
be made:

- `AddARPNeighborsRequest`
- `CloseStdinRequest`
- `CopyFileRequest`
- `GetMetricsRequest`
- `GetOOMEventRequest`
- `MemHotplugByProbeRequest`
- `OnlineCPUMemRequest`
- `ReadStreamRequest`
- `ReseedRandomDevRequest`
- `SetGuestDateTimeRequest`
- `TtyWinResizeRequest`
- `UpdateContainerRequest`
- `WriteStreamRequest`

Fixes: #969.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2020-10-15 17:33:25 +01:00
James O. D. Hunt
5620180302 tools: Remove commented out code in agent-ctl
Remove a few lines of commented out code.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2020-10-15 17:33:00 +01:00
James O. D. Hunt
9bac4ee651 tools: Log request in agent-ctl tool if debug enabled
Display the API request before making the call so users can see what is
sent to the agent.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2020-10-15 17:32:23 +01:00
James O. D. Hunt
68821f0814 tools: Rename agent-ctl command to GetGuestDetails
Rename the `GuestDetails` command to `GetGuestDetails` to match the
actual agent API name.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2020-10-15 17:32:20 +01:00
James O. D. Hunt
8553f06298 tools: Fix comment in agent-ctl
Correct a comment in the agent control tool.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2020-10-15 16:54:34 +01:00