Commit Graph

8143 Commits

Author SHA1 Message Date
James O. D. Hunt
fb1989b27a docs: Fix arch doc formatting
PR #3298 failed to move the named link for the debug console to the
`guest-assets.md` meaning the debug console cells in the "User
accessible" column in the table in the "Root filesystem image" section
do not work as a link.

Fixes: #3311.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2021-12-20 10:33:48 +00:00
James O. D. Hunt
2ebae2d279
Merge pull request #3287 from jodh-intel/docs-split-arch-doc
Split architecture doc into separate files
2021-12-20 10:11:30 +00:00
Julio Montes
e329dcf2ff
Merge pull request #3299 from fidencio/wip/update-stable-branch-strategy
docs: Update the stable branch strategy
2021-12-17 13:29:10 -06:00
Chelsea Mafrica
e4c0b71e40
Merge pull request #3290 from cmaf/tracing-span-logging-error
tracing: Add span name to logging error
2021-12-17 11:13:41 -08:00
Jakob Naucke
7fdb425918
Merge pull request #3286 from zmlcc/pr-advice-expect-211216
docs: Update code PR advice document
2021-12-17 15:35:05 +01:00
Wainer dos Santos Moschetta
2938bb7f89 packaging/qemu: Use QEMU script to update submodules
Currently QEMU's submodules are git cloned but there is the scripts/git-submodule.sh
which is meant for that. Let's use that script.

Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
2021-12-17 10:20:59 -03:00
Wainer dos Santos Moschetta
5d49ccd613 packaging/qemu: Use partial git clone
The static build of QEMU takes a good amount of time on cloning the
source tree because we do a full git clone. In order to speed up that
operation this changed the Dockerfile so that it is carried out a
partial clone by using --depth=1 argument.

Fixes #3291
Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
2021-12-17 10:20:29 -03:00
Fabiano Fidêncio
87a219a1c9 docs: Update the stable branch strategy
On the last architecture committee meeting, the one held on December
14th 2021, we reached the agreement that minor releases will be cut once
every 16 weeks (instead of 12), and that patch releases will be cut
every 4 weeks (instead of 3)

Fixes: #3298

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2021-12-17 13:48:26 +01:00
zhanghj
d1bc409d57 osbuilder: avoid to copy versions.txt which already deprecated
Currently the versions.txt in rootfs-builder dir is already removed,
so avoid to copy it in list of helper files.

Fixes: #3267

Signed-off-by: zhanghj <zhanghj.lc@inspur.com>
2021-12-17 17:23:05 +08:00
Chelsea Mafrica
1653dd4a30 tracing: Add span name to logging error
Add span name to logging error to help with debugging when the context
is not set before the span is created.

Fixes #3289

Signed-off-by: Chelsea Mafrica <chelsea.e.mafrica@intel.com>
2021-12-16 12:44:42 -08:00
Greg Kurz
12c8e41c75 qemu: Disable libudev for QEMU 5.2 and newer
Commit 112ea25859 disabled libudev for static builds because it was
breaking snap. It turns out that the only users of libudev in QEMU are
qemu-pr-helper and USB. Kata already disables USB and doesn't use
qemu-pr-helper. Disable libudev for all builds if QEMU supports it, i.e.
version 5.2 or newer.

Fixes #3078

Signed-off-by: Greg Kurz <groug@kaod.org>
2021-12-16 16:12:02 +01:00
James O. D. Hunt
233015a6d9 docs: Split guest assets details out of arch doc
Move the guest assets details out of the architecture doc and into a
separate file.

Fixes: #3246.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2021-12-16 14:18:49 +00:00
James O. D. Hunt
db411c23e8 docs: Split k8s info out of arch doc
Move the Kubernetes information out of the architecture doc and into a
separate file.

Partially fixes: #3246.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2021-12-16 14:18:47 +00:00
James O. D. Hunt
7ac619b24e docs: Split networking out of arch doc
Move the networking details out of the architecture doc and into a
separate file.

Partially fixes: #3246.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2021-12-16 14:18:45 +00:00
James O. D. Hunt
5df0cb6420 docs: Split storage out of arch doc
Move the storage details in the architecture doc to a separate file.

Partially fixes: #3246.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2021-12-16 14:18:41 +00:00
James O. D. Hunt
7229b7a69d docs: Split background and example out of arch doc
Move the background and example command details out of the architecture
doc and into separate files.

Partially fixes: #3246.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2021-12-16 14:18:38 +00:00
James O. D. Hunt
283d7d52c8 docs: Split history out of arch doc
Move the historical details out of the architecture doc
and into a separate file.

Partially fixes: #3246.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2021-12-16 14:17:59 +00:00
James O. D. Hunt
6f9efb4043 docs: Move arch doc to separate directory
Move the architecture document into a new `docs/design/architecture/` directory
in preparation for splitting it into more manageable pieces.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2021-12-16 12:26:17 +00:00
Zack
02608e13ab docs: Update code PR advice document
Allow using `expect()` for `Mutex.lock()` because it is almost
unrecoverable if failed in the lock acquisition

