Commit Graph

6199 Commits

Author SHA1 Message Date
James O. D. Hunt
de9487744f
Merge pull request #1253 from snir911/fix-poststop
shimv2: log a warning and continue on post-stop hook failure
2021-02-01 14:44:39 +00:00
Jing Wang
9f7a7a4f86 osbuilder: Enforcing LIBC=gnu to rootfs build for ppc64le
To enforce LIBC=gnu to rootfs.sh for ppc64le, instead of error and exit if not set.

Fixes: #1339
Signed-off-by: Jing Wang <jing.wang4@ibm.com>
2021-01-29 20:22:31 +00:00
Fabiano Fidêncio
7e996daf12
Merge pull request #1338 from jing-wang4/kernel-build-ppc64le
kernel: Updates to kernel config for ppc64le
2021-01-29 20:49:34 +01:00
Jing Wang
a88b8969b6 kernel: Updates to kernel config for ppc64le
Need to enable virtiofs and ipv6 to kernel config for ppc64le.

Fixes: #1333
Signed-off-by: Jing Wang <jing.wang4@ibm.com>
2021-01-29 18:13:56 +00:00
Jianyong Wu
b7a1f752c0 arm64: enable acpi for qemu/virt.
acpi is enabled for kata 1.x, port and rebase code for 2.x
including:
runtime: enable pflash;
agent: add acpi support for pci bus path;
packaging: enable CONFIG_RTC_DRV_EFI;

Fixes: #1317
Signed-off-by: Jianyong Wu <jianyong.wu@arm.com>
2021-01-29 22:12:43 +08:00
Fupan Li
5e39980858
Merge pull request #1216 from houstar/2.0-dev
agent: add secure_join to prevent softlink escape
2021-01-28 10:41:02 +08:00
Tim Zhang
07118afe93
Merge pull request #1320 from lifupan/main
rustjail: fix the issue of container's cgroup root path
2021-01-27 19:04:53 +08:00
fupan.lfp
448771f53d rustjail: fix the issue of container's cgroup root path
We should create the container's cgroup under the system's
cgroup default path such as "/sys/fs/cgroup/<sub system>",
instead of under the kata-agnet's process's cgroup path,
which would under the systemd's cgroup such as
"/sys/fs/cgroup/systemd/system.slice/kata-agent.service"

Fixes: #1319

Signed-off-by: fupan.lfp <fupan.lfp@antfin.com>
2021-01-27 15:38:45 +08:00
Bo Chen
03c5ecefef
Merge pull request #1306 from dgibson/no-cmake
osbuilder: remove traces of cmake
2021-01-26 16:26:02 -08:00
Carlos Venegas
3e3bfb9a42
Merge pull request #1321 from likebreath/clh_v0.12.0
versions: Update cloud-hypervisor to release v0.12.0
2021-01-26 17:07:02 -06:00
Carlos Venegas
5e0e35073d
Merge pull request #1302 from jcvenegas/2020-1-19/non-experimental-virtiofs-2.x
clh: Use vanilla kernel.
2021-01-26 16:14:06 -06:00
Fabiano Fidêncio
7083261402
Merge pull request #1322 from wainersm/osbuilder_misc-1
osbuilder: miscelaneous fixes/improvements
2021-01-26 22:28:51 +01:00
Wainer dos Santos Moschetta
fd39f0fa00 osbuilder: Add "Agent init" on terms glossary
Include on the terms glossary some words about the agent init as
later on README its explain how the agent can be switched between
systemd and init.

Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
2021-01-26 10:51:27 -05:00
Qingyuan Hou
e111093b83 agent: add secure_join to prevent softlink escape
This patch fixed the security issue if the container images has
unsafe symlink to the container rootfs and hackers can be exploit
this symlink to hack the guest system. e.g. make directory or files
on guest.

CVE-2015-3629

Fixes: #1219

Signed-off-by: Qingyuan Hou <qingyuan.hou@linux.alibaba.com>
2021-01-26 23:51:23 +08:00
Wainer dos Santos Moschetta
1273e485d8 osbuilder: Fix urls to repositories
Changed the user-visible urls to point to the right Kata Containers
files/repositories.

Fixes #234

Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
2021-01-26 07:51:20 -05:00
Wainer dos Santos Moschetta
ba9fa49a53 osbuilder: Use Fedora and CentOS registries
To avoid hitting quota limit on docker.io, this changes the Fedora
and CentOS dockerfiles to pull the image from the projects registries.

