Commit Graph

5426 Commits

Author SHA1 Message Date
Fabiano Fidêncio
218f77d7be install: Update SUSE information
Following up a conversation with Ralf Haferkamp, we can safely drop the
instructions for using Kata Containers on SLES 12 SP3 in favour of using
the official builds provided for SLE 15 SP1, and SLE 15 SP2.

Fixes: #623

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2020-09-15 17:24:24 +02:00
Fabiano Fidêncio
2a0e76a8a9 install: Update openSUSE information
Let's update the openSUSE Installation Guide to reflect the current
information on how to install kata packages provided by the distro
itself.

The official packages are present on Leap 15.2 and Tumbleweed, and can
be just installed. Leap 15.1 is slightly different, as the .repo file
has to be added before the packages can be installed.

Leap 15.0 has been removed as it already reached its EOL.

Fixes: #623

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2020-09-15 17:24:24 +02:00
Fabiano Fidêncio
691f13645b install: Update RHEL information
Although the community packages are present for RHEL, everything about
them is extremely unsupported on the Red Hat side.

Knowing this, we'd be better to simply not mentioned those and, if users
really want to try kata-containers on RHEL, they can simply follow the
CentOS installation guide.

In the future, if the Fedora packages make their way to RHEL, we can add
the information here. However, if we're recommending something
unsupported we'd be better recommending kata-deploy instead.

Fixes: #623

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2020-09-15 17:24:24 +02:00
Fabiano Fidêncio
270fc4b2d1 install: Update Fedora information
Let's update the Fedora Installation Guide to reflect the current
information on how to install kata packages provided by the distro
itself.

These are official packages and we, as Fedora members, recommend using
kata-containers on Fedora 32 and onwards, as from this version
everything works out-of-the-box. Also, Fedora 31 will reach its EOL as
soon as Fedora 33 is out, which should happen on October.

Fixes: #623

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2020-09-15 17:24:24 +02:00
Fabiano Fidêncio
492b4e906b install: Update CentOS information
Let's update the CentOS Installation Guide to reflect the current
information on how to install kata packages provided by the
Virtualiation Special Interest Group.

These are not official CentOS packages, as those are not coming from Red
Hat Enterprise Linux. These are the same packages we have on Fedora and
we have decided to keep them up-to-date and sync'ed on both Fedora and
CentOS, so people can give Kata Containers a try also on CentOS.

The nature of these packages makes me think that those are "as official
as they can be", so that's the reason I've decided to add the
instructions to the "official" table.

Together with the change in the Installation Guide, let's also update
the README and reflect the fact we **strongly recommend** using CentOS
8, with the packages provided by the Virtualization Special Interest
Group, instead of using the CentOS 7 with packages built on OBS.

Fixes: #623

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2020-09-15 17:24:24 +02:00
bin liu
15065e4472 agent: add cgroup v2 support
This PR add basic cgroup v2 support for agent.

Fixes: #146, #357

Signed-off-by: bin liu <bin@hyper.sh>
2020-09-15 10:38:55 +08:00
James O. D. Hunt
059e6426e9
Merge pull request #711 from jodh-intel/2.0-dev-actions-for-issue-backlog
action: Add issue to project and move to "In progress" on linked PR
2020-09-14 18:02:19 +01:00
James O. D. Hunt
b5e9d6060f action: Require PR porting labels
A PR now needs *two* labels to be applied before it can be merged.
One label must be a backport label from the list below and the other
a forward port label:

- backport labels:

  `needs-backport`, `no-backport-needed`, `backport`.

- forward-port labels:

  `needs-forward-port`, `no-forward-port-needed`, `forward-port`.

This is to make the maintainer think carefully before merging a PR
and hopefully maximise efficient porting.

Related: https://github.com/kata-containers/kata-containers/issues/634

Fixes: #639.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2020-09-14 15:22:56 +01:00
Bin Liu
d4a5258234
Merge pull request #713 from Kvasscn/fix-typo-in-virtiofsd_test
virtiofsd: fix typo in test code
2020-09-14 22:01:25 +08:00
zhanghj
2ce97ec680 virtiofsd: fix typo in test code
fix typo in virtiofsd_test.go

Fixes: #712

Signed-off-by: zhanghj <zhanghj.lc@inspur.com>
2020-09-14 05:35:10 -04:00
James O. D. Hunt
b081f26a7e action: Add issue to project and move to "In progress" on linked PR
Add GitHub actions to:

- Add newly-created issues to the issue backlog project.
- Move issues with a linked PR into the "In progress" column
  of the issue backlog project.

Related: https://github.com/kata-containers/kata-containers/issues/512

Fixes: #637.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2020-09-14 09:24:54 +01:00
Peng Tao
6e328c0599
Merge pull request #704 from liubin/feature/689-setup-guest-DNS
agent: setup DNS for guest
2020-09-14 09:51:45 +08:00
bin liu
6520320fc6 agent: setup DNS for guest
This PR is a porting of
https://github.com/kata-containers/agent/pull/625

