Commit Graph

8162 Commits

Author SHA1 Message Date
Samuel Ortiz
14e7f52a91 virtcontainers: Split the rootless package into OS specific parts
Move the netns specific bits into a Linux specific file.

Fixes: #3607

Signed-off-by: Samuel Ortiz <s.ortiz@apple.com>
Signed-off-by: Eric Ernst <eric_ernst@apple.com>
2022-01-28 16:20:28 -08:00
James O. D. Hunt
7c956e0d27 virtcontainers: Enable initrd for Cloud Hypervisor
Since CH has supported booting with an initramfs since version 0.7.0
[1], allow an `initrd=` to be specified.

Fixes: #3566.

[1] - https://github.com/cloud-hypervisor/cloud-hypervisor/releases/tag/v0.7.0

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2022-01-28 10:49:10 +00:00
Eric Ernst
a5ebeb96c1
Merge pull request #2941 from egernst/sandbox-sizing-feature
Sandbox sizing feature
2022-01-27 09:37:57 -08:00
snir911
7ac0fcb9e0
Merge pull request #3560 from fidencio/fix-kata-deploy-tag-replacement
kata-deploy: Fix the tag replacement logic
2022-01-27 15:48:20 +02:00
Francesco Giudici
25b2bc713e
Merge pull request #3548 from amshinde/update-network-arch-doc
docs: Update networking details in the architecture doc
2022-01-27 09:18:54 +01:00
Fabiano Fidêncio
aa3fae1397 kata-deploy: Fix the tag replacement logic
When building a non-stable release, the tag is **always** "latest¨,
instead of the version. The same magic done for setting the correct
tags up should be done for replacing the tag on the kata-deploy and
kata-cleanup yaml files, as part of the kata-deploy test.

Fixes: #3559

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2022-01-26 20:42:48 +01:00
Eric Ernst
8cde54131a runtime: introduce static sandbox resource management
There are software and hardware architectures which do not support
dynamically adjusting the CPU and memory resources associated with a
sandbox. For these, today, they rely on "default CPU" and "default
memory" configuration options for the runtime, either set by annotation
or by the configuration toml on disk.

In the case of a single container (launched by ctr, or something like
"docker run"), we could allow for sizing the VM correctly, since all of
the information is already available to us at creation time.

In the sandbox / pod container case, it is possible for the upper layer
container runtime (ie, containerd or crio) could send a specific
annotation indicating the total workload resource requirements
associated with the sandbox creation request.

In the case of sizing information not being provided, we will follow
same behavior as today: start the VM with (just) the default CPU/memory.

If this information is provided, we'll track this as Workload specific
resources, and track default sizing information as Base resources. We
will update the hypervisor configuration to utilize Base+Workload
resources, thus starting the VM with the appropriate amount of CPU and
memory.

In this scenario (we start the VM with the "right" amount of
CPU/Memory), we do not want to update the VM resources when containers
are added, or adjusted in size.

This functionality is introduced behind a configuration flag,
`static_sandbox_resource_mgmt`. This is defaulted to false for all
configurations except Firecracker, which is set to true.

This'll greatly improve UX for folks who are utilizing
Kata with a VMM or hardware architecture that doesn't support hotplug.

Note, users will still be unable to do in place vertical pod autoscaling
or other dynamic container/pod sizing with this enabled.

Fixes: #3264

Signed-off-by: Eric Ernst <eric_ernst@apple.com>
2022-01-26 09:04:38 -08:00
Eric Ernst
13eb1f81b9 docs: describe vCPU handling when hotplug is unavailable
Describe the static_sandbox_resource_mgmt flag, and how this applies to
configurations that do not utilize hotplug.

Signed-off-by: Eric Ernst <eric_ernst@apple.com>
2022-01-26 09:52:42 -08:00
Eric Ernst
c3e97a0a22 config: updates to configuration clh, fc toml template
There's some cruft -- let's update to reflect reality, and ensure that
we match what is expected.