Fixes: #3285

Signed-off-by: Zack <zmlcc@linux.alibaba.com>
2021-12-16 19:23:17 +08:00
Steve Horsman
39cf2b27c1
Merge pull request #3261 from stevenhorsman/native-agent-config-opt
agent: Add config file option to cli
2021-12-16 10:00:56 +00:00
Eric Ernst
3865a1bcf6
Merge pull request #2918 from egernst/update-container-type-handling
update container type handling
2021-12-15 10:41:23 -08:00
Eric Ernst
32d62c85c2
Merge pull request #3195 from jodh-intel/docs-update-architecture
docs: Update architecture document
2021-12-15 09:25:20 -08:00
Jakob Naucke
cb5c948a0a
kata-manager: Retrieve static tarball
In `utils/kata-manager.sh`, we download the first asset listed for the
release, which used to be the static x86_64 tarball. If that happened to
not match the system architecture, we would abort. Besides that logic
being invalid for !x86_64 (despite not distributing other tarballs at
the moment), the first asset listed is also not the static tarball any
more, it is the vendored source tarball. Retrieve all _static_ tarballs
and select the appropriate one depending on architecture.

Fixes: #3254
Signed-off-by: Jakob Naucke <jakob.naucke@ibm.com>
2021-12-15 14:34:14 +01:00
James O. D. Hunt
51bf98073d docs: Update architecture document
Refresh the content and formatting of the architecture document.

Out of scope of these changes:

- Diagram updates.
- Updates to the Networking section.

Fixes: #3190.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2021-12-15 10:46:46 +00:00
Jakob Naucke
a40e4877e9
Merge pull request #3266 from liubin/fix/3265-update-golang-to-1.16-and-remove-ioutil
runtime: update golang to 1.16 and remove ioutil package
2021-12-15 10:09:23 +01:00
vados
f3a97e94b2
docs: add how-to on Docker in Kata
Add documentation on how to use Docker in Docker

Fixes: #2474

Signed-off-by: vados <vados@vadosware.io>
2021-12-15 12:43:58 +09:00
Eric Ernst
7a989a8333 runtime: api-test: fixup
not clear why this was commented out before -- ensure that we set
approprate annotation on the sandbox container's annotations to indicate
this is a sandbox.

Signed-off-by: Eric Ernst <eric_ernst@apple.com>
2021-12-14 18:55:18 -08:00
Eric Ernst
52f79aef91 utils: update container type handling
Today we assume that if the CRI/upper layer doesn't provide a container
type annotation, it should be treated as a sandbox. Up to this point, a
sandbox with a pause container in CRI context and a single container
(ala ctr run) are treated the same.

For VM sizing and container constraining, it'll be useful to know if
this is a sandbox or if this is a single container.

In updating this, we cleanup the type handling tests and we update the
containerd annotations vendoring.

Fixes: #2926

Signed-off-by: Eric Ernst <eric_ernst@apple.com>
2021-12-14 17:59:19 -08:00
bin
5b002f3c88 docs: change io/ioutil to io/os packages
Change io/ioutil to io/os packages because io/ioutil package
is deprecated from 1.16:

TempDir => os.MkdirTemp

Details: https://go.dev/doc/go1.16#ioutil

Fixes: #3265

Signed-off-by: bin <bin@hyper.sh>
2021-12-15 07:31:57 +08:00
bin
03546f75a6 runtime: change io/ioutil to io/os packages
Change io/ioutil to io/os packages because io/ioutil package
is deprecated from 1.16:

Discard => io.Discard
NopCloser => io.NopCloser
ReadAll => io.ReadAll
ReadDir => os.ReadDir
ReadFile => os.ReadFile
TempDir => os.MkdirTemp
TempFile => os.CreateTemp
WriteFile => os.WriteFile

Details: https://go.dev/doc/go1.16#ioutil

Fixes: #3265

Signed-off-by: bin <bin@hyper.sh>
2021-12-15 07:31:48 +08:00
Julio Montes
aaac742762
Merge pull request #207 from devimc/2021-12-14/fixBlockdevReadonly
qemu: update readonly flag for block devices
2021-12-14 13:30:47 -06:00
Jakob Naucke
70274b9d39
Merge pull request #3258 from fidencio/wip/kata-deploy-count-with-a-non-existend-containerd-config-file
kata-deploy: Deal with empty containerd conf file
2021-12-14 20:14:41 +01:00
Julio Montes
b17f07395c qemu: update readonly flag for block devices
since qemu 6.0, readonly flag for block devices must be enable or
disable with `on` or `off` respectively.