Fixes: #689

Signed-off-by: bin liu <bin@hyper.sh>
2020-09-13 21:43:07 +08:00
Peng Tao
37e3f89424
Merge pull request #709 from liubin/tmp/debug-travis-sudo
ci: run agent test under root user
2020-09-12 12:47:06 +08:00
bin liu
90e0dc8809 ci: run agent test under root user
Running agent test now only support normal user,
under root user also needed.

Fixes: #708

Signed-off-by: bin liu <bin@hyper.sh>
2020-09-11 22:42:13 +08:00
Julio Montes
91dec532e5
Merge pull request #702 from YchauWang/docs-branch1
docs: update sandbox apis doc for kata 2.0-dev
2020-09-11 09:30:51 -05:00
Peng Tao
e3ea8544f4
Merge pull request #694 from lifupan/2.0-dev
rustjail: fix the issue of invalid cgroup_parent path
2020-09-11 10:28:33 +08:00
Archana Shinde
55354d5509
Merge pull request #651 from Kvasscn/fix-rust-agent-default-value-rootfs.sh
osbuilder: update usage of RUST_AGENT variable
2020-09-10 13:35:11 -07:00
fupan.lfp
c133a4561d rustjail: fix the issue of invalid cgroup_parent path
The cgroup_parent path is expected to be absolute path,
add an '/' prefix to the passed cgroup_parent path to make
sure it's an absolute path.

Fixes: #336

Signed-off-by: fupan.lfp <fupan.lfp@antfin.com>
2020-09-10 11:12:56 +08:00
Ychau Wang
20a084ae79 docs: update sandbox apis doc for kata 2.0-dev
Sync the api from the runtime codes to the documentation. Remove and add
some apis in the kata-api-design.md doc. And new table for Sandbox
Monitor APIs.

Fixes: #701

Signed-off-by: Ychau Wang <wangyongchao.bj@inspur.com>
2020-09-10 10:55:09 +08:00
Peng Tao
63138a4f28
Merge pull request #699 from liubin/fix/665-retry-when-hotplug-cpu
agent: add retry between doing CPU hotplug and make it online.
2020-09-10 10:24:42 +08:00
bin liu
d86e74674c agent: add retry between doing CPU hotplug and make it online.
Sometimes runtime will fail in onlining CPU process,
because when the runtime calls to QMP
`device_add`, QEMU doesn't allocate all vCPUs inmediatelly.

Fixes: #665

Signed-off-by: bin liu <bin@hyper.sh>
2020-09-10 07:36:18 +08:00
Julio Montes
b6ee8ae149
Merge pull request #655 from Kvasscn/update-kernel-version-to-5.4.60
kernel: update to the latest LTS kernel 5.4.60
2020-09-09 08:06:59 -05:00
Pradipta Kumar
8667df4d09
Merge pull request #679 from Amulyam24/fix-initrd-ppc64le
osbuilder: fix rootfs build on ppc64le
2020-09-09 12:32:28 +05:30
Amulya Meka
ebd3f316f2 osbuilder: fix rootfs build on ppc64le
The default toolchain used for building the
rust agent would be different for ppc64le.

Fixes: #678

Signed-off-by: Amulya Meka <amulmek1@in.ibm.com>
2020-09-09 03:09:03 +00:00
Peng Tao
7f20587433
Merge pull request #616 from amshinde/2.0-kernel-ptp
kernel: Enabling PTP clock support in kernel
2020-09-09 09:45:06 +08:00
Fabiano Fidêncio
1ab1d0e728
Merge pull request #647 from pmores/fix-unbootable-dracut-initramfs
rootfs-builder: fix unbootable dracut-based initramfs on Fedora
2020-09-08 22:51:23 +02:00
Pavel Mores
2dfb8bc549 rootfs-builder: fix unbootable dracut-based initramfs on Fedora
This is a forward port of Kata 1.x PR's
https://github.com/kata-containers/osbuilder/pull/480 and
https://github.com/kata-containers/osbuilder/pull/494 .

Fixes #646

Signed-off-by: Pavel Mores <pmores@redhat.com>
2020-09-08 20:10:38 +02:00
Julio Montes
fcfe00369b
Merge pull request #652 from devimc/2020-09-01/osbuilder/noreflink
[fwport-2.0] osbuilder/image-builder: disable reflink
2020-09-08 10:20:17 -05:00
James O. D. Hunt
1a734bbb79
Merge pull request #668 from cmaf/unit-virtcontainers-utils-compare
virtcontainers: Add unit test for utils/compare.go
2020-09-08 11:35:28 +01:00
Julio Montes
b30dc26986
Merge pull request #642 from devimc/2020-08-13/agent/anyhow
reimplement error handling: use anyhow
2020-09-07 10:13:21 -05:00
Bin Liu
2086e2e9e1
Merge pull request #677 from Kvasscn/update-yaml-link-for-prometheus-deployment
docs: update yaml file link for prometheus deployment
2020-09-07 13:02:36 +08:00
zhanghj
2019f00e2c docs: update yaml file link for prometheus deployment
Update link address of yaml file refer to kata 2.0-dev branch.