Signed-off-by: Eric Ernst <eric_ernst@apple.com>
2022-01-26 09:45:50 -08:00
Fabiano Fidêncio
f7c7dc8d33
Merge pull request #3504 from Jakob-Naucke/s390x-govmm-tests
Fix and re-enable s390x GoVMM tests
2022-01-26 12:57:38 +01:00
Archana Shinde
081a235efe
Merge pull request #3540 from bradenrayhorn/fix-negative-memory-limit
runtime: fix handling container spec's memory limit
2022-01-25 05:17:05 -08:00
Archana Shinde
75ae536196 docs: Update networking details in the architecture doc
Updated the doc to clarify certain networking details and
external links to some of the networking terms used.

Fixes #3308

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2022-01-25 17:04:27 +05:30
Bin Liu
905b4b09d2
Merge pull request #3543 from Jakob-Naucke/fwdport-static-args
ci: Pass function arguments in static-checks.sh
2022-01-25 14:07:32 +08:00
GabyCT
0fa7814c21
Merge pull request #3546 from GabyCT/topic/removesystcl
docs: Remove docker run and sysctl limitation
2022-01-24 15:41:23 -06:00
Braden Rayhorn
fc0e095180
runtime: fix handling container spec's memory limit
The OCI container spec specifies a limit of -1 signifies
unlimited memory. Update the sandbox memory calculator
to reflect this part of the spec.

Fixes: #3512

Signed-off-by: Braden Rayhorn <bradenrayhorn@fastmail.com>
2022-01-24 13:30:32 -06:00
Gabriela Cervantes
7af40fbc66 docs: Remove docker run, sysctl and docker daemon limitations
This PR removes the docker run and sysctl limitation reference
for kata 2.0 as well as docker daemon limitation as currently
for kata we are not supporting docker and this reference belonged
to kata 1.0

Fixes #3545

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2022-01-24 18:11:54 +00:00
Jakob Naucke
016569fd8e
Merge pull request #3476 from bergwolf/runtime-dep
runtime: update runc and image-spec dependencies
2022-01-24 15:53:43 +01:00
Jakob Naucke
1721197934
ci: Pass function arguments in static-checks.sh
e.g. when called from the tests repo

Fixes: #3525
Signed-off-by: Jakob Naucke <jakob.naucke@ibm.com>
2022-01-24 12:05:10 +01:00
Binbin Zhang
4fc4c76b87 agent: Fix execute_hook() args error
1. The hook.args[0] is the hook binary name which shouldn't be included
in the Command.args.
2. Add new unit tests

Fixes: #2610

Signed-off-by: Binbin Zhang <binbin36520@gmail.com>
2022-01-24 14:13:24 +08:00
Peng Tao
5643c6dcae runtime: update runc and image-spec dependencies
To address two depbot security warnings.

Fixes: #3475
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2022-01-24 11:49:05 +08:00
Fabiano Fidêncio
8a8ae8aae7
Merge pull request #3531 from egernst/test-lint
agent: resolve unused variables in tests
2022-01-21 21:57:13 +01:00
Bo Chen
94b343492d
Merge pull request #3520 from likebreath/0120/clh_v21.0
Upgrade to Cloud Hypervisor v21.0
2022-01-21 08:08:13 -08:00
Jakob Naucke
918dcd5f69
Merge pull request #3522 from Amulyam24/runtime-build
runtime: rectify passing empty options to -ldflags
2022-01-21 15:54:38 +01:00
Jakob Naucke
2f37165f46
govmm: Unite VirtioNet tests
no explicit PCI test, just switch path depending on architecture
(CCW for s390x, PCI for others). Also fixes an unknown variable error.

Signed-off-by: Jakob Naucke <jakob.naucke@ibm.com>
2022-01-21 13:00:05 +01:00
Jakob Naucke
4a428fd1c5
govmm: readonly=on in s390x blkdev test
Forgotten in b17f07395c, also fixes a
test.