Fixes #1324

Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
2021-01-26 07:51:07 -05:00
Bo Chen
c2d14cdeea versions: Update cloud-hypervisor to release v0.12.0
Highlights for cloud-hypervisor version v0.12.0 include: removal of
`vhost-user-net` and `vhost-user-block` self spawning, migration of
`vhost-user-fs` backend, ARM64 enhancements with full support of
`--watchdog` for rebooting, and enhanced `info` HTTP API to include the
details of devices used by the VM including VFIO devices.

Fixes: #1315

Signed-off-by: Bo Chen <chen.bo@intel.com>
2021-01-25 10:58:19 -08:00
Snir Sheriber
0e57393fcc shimv2: log a warning and continue on post-start hook failure
According to runtime-spec:
The poststart hooks MUST be invoked by the runtime. If any poststart
hook fails, the runtime MUST log a warning, but the remaining hooks
and lifecycle continue as if the hook had succeeded

Fixes: #1252

Signed-off-by: Snir Sheriber <ssheribe@redhat.com>
2021-01-25 16:29:55 +02:00
Snir Sheriber
e7043fe284 shimv2: log a warning and continue on post-stop hook failure
According to runtime-spec:
The poststop hooks MUST be invoked by the runtime. If any
poststop hook fails, the runtime MUST log a warning, but
the remaining hooks and lifecycle continue as if the hook
had succeeded.

Fixes: #1252

Signed-off-by: Snir Sheriber <ssheribe@redhat.com>
2021-01-25 16:29:47 +02:00
David Gibson
3718df69c2 osbuilder: Remove leftover pieces related to cmake
The osbuilder scripts include a bunch of code for installing cmake, even
though cmake is never invoked.  versions.yaml claims it's needed to build
grpc-rs, but that doesn't appear to be in our dependency graph.

Presumably, we used to need this, but don't any more.  So, remove all cmake
references.

Fixes #1309

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2021-01-23 15:24:25 +11:00
Carlos Venegas
d1bf8293e1 kernel: ACPI: Always build evged for stable kernel
Path required to enable CPU/memory hotplug in cloud-hypervisor.

Signed-off-by: Carlos Venegas <jos.c.venegas.munoz@intel.com>
2021-01-22 20:00:47 +00:00
Carlos Venegas
6f3d591763 clh: Use vanilla kernel.
Qemu config alredy use vanilla kernel build for virtiofs.

Lets make cosisntent the usage of kernel.

Depends-on: github.com/kata-containers/tests#3172

Fixes: #1302

Signed-off-by: Carlos Venegas <jos.c.venegas.munoz@intel.com>
2021-01-22 20:00:20 +00:00
Fabiano Fidêncio
4de21e3d95
Merge pull request #1311 from bergwolf/update-to-main
branch: change 2.0-dev to main
2021-01-22 12:07:02 +01:00
Peng Tao
fd5592d4d5 branch: change 2.0-dev to main
Change all mentioning of 2.0-dev to main so that we can rename the
default branch to main.

Fixes: #1310
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2021-01-22 15:49:35 +08:00
Fabiano Fidêncio
5aef2faa4d
Merge pull request #1304 from devimc/2021-01-20/snap/dontReleaseAlphaRC
snap: Don't release Kata Alpha/RC in snap store
2021-01-22 07:55:35 +01:00
Fupan Li
06d1dd2220
Merge pull request #1297 from mxpv/netlink
Migrate to rtnetlink
2021-01-22 09:39:17 +08:00
Julio Montes
2b880d2808 snap: Don't release Kata Alpha/RC in snap store
Stable and candidate snapcraft's channels are used to release Kata
Containers 1.x and 2.x respectively. Alpha and RC releases shouldn't
be pushed to the snap store because there are not enough channels
for all the releases of Kata Containers 1.x and 2.x.

fixes #1303

Signed-off-by: Julio Montes <julio.montes@intel.com>
2021-01-21 10:34:05 -06:00
Bin Liu
4bb23ed990
Merge pull request #1301 from Tim-Zhang/add-underscore-for-const
agent: Add underscore for constants
2021-01-20 21:43:21 +08:00
Tim Zhang
14a63cce22 agent: Add underscore for constants
To make them follow the rust convention and easier to read.

Fixes: #1235

Signed-off-by: Tim Zhang <tim@hyper.sh>
2021-01-20 17:12:29 +08:00
Tim Zhang
c3a4180ae3
Merge pull request #1296 from GabyCT/topic/update20ubuntu
github: Update ubuntu version to 20.04
2021-01-20 14:57:30 +08:00
Maksym Pavlenko
fa93831f66 agent: Address linter and tests
- Fix clippy complains
- Use #[tokio::test] for async tests
- Improve IPv6 check

Fixes: #1294

Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2021-01-19 20:23:11 -08:00
Julio Montes
3b6dd7054a
Merge pull request #1290 from devimc/2021-01-18/agent/nvdimmDriver
agent: implement NVDIMM/PMEM block driver
2021-01-19 13:43:19 -06:00
Maksym Pavlenko
96762ab7ab agent: Remove old netlink crate
Cleans up unused code.