Signed-off-by: Julio Montes <julio.montes@intel.com>
2021-12-14 11:55:19 -06:00
Bin Liu
6c34446f49
Merge pull request #3244 from bergwolf/reorg-code
src: reorg source code directory
2021-12-14 21:57:07 +08:00
bin
24a530ced1 versions: bump minimum golang version to 1.16.10
According to https://endoflife.date/go golang 1.11.10 is not supported
anymore, 1.16.10 is the minimum supported version.

Fixes: #3265

Signed-off-by: bin <bin@hyper.sh>
2021-12-14 17:03:53 +08:00
Tim Zhang
4f96ea4e2b
Merge pull request #3257 from liubin/fix/3256-show-usage-if-no-arguments-specified
osbuilder: show usage if no options/arguments specified
2021-12-14 11:41:06 +08:00
Peng Tao
7c4263b3e1 src: reorg source directories
To make the code directory structure more clear:

└── src
    ├── agent
    ├── libs
    │   └── logging
    ├── runtime
    ├── runtime-rs (to be added)
    └── tools
        ├── agent-ctl
        └── trace-forwarder

Fixes: #3204
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2021-12-14 10:30:08 +08:00
stevenhorsman
1a34fbcdbd agent: Add config file option to cli
- Add option to pass in config with -c/--config

Fixes: #3252

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2021-12-13 21:57:23 +00:00
Bo Chen
9d13d1b208
Merge pull request #3263 from likebreath/1213/clh_v20.1
Upgrade to Cloud Hypervisor v20.1
2021-12-13 12:51:27 -08:00
Bo Chen
bbfb10e169 versions: Upgrade to Cloud Hypervisor v20.1
This is a bug release from Cloud Hypervisor addressing the following
issues: 1) Networking performance regression with virtio-net; 2) Limit
file descriptors sent in vfio-user support; 3) Fully advertise PCI MMIO
config regions in ACPI tables; 4) Set the TSS and KVM identity maps so
they don't overlap with firmware RAM; 5) Correctly update the DeviceTree
on restore.

Details can be found: https://github.com/cloud-hypervisor/cloud-hypervisor/releases/tag/v20.1

Fixes: #3262

Signed-off-by: Bo Chen <chen.bo@intel.com>
2021-12-13 10:09:44 -08:00
Fabiano Fidêncio
8457150684 kata-deploy: Deal with empty containerd conf file
As containerd can properly run without having a existent
`/etc/containerd/config.toml` file (it'd run using the default
cobnfiguration), let's explicitly create the file in those cases.

This will avoid issues on ammending runtime classes to a non-existent
file.

Fixes: #3229

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
Tested-by: Jakob Naucke <jakob.naucke@ibm.com>
2021-12-13 11:20:22 +01:00
bin
3f7cf7ae67 osbuilder: show usage if no options/arguments specified
Now if no options/arguments specified, the shell scripts will return an error:

ERROR: Invalid rootfs directory: ''

This commit will show usage if no options/arguments specified.

Fixes: #3256

Signed-off-by: bin <bin@hyper.sh>
2021-12-13 16:10:55 +08:00
Bin Liu
978b13c9e8
Merge pull request #3235 from Kvasscn/kata_dev_image_builer_help
image_build: add help info for '-f' option and 'BLOCK_SIZE' env.
2021-12-09 22:55:24 +08:00
Julio Montes
70062e1563
Merge pull request #3238 from snir911/wip/build_with_runtime
osbuilder: be runtime consistent with podman build
2021-12-09 08:06:00 -06:00
Fabiano Fidêncio
c868172510
Merge pull request #3222 from Jakob-Naucke/apk-static
osbuilder: Revert to using apk.static for Alpine
2021-12-09 13:33:35 +01:00
Fabiano Fidêncio
602d87295b
Merge pull request #3226 from liubin/fix/3193-fill-hypervisorconfig
runtime/template: Handling new attributes for hypervisor config
2021-12-09 13:29:23 +01:00
Snir Sheriber
2ebaaac73d osbuilder: be runtime consistent also with podman build
Use the same runtime used for podman run also for the podman build cmd
Additionally remove "docker" from the docker_run_args variable

Fixes: #3239
Signed-off-by: Snir Sheriber <ssheribe@redhat.com>
2021-12-09 11:28:16 +02:00
Fabiano Fidêncio
251be90dc0
Merge pull request #3241 from devimc/2021-12-06/fixCheckMarkdown
docs: fix check-markdown test
2021-12-09 08:16:57 +01:00
Julio Montes
f310369698 docs: fix check-markdown test
Unit-Test-Advice.md was moved to kata-containers repo but URLs pointing
to that document were not updated. This patch updates these URLs.

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

fixes #3240

Signed-off-by: Julio Montes <julio.montes@intel.com>
2021-12-08 14:38:12 -06:00
Jakob Naucke
2204ecac39
versions: Upgrade Alpine, using minor version
- Upgrade Alpine guest rootfs to 3.15
- Specify a minor version rather than patch level as the Alpine
  repositories use that.

Signed-off-by: Jakob Naucke <jakob.naucke@ibm.com>
2021-12-08 15:18:44 +01:00