Signed-off-by: Jakob Naucke <jakob.naucke@ibm.com>
2022-01-21 13:00:05 +01:00
Jakob Naucke
79ecebb280
govmm: TestAppendPCIBridgeDevice et al. on !s390x
s390x uses CCW, also fixes a lint failure about undeclared variables on
s390x.

Signed-off-by: Jakob Naucke <jakob.naucke@ibm.com>
2022-01-21 13:00:05 +01:00
Jakob Naucke
dc285ab1d7
govmm: Remove unnecessary comma in iommu_platform
in FSDevice.QemuParams for VirtioCCW. Forgotten in
ff34d283db, also fixes a test.

Fixes: #3500
Signed-off-by: Jakob Naucke <jakob.naucke@ibm.com>
2022-01-21 13:00:05 +01:00
Jakob Naucke
d23f2eb0f0
govmm: Revert "govmm: s390x: Skip broken tests"
This reverts commit 5ce9011a36.

Signed-off-by: Jakob Naucke <jakob.naucke@ibm.com>
2022-01-21 13:00:05 +01:00
Amulya Meka
f52ce302bc runtime: rectify passing empty options to -ldflags
When no options are passed to -ldflags, it passes
incorrect values(in this case, $BUILDFLAGS) to it.
Fix passing empty values by passing $KATA_LDFLAGS
in quotes.

Fixes: #3521

Signed-off-by: Amulya Meka <amulmek1@in.ibm.com>
2022-01-21 06:57:52 +00:00
Fabiano Fidêncio
618aa659d6
Merge pull request #3509 from ManaSugi/remove-libseccomp-from-dockerfile
osbuilder: Remove libseccomp from Dockerfile
2022-01-21 06:50:53 +01:00
Tim Zhang
eac003462d
Merge pull request #3370 from lifupan/fix_namespace
agent: fix the issue of creating new namespaces for agent
2022-01-21 10:25:43 +08:00
Bo Chen
2d799cbfa3 virtcontainers: clh: Re-generate the client code
This patch re-generates the client code for Cloud Hypervisor v21.0.
Note: The client code of cloud-hypervisor's (CLH) OpenAPI is
automatically generated by openapi-generator [1-2].

[1] https://github.com/OpenAPITools/openapi-generator
[2] https://github.com/kata-containers/kata-containers/blob/main/src/runtime/virtcontainers/pkg/cloud-hypervisor/README.md

Signed-off-by: Bo Chen <chen.bo@intel.com>
2022-01-20 17:48:10 -08:00
Bo Chen
7e15e99d5f versions: Upgrade to Cloud Hypervisor v21.0
Highlights from the Cloud Hypervisor release v21.0: 1) Efficient Local
Live Migration (for Live Upgrade); 2) Recommended Kernel is Now 5.15; 3)
Bug fixes on OpenAPI yaml spec file, avoid deadlock for live-migration,
etc.

Details can be found: https://github.com/cloud-hypervisor/cloud-hypervisor/releases/tag/v21.0

Fixes: #3519

Signed-off-by: Bo Chen <chen.bo@intel.com>
2022-01-20 17:43:14 -08:00
Eric Ernst
25aa2e8578
Merge pull request #3514 from GabyCT/topic/removekatapkg
docs: Remove kata-pkgsync reference
2022-01-20 13:04:37 -08:00
Gabriela Cervantes
9c2f1de16d docs: Remove kata-pkgsync reference
Now that kata-pkgsync has been removed, this PR removes the reference
in the documentation.

Fixes #3513

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2022-01-20 18:00:58 +00:00
James O. D. Hunt
16418be3c3
Merge pull request #3506 from jodh-intel/docs-glossary-wiki-redirect
docs: Redirect glossary to the wiki
2022-01-20 17:00:58 +00:00
Fabiano Fidêncio
b964bfc97d
Merge pull request #3503 from fidencio/wip/kata-deploy-use-base-ref
workflows: Use base instead of head ref for kata-deploy-test
2022-01-20 17:02:03 +01:00
Manabu Sugimoto
df6ae1e789 osbuilder: Remove libseccomp from Dockerfile
Remove the libseccomp package from Dockerfile of `alpine` and `clearlinux`
because the libseccomp library is installed by the `ci/install_libseccomp.sh`
script when building the kata-agent.