Fixes: #676

Signed-off-by: zhanghj <zhanghj.lc@inspur.com>
2020-09-06 22:37:47 -04:00
GabyCT
677c87d248
Merge pull request #627 from YchauWang/2.0-dev
docs: Update the doc for minikube installing kata
2020-09-04 17:02:34 -05:00
Chelsea Mafrica
fd3ce81518
Merge pull request #672 from c3d/200903-spelling
trivial: Fix spelling of "privilege"
2020-09-04 12:58:18 -07:00
Bo Chen
d2a89d668e
Merge pull request #569 from devimc/2020-08-25/port/noReflink
[port] image-builder: disable reflink
2020-09-04 12:50:01 -07:00
Julio Montes
16f4ff38e5
Merge pull request #674 from devimc/2020-09-03/runtime/qemuRawKernel
runtime: qemu: reduce boot time and memory footprint
2020-09-04 14:39:34 -05:00
Julio Montes
99811645d2
Merge pull request #667 from devimc/2020-09-01/packaging/snap-ubuntu20
snap for kata 2.0
2020-09-04 13:33:19 -05:00
Julio Montes
0be02a8fd3 runtime: qemu: reduce boot time and memory footprint
The linux kernel feature RANDOMIZE_BASE improved the security and at
the same time increased the memory footprint of a kata container,
this feature was enabled in kata-containers/packaging#1006.
In order to mitigate this increase in memory consumption, we can
boot container using the uncompressed kernel.

Reduce boot time by ~5%
Reduce KSM memory footprint by ~14%
Reduce noKSM memory footprint by ~27%

fixes #669

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-09-04 10:25:09 -05:00
Julio Montes
8b07bc2c80 agent: fix unit tests - remove rustjail::errors
Fix unit tests and use `anyhow::Error`.

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-09-04 08:29:12 -05:00
Julio Montes
6c96d66667 agent: update Cargo toml and lock
`rustjail::erros` was removed in a previous commit, hence some external crates
like `error_chain` are no longger required, update Cargo.toml and Cargo.lock
to reflect these changes.

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-09-04 08:29:12 -05:00
Julio Montes
46d7b9b8dc agent/rustjail: remove rustjail::errors
`anyhow` replaces `rustjail::errors`, hence it's not longer needed

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-09-04 08:28:50 -05:00
Julio Montes
fbb79739c9 agent: Use anyhow for error handling
Don't use `rustjail::errors` for error handling, since it's not
thread safe and there are better alternatives like `anyhow`.

`anyhow` attaches context to help the person troubleshooting
the error understand where things went wrong, for example:

Current error messages:

```
No such file or directory (os error 2)
```

With `anyhow`:

```
Error: Failed to read config.json
Caused by:
    No such file or directory (os error 2)
```

fixes #641

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-09-04 08:23:17 -05:00
Julio Montes
33759af548 agent: Add anyhow dependency
anyhow provides `anyhow::Error`, a trait object based error type for
easy idiomatic error handling in Rust applications

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-09-04 08:22:13 -05:00
Julio Montes
c192446a59 agent/rustjail: Use anyhow for error handling
Convert all Errors and Results to `anyhow::Error` and `anyhow::Result`
respectively

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-09-04 08:22:13 -05:00
Julio Montes
2e3e2ce114 agent/rustjail/capabilities: Use anyhow for error handling
Use `.to_string` to wrap up `caps::errors::Error`s since they are not
thread safe, otherwise `cargo build` will fail with the following error:

```
doesn't satisfy `caps::errors::Error: std::marker::Sync`
```

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-09-04 08:22:13 -05:00
Julio Montes
6a4c9b14f2 agent/rustjail/cgroups: Use anyhow for error handling
Return `anyhow::Result` from all the functions in this directory.
Add function `io_error_kind_eq` to compare an `anyhow::Error` with an
`io::Error`, this function downcast the `anyhow::Error`.

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-09-04 08:22:13 -05:00
Julio Montes
359286a87d agent/rustjail: Add anyhow dependency
anyhow provides `anyhow::Error`, a trait object based error type for
easy idiomatic error handling in Rust applications.

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-09-04 08:22:13 -05:00
Christophe de Dinechin
dd60e56f28 trivial: Fix spelling of "privilege"
I noticed the spelling mistake while reviewing another change and
doing a "grep" for "privilege" that turned up nothing.

Fixes: #671

Signed-off-by: Christophe de Dinechin <dinechin@redhat.com>
2020-09-04 11:31:09 +02:00
Christophe de Dinechin
6e54767344
Merge pull request #663 from dgibson/machinne
runtime: Fix typo in hotplugVFIODevice()
2020-09-04 09:58:34 +02:00