Fixes: #1294

Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2021-01-19 09:58:50 -08:00
Gabriela Cervantes
0ea8243a97 github: Update ubuntu version to 20.04
This PR updates the ubuntu version from 18.04 to 20.04 that will be
used for the github actions.

Fixes #1295

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2021-01-19 11:48:55 -06:00
Maksym Pavlenko
33367be4c7 agent: Integrate netlink
This patch integrates new netlink module routines with the agent (mainly
replaces calls to old netlink module with the new one).

Fixes: #1294

Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2021-01-19 09:48:51 -08:00
Maksym Pavlenko
23f3aefa1d agent: Implement new netlink module
This PR adds new netlink module (based on `rtnetlink` crate), so we don’t have to
write a low level code to interact with netlink sockets, but use a high level API.

As a side effect, `rtnetlink` crate got full IPv6 support, so it fixes #1171

Fixes: #1294

Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2021-01-19 09:44:50 -08:00
Julio Montes
12551de8a2 agent: implement NVDIMM/PMEM block driver
Support pmem-csi[1] k8s pluging, unlike SCSI and virtio devices,
NVDIMM/PMEM devices support DAX, improving IO Read and Write
operations.

fixes #1289

Signed-off-by: Julio Montes <julio.montes@intel.com>

[1]: https://github.com/intel/pmem-csi
2021-01-19 09:28:41 -06:00
Tim Zhang
f09128d8c7
Merge pull request #1292 from lifupan/2.0-dev
rustjail: fix the issue of missing destroy contaienr cgroups
2021-01-19 22:33:27 +08:00
fupan.lfp
6abb1be724 rustjail: fix the issue of missing destroy contaienr cgroups
In the container's destroy method, it should destroy
the container's cgroups.

Fixes: #1291

Signed-off-by: fupan.lfp <fupan.lfp@antfin.com>
2021-01-19 16:00:41 +08:00
Bin Liu
2a990a4507
Merge pull request #1210 from mxpv/async
agent: switch to async runtime
2021-01-19 13:52:23 +08:00
Tim Zhang
fe67f57c46 agent: set edition = "2018" in .rustfmt.toml to fix rustfmt about async fn
Got:
find . -type f -name "*.rs"  | egrep -v "target/|grpc-rs/|protocols/" | xargs rustfmt --check

error[E0670]: `async fn` is not permitted in the 2015 edition

This commit fixes this issue.

Signed-off-by: Tim Zhang <tim@hyper.sh>
2021-01-18 15:38:19 +08:00
Tim Zhang
df68771e77 agent-ctl: Update ttrpc to 0.4.14 for agent-ctl
The ttrpc in agent-ctl should be compatible with protocols crate.

Signed-off-by: Tim Zhang <tim@hyper.sh>
2021-01-18 15:38:19 +08:00
Maksym Pavlenko
37e285bf7b agent: Make debug console async
Fixes: #1209

Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2021-01-18 15:38:19 +08:00
Tim Zhang
f3bd439465 agent: fix tests for async functions
Use tokio::test to test async functions.

Signed-off-by: Tim Zhang <tim@hyper.sh>
2021-01-18 15:38:19 +08:00
Tim Zhang
9f79ddb9df agent: use tokio Notify instead of epoll to fix #1160
Fixes: #1160

Signed-off-by: Tim Zhang <tim@hyper.sh>
2021-01-18 15:38:19 +08:00
Tim Zhang
332fa4c65f agent: switch to async runtime
Fixes: #1209

Signed-off-by: Tim Zhang <tim@hyper.sh>
2021-01-18 15:38:15 +08:00
Eric Ernst
5d2c5ab534
Merge pull request #1280 from egernst/final-fix-probably-2.0-dev
Final fix probably 2.0 dev
2021-01-15 12:45:43 -08:00
Eric Ernst
35ea7ee600 actions: further updates to fix release workflow
There were still issues. Tested in fork, verified environment variable
passing works as before now.

Fixes: #1273

Signed-off-by: Eric Ernst <eric.g.ernst@gmail.com>
2021-01-15 11:06:17 -08:00
Eric Ernst
fc6ba8f067
Merge pull request #1279 from egernst/fixup-release-2.0-dev
actions: fixup release/main workflow
2021-01-15 08:38:09 -08:00
Eric Ernst
ded8e03f33 actions: fixup release/main workflow
Still need pkg-sha

Fixes: #1273

Signed-off-by: Eric Ernst <eric.g.ernst@gmail.com>
2021-01-15 07:45:13 -08:00