Commit Graph

5819 Commits

Author SHA1 Message Date
Daniel Knittl-Frank
056d742c17 docs: Update documentation with new prefixless config options
Remove the old config options from the documentation and replace them
with the new form (without the redundant `kata-` prefix).

Signed-off-by: Daniel Knittl-Frank <knittl89+git@googlemail.com>
2021-02-10 07:55:18 +01:00
Daniel Knittl-Frank
fdcde7968a cli: use new prefixless config options in tools scripts
Update all tools/packaging scripts to prefer the new options over the
old ones (e.g. `--config` instead of `--kata-config`).

Signed-off-by: Daniel Knittl-Frank <knittl89+git@googlemail.com>
2021-02-10 07:55:18 +01:00
Daniel Knittl-Frank
02ee8b0b8a cli: Add aliases for kata- options
Remove `kata-` prefix from options `kata-config` and
`kata-show-default-config-paths`.

Fixes #1011

Signed-off-by: Daniel Knittl-Frank <knittl89+git@googlemail.com>
2021-02-10 07:55:18 +01:00
Daniel Knittl-Frank
c6bc43b697 docs: Fix broken link to fluentbit.io docs
Fix link to external website in fluentd how-to.

Signed-off-by: Daniel Knittl-Frank <knittl89+git@googlemail.com>
2021-02-10 07:55:18 +01:00
Fabiano Fidêncio
62cbaf4de4 kata-deploy: Remove kata-deploy-docker.sh
Kata Containers 2.x is not supported outside of the kubernetes world.
With this in mind, let's remove leftovers from the 1.x deployments &
documentation.

Fixes: #1356

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2021-02-05 15:18:43 +01:00
Chelsea Mafrica
38b5a43267
Merge pull request #1318 from jongwu/acpi
arm64: enable acpi for qemu/virt.
2021-02-03 16:37:49 -08:00
Chelsea Mafrica
d4bc5952b1
Merge pull request #1340 from jing-wang4/rootfs-ppc64le
osbuilder: Enforcing LIBC=gnu to rootfs build for ppc64le
2021-02-03 16:06:05 -08:00
Eric Ernst
a1361608a9
Merge pull request #1353 from Tim-Zhang/fix-async
Fix async problems
2021-02-03 14:49:52 -08:00
Chelsea Mafrica
dbfcd4a679
Merge pull request #1345 from liubin/fix/1343-kata-monitor-build-failed
kata-monitor: set buildmode to exe to avoid build failing
2021-02-03 14:40:12 -08:00
Tim Zhang
254b98dd2f rustjail: fix unit test test_process
test_process has a assertion that waitpid(-1) will fail
because there is no child process in most cases.

But if there is any child process forked by other unit test,
the test test_process will fail.

Because waitpid(-1) will wait for any child process including the
process created by other unit tests.

Signed-off-by: Tim Zhang <tim@hyper.sh>
2021-02-03 22:27:50 +08:00
Tim Zhang
b25575b430 agent: remove crate signal-hook which are no longer used
Had replaced by tokio::signal.

Signed-off-by: Tim Zhang <tim@hyper.sh>
2021-02-03 18:30:18 +08:00
Tim Zhang
b1880b3e80 rustjail: remove unnecessary #[async_trait]
Remove unnecessary #[async_trait]

Signed-off-by: Tim Zhang <tim@hyper.sh>
2021-02-03 18:30:15 +08:00
Tim Zhang
83e9414f4f rustjail: add unittest test_execute_hook
use xargs to test execute_hook.

Signed-off-by: Tim Zhang <tim@hyper.sh>
2021-02-03 18:30:15 +08:00
Tim Zhang
d2041001ed rustjail: close stdin in execute_hook after it was sent
So that hook program could receive EOF.

Signed-off-by: Tim Zhang <tim@hyper.sh>
2021-02-03 18:30:15 +08:00
Tim Zhang
bb08131151 rustjail: fix fork/child in execute_hook
Tokio in fork child does not work well as it easily deadlocks.
https://github.com/tokio-rs/tokio/issues/1541

Fixes: #1348

Signed-off-by: Tim Zhang <tim@hyper.sh>
2021-02-03 18:30:11 +08:00
Jing Wang
71aeb920aa osbuilder: updates for feedback
Updates for review feedback.

Signed-off-by: Jing Wang <jing.wang4@ibm.com>
2021-02-02 14:41:23 +00:00
Tim Zhang
9a02c81eb9
Merge pull request #1313 from liubin/doc/add-distro-desc
osbuilder: add description for how to use DISTRO variable
2021-02-02 15:19:57 +08:00
bin
8e2b19ac77 osbuilder: add description for how to use DISTRO variable
Fixes: #1312

Signed-off-by: bin <bin@hyper.sh>
2021-02-02 14:52:09 +08:00
bin
b6c2a60509 kata-monitor: set buildmode to exe to avoid build failing
CGO_ENABLED=0 and -buildmode=pie are not compatible and may lead build failing in some OS.
Specify buildmode=exe to overwrite the value set in BUILDFLAGS

Fixes: #1343

Signed-off-by: bin <bin@hyper.sh>
2021-02-02 14:47:21 +08:00
Chelsea Mafrica
6be910bdc1
Merge pull request #1134 from egernst/kata-monitor-cleanup
kata-monitor: allow for building for alpine
2021-02-01 16:19:36 -08:00
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