Fixes: #3508

Signed-off-by: Manabu Sugimoto <Manabu.Sugimoto@sony.com>
2022-01-21 00:32:57 +09:00
James O. D. Hunt
0338fc657f docs: Redirect glossary to the wiki
Whilst we work to update the
[copy of the glossary currently hosted in the wiki](https://github.com/kata-containers/kata-containers/wiki/Glossary),
update the in-tree glossary doc to refer to that wiki version.

Fixes: #3505.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2022-01-20 14:01:24 +00:00
Fabiano Fidêncio
3924470c8f workflows: Use base instead of head ref for kata-deploy-test
Although I've done tests on my own fork using `head_ref` and those
worked, it seems those only worked as the PR was coming from exactly the
same repository as the target one.

Let's switch to base_ref, instead, which we for sure have as part of our
repo.

The downside of this is that we run the test with the last merged PR,
rather than with the "to-be-approved" PR, but that's a limitation we've
always had.

Fixes: #3482

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2022-01-20 11:04:14 +01:00
Fabiano Fidêncio
1a59c5743e
Merge pull request #3496 from fidencio/wip/use-govmm-from-kata
govmm: Use it from our own repo
2022-01-20 09:47:32 +01:00
Archana Shinde
f71eedf3a0
Merge pull request #3437 from haslersn/un-gn
tools: Fix groupname if it differs from username
2022-01-19 22:25:59 -08:00
Archana Shinde
f29f04e1e0
Merge pull request #3486 from fidencio/wip/fix-kata-deploy-push-workflow
workflows: Fix typo in kata-deploy-push action
2022-01-19 19:42:37 -08:00
Archana Shinde
1c3f8c708e
Merge pull request #3488 from ManaSugi/fix-seccomp-notice-in-release-page
release: Escape backticks in Libseccomp Notices
2022-01-19 19:40:54 -08:00
Fabiano Fidêncio
5ce9011a36 govmm: s390x: Skip broken tests
For now a bunch of tests are simply not working.

Let's skip them all, and re-enable them once
kata-containers/kata-containers/issues/3500 gets fixed.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2022-01-20 01:04:35 +01:00
Fabiano Fidêncio
0570317e7b
Merge pull request #3494 from GabyCT/topic/removeobsremains
packaging: Remove kata-pkgsync tool
2022-01-19 19:59:25 +01:00
Fabiano Fidêncio
8bcaed0b4f govmm: Adapt license headers to kata-containers
Both projects follow the same license, Apache-2.0, but the header saying
that comes from govmm is different from the one expected for the tests
present on the kata-containers repo.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2022-01-19 18:02:46 +01:00
Fabiano Fidêncio
6dd6577986 govmm: Ignore govet checks, at least for now
govet checks have been ignored on govmm repo, but those are enabled on
kata-containers one.  So, in order to avoid failing our CIs let's just
keep ignoring the checks for the govmm structs and have an issue opened
for fixing it whenever someone has cycles to do it.

The important bit here is, we're not making anything worse that it
already is. :-)

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2022-01-19 18:02:46 +01:00
Fabiano Fidêncio
de678a3aaa govmm: Remove non-relevant top files
govmm, from now on, should follow the same guidelines from contributing,
copying, and etc as kata-containers does.

The go.mod is not needed anymore as the project lives inside the
runtime.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2022-01-19 18:02:46 +01:00
Fabiano Fidêncio
ec6655af87 govmm: Use govmm from our own pkg
Let's stop using govmm from kata-containers/govmm and let's start using
it from our own repo.

Fixes: #3495

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2022-01-19 18:02:46 +01:00