Commit Graph

6540 Commits

Author SHA1 Message Date
Fabiano Fidêncio
a0af2bd7dc docs: Use stable-2.x / 2.x.y as example in the branch strategy document
This may help to reduce some confusion as 1.x was a totally different
thing for the project.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2021-05-21 09:52:39 +02:00
Fabiano Fidêncio
a5e1f66a15 docs: Maintain only one stable branch per major release
This is a proposal that was sent to the ML and can be accessed via
http://lists.katacontainers.io/pipermail/kata-dev/2021-May/001894.html

Shortly, the proposal is to maintain only one stable branch per major
active release.

This will help the developers and the CI maintainers, to spend more time
on what's coming, rather on backporting and debugging issues with old
releases; while still providing one stable branch that downstream
companies can rely on.

Hopefully, with this we'll be able to lower the maintainance burden and
spend more time on getting things rock solid / move forward in a faster
pace with the project.

Fixes: #1876

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2021-05-21 09:52:39 +02:00
Fabiano Fidêncio
419773b8df docs: Emphasize behaviour changes may be a reason for a major bump
The current wording is good, but we could emphasize better that changes
on behaviour from a previous release by simply making the text bold
rather than italic.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2021-05-21 09:52:39 +02:00
Fabiano Fidêncio
54a750086d docs: Refer to main branch in the stable branch strategy document
As there's no active `master` branch as part of kata-containers 2.x,
let's avoid referring to it, and let's referr to the `main` branch
instead.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2021-05-21 09:52:39 +02:00
Amulyam24
7dde0b5d84 kernel: add ppc64le fragments
Adding support for ppc64le kernel fragments.

Fixes: #1898

Signed-off-by: Amulyam24 <amulmek1@in.ibm.com>
2021-05-21 07:06:45 +00:00
Amulyam24
8490618125 kernel: skip fragments for ppc64le
Adding !powerpc to the group of fragments not
supported on ppc64le.

Signed-off-by: Amulyam24 <amulmek1@in.ibm.com>
2021-05-21 06:09:05 +00:00
Amulyam24
9676b86b44 kernel: move CONFIG_RANDOMIZE_BASE
This config is not selected for ppc64le. It is
only supported on PPC32 for now. Moved it to
respective arch base.conf.

Signed-off-by: Amulyam24 <amulmek1@in.ibm.com>
2021-05-21 06:05:21 +00:00
Shukui Yang
bd0cde40e7 factory: Use lazy unmount
we can have the following case,
1. start kata container with factory feature, this need kata-runtime
   config to enable factory and use initrd as base image.
2. start a kata container.
3. cd /root; cd /run/vc/vm/template dir, this will make
   /run/vc/vm/template to be in used.
4. destroy vm template with kata-runtime factory destroy , and check
                the template mountpoint.
we can see  the template mountpoints will add everytime we repeat the above steps .

[root@centos1 template]# mount |grep template
[root@centos1 template]# docker run -ti --rm  --runtime untrusted-runtime --net none busybox echo

[root@centos1 template]# cd /root; cd /run/vc/vm/template/
[root@centos1 template]# /kata/bin/kata-runtime factory destroy
vm factory destroyed
[root@centos1 template]# mount |grep template
tmpfs on /run/vc/vm/template type tmpfs (rw,nosuid,nodev,relatime,seclabel,size=2105344k)
[root@centos1 template]# docker run -ti --rm  --runtime untrusted-runtime --net none busybox echo

[root@centos1 template]# cd /root; cd /run/vc/vm/template/
[root@centos1 template]# /kata/bin/kata-runtime factory destroy
vm factory destroyed
[root@centos1 template]# mount |grep template
tmpfs on /run/vc/vm/template type tmpfs (rw,nosuid,nodev,relatime,seclabel,size=2105344k)
tmpfs on /run/vc/vm/template type tmpfs (rw,nosuid,nodev,relatime,seclabel,size=2105344k)

Fixes: #938

Signed-off-by: Shukui Yang <keloyangsk@gmail.com>
2021-05-20 16:18:28 +08:00
Fupan Li
0c463babf3
Merge pull request #1885 from fidencio/wip/stop-using-unmaintained-prctl-crate
agent: Stop relying in the unmaintained prctl crate
2021-05-20 10:50:04 +08:00
Fabiano Fidêncio
f52468bea7 agent/agent-ctl: Replace prctl crate by the capctl one
While evaluating the possibility of having kata-agent statically linked
to the GNU libc, we've ended up facing some issues with prctl.

When debugging the issues, we figured out that the crate hasn't been
maintained since 2015 and that the capctl one is a good 1:1 replacement
for what we need.

Fixes: #1844

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2021-05-19 20:16:26 +02:00
Fabiano Fidêncio
d289b1d621 agent-ctl: Perform a cargo update
While in the beginning of the development cycle, let's perform a `cargo
update`.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2021-05-19 19:44:12 +02:00
Yuanzhe Liu
bc36b7b49f qemu: align before memory hotplug on arm64
When hotplug memory on arm64 in kata, kernel will shout:

[ 0.396551] Block size [0x40000000] unaligned hotplug range: start 0xc8000000, size 0x40000000
[ 0.396556] acpi PNP0C80:01: add_memory failed
[ 0.396834] acpi PNP0C80:01: acpi_memory_enable_device() error
[ 0.396948] acpi PNP0C80:01: Enumeration failure

It means that kernel will check if the memory range to be hotplugged
align with 1G before plug the memory. So we should twist the qemu to
make sure the memory range align with 1G to pass the kernel check.

Fixes: #1841

Signed-off-by: Yuanzhe Liu <yuanzheliu09@gmail.com>
2021-05-19 14:23:55 +00:00
Fabiano Fidêncio
8aefc79314 agent: Perform a cargo update
While in the beginning of the development cycle, let's perform a `cargo
update`.

Fixes: #1883

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2021-05-19 09:43:17 +02:00
Fupan Li
be936442eb
Merge pull request #1846 from teawater/vm_doc
how-to-use-virtio-mem-with-kata.md: Update doc to make it clear
2021-05-18 14:07:49 +08:00
Hui Zhu
b97791add1
Merge pull request #1855 from jongwu/mem_doc
docs: Add document for memory hotplug on arm64
2021-05-18 09:32:55 +08:00
Hui Zhu
785be0bbde how-to-use-virtio-mem-with-kata.md: Update doc to make it clear
Update this howto because the virtio-mem support of kata, qemu and Linux
was updated.

Fixes: #1845

Signed-off-by: Hui Zhu <teawater@antfin.com>
2021-05-18 09:27:57 +08:00
Chelsea Mafrica
6b9e46ef54
Merge pull request #1858 from GabyCT/topic/fixprporting
github: Run require porting labels only at main
2021-05-17 11:43:04 -07:00
Chelsea Mafrica
2e52529895
Merge pull request #1822 from jimcadden/kernel-conf-guest
kernel: add confidential guest build option
2021-05-17 11:42:07 -07:00
Jim Cadden
f8a16c170a kernel: add confidential guest build option
Includes support for SEV guest kernels

Fixes #1870

Signed-off-by: Jim Cadden <jcadden@ibm.com>
2021-05-17 09:52:32 -04:00
Jianyong Wu
a65f11ea56 docs: Add document for memory hotplug on arm64
After some enablement work, memory hotplug can be used on arm64.
Here we offer a document to instruct user to enable it.

Fixes: #1854
Signed-off-by: Jianyong Wu <jianyong.wu@arm.com>
2021-05-17 16:21:37 +08:00
Shengjing Zhu
1b60705646 runtime: remove covertool from cli test
covertool has no active since 2018 and is not compatible with go1.16

  ../vendor/github.com/dlespiau/covertool/pkg/cover/cover.go:76:29: cannot use f (type dummyTestDeps) as type testing.testDeps in argument to testing.MainStart:
  dummyTestDeps does not implement testing.testDeps (missing SetPanicOnExit0 method)

Fixes: #1862

Signed-off-by: Shengjing Zhu <zhsj@debian.org>
2021-05-16 03:06:06 +08:00
Gabriela Cervantes
fc42dc07cf github: Run require porting labels only at main
This PR modifies that require porting labels only run at main.

Fixes #1857

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2021-05-14 16:21:44 -05:00
Peng Tao
f6c5f7c0ef
Merge pull request #1844 from lifupan/main
rustjail: separated the propagation flags from mount flags
2021-05-14 10:25:35 +08:00
Eric Ernst
f8d1f9b86e
Merge pull request #985 from bergwolf/sandbox-cgroups-only
runtime: improve sandbox cleanup logic
2021-05-13 16:31:26 -07:00
Fabiano Fidêncio
dbef2b2931 versions: Update kubernetes to 1.21.1
The reason for doing such is to (try to) avoid random crashes we've been
facing as part of our CI, such as the one reported as part of
https://github.com/kata-containers/tests/issues/3473

Fixes: #1850

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2021-05-14 00:08:55 +02:00
Peng Tao
35151f1786 runtime: sandbox delete should succeed after verifying sandbox state
Otherwise we might block delete and create orphan containers.

Fixes: #1039

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
Signed-off-by: Eric Ernst <eric_ernst@apple.com>
2021-05-13 14:05:49 -07:00
fupan.lfp
e5fe572f51 rustjail: separated the propagation flags from mount flags
Since the propagation flags couldn't be combinted with the
standard mount flags, and they should be used with the remount,
thus it's better to split them from the standard mount flags.

Fixes: #1699

Signed-off-by: fupan.lfp <fupan.lfp@antgroup.com>
2021-05-13 23:53:52 +08:00
snir911
c995a982bc
Merge pull request #1843 from liubin/fix/1842-update-docs-for-connecting-debug-console
docs: add note for connecting debug console for old versions
2021-05-13 14:06:51 +03:00
bin
ffbb4d9b11 docs: add note for connecting debug console for old versions
Before 2.1-alpha1, user still need starting kata-monitor
to connect to debug console.

Fixes: #1842

Signed-off-by: bin <bin@hyper.sh>
2021-05-13 15:39:04 +08:00
GabyCT
bdc9a66bd9
Merge pull request #1770 from jongwu/image_align
image_build: align image size to 128M for arm64
2021-05-12 09:38:06 -05:00
Julien Ropé
a918c46fb6 test: Add a unit test for ioCopy()
Following the fix for #1713, adding a unit test for ioCopy() that
verifies that data is properly copied from source to destination
whatever the order in which the pipes are closed.

Fixes #1831

Signed-off-by: Julien Ropé <jrope@redhat.com>
2021-05-12 11:30:45 +02:00
Bin Liu
cc4748fa64
Merge pull request #1829 from Tim-Zhang/fix-reap
agent: avoid reaping the exit signal of execute_hook in the reaper
2021-05-12 17:24:25 +08:00
Bin Liu
15778a17e5
Merge pull request #1828 from Tim-Zhang/move-dep
agent: move the dependency tempfile to the dev-dependencies section
2021-05-12 17:21:50 +08:00
Tim Zhang
2909a0364d
Merge pull request #1824 from c3d/issue/1823-release-process-version-bump
docs: Document test repository changes when creating a stable branch
2021-05-12 14:46:32 +08:00
Tim Zhang
a5bb383cf3 agent: avoid reaping the exit signal of execute_hook in the reaper
Fixes: #1826

Signed-off-by: Tim Zhang <tim@hyper.sh>
2021-05-12 14:40:20 +08:00
Tim Zhang
ce7a5ba22e agent: move the dependency tempfile to the dev-dependencies section
The tempfile is only used by tests.

Fixes: #1827

Signed-off-by: Tim Zhang <tim@hyper.sh>
2021-05-12 14:39:58 +08:00
Fabiano Fidêncio
979b73c35a
Merge pull request #1794 from c3d/issue/1793-workaround-spell-checker-bug
docs: Remove horizontal ruler markers that disable spell checks
2021-05-11 23:27:37 +02:00
GabyCT
5d05f36117
Merge pull request #1825 from wainersm/docs_qemu_patches
docs/Developer-Guide: Add instructions to apply QEMU patches
2021-05-11 13:36:00 -05:00
Fabiano Fidêncio
ac61e60492
Merge pull request #1790 from snir911/configure_timeout
runtime: make dialing timeout configurable
2021-05-11 16:52:05 +02:00
Wainer dos Santos Moschetta
e24e94622c docs/Developer-Guide: Add instructions to apply QEMU patches
Occasionally patches are necessary to build QEMU with the kata containers
configuration. This changed the developer guide to make it clear it is
recommended to apply the patches; and tell how.

Fixes #1807
Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
2021-05-11 10:39:53 -04:00
Christophe de Dinechin
850cf8cdb3 docs: Document test repository changes when creating a stable branch
When we create a new stable branch, it is good practice to ensure that the test
repository points to that stable branch, to make sure that it is not impacted by
later changes to the CI made on the stable branch.

Fixes: #1823

Signed-off-by: Christophe de Dinechin <christophe@dinechin.org>
2021-05-11 11:44:03 +02:00
Bin Liu
bffb099d99
Merge pull request #1816 from egernst/get-sandbox-metrics-cli
Get sandbox metrics cli
2021-05-11 13:10:30 +08:00
Samuel Ortiz
2c4e4ca1ac
Merge pull request #1590 from devimc/2021-02-02/ConfidentialComputing
Support TDx
2021-05-10 22:19:40 +02:00
Fabiano Fidêncio
becd270ccf
Merge pull request #1802 from nubificus/fix-k3s-cleanup
packaging/kata-cleanup: add k3s containerd volume
2021-05-10 21:15:43 +02:00
Eric Ernst
8068a4692f kata-runtime: add metrics command
For easier debug, let's add subcommand to kata-runtime for gathering
metrics associated with a given sandbox.

kata-runtime metrics --sandbox-id foobar

Fixes: #1815

Signed-off-by: Eric Ernst <eric_ernst@apple.com>
2021-05-10 10:45:10 -07:00
Fabiano Fidêncio
c4bd246efb
Merge pull request #1818 from cmaf/update-alpine-version
osbuilder: Upgrade alpine version to 3.13.5
2021-05-10 17:55:35 +02:00
Eric Ernst
3787306107 kata-monitor: export get stats for sandbox
Gathering stats for a given sandbox is pretty useful; let's export a
function from katamonitor pkg to do this.

Signed-off-by: Eric Ernst <eric_ernst@apple.com>
2021-05-10 08:53:56 -07:00
Snir Sheriber
01b56d6cbf runtime: make dialing timeout configurable
allow to set dialing timeout in configuration.toml
default is 30s

Fixes: #1789
Signed-off-by: Snir Sheriber <ssheribe@redhat.com>
2021-05-10 16:39:37 +03:00
Eric Ernst
12a04cb0ba
Merge pull request #1811 from egernst/monitor-cleanup
Monitor cleanup
2021-05-07 21:03:34 -07:00
Chelsea Mafrica
e8038718aa osbuilder: Upgrade alpine version to 3.13.5
We are using an older version of alpine, so upgrade to latest 3.13.5.

Fixes #1817

Signed-off-by: Chelsea Mafrica <chelsea.e.mafrica@intel.com>
2021-05-07 16:34:45 -07:00