Commit Graph

10639 Commits

Author SHA1 Message Date
Hyounggyu Choi
10603e3def CCv0: install protobuf-compiler explicitly in shim-v2 Dockerfile
This is to install a missing binary protoc in shim-v2 Dockerfile.

Fixes: #6244

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2023-02-09 11:45:32 +01:00
Georgina Kinge
b95440712d
Merge pull request #6182 from GeorginaKin/CCv0
CCv0: Merge main into CCv0 branch
2023-02-07 15:53:41 +00:00
Fabiano Fidêncio
55dcaa22e1
Merge pull request #6158 from fidencio/topic/CCv0-enable-runtime-rs
CC | Take runtime-rs into consideration when building and caching the shim-v2 tarball
2023-02-07 15:34:02 +01:00
Fabiano Fidêncio
84d6b3dea4
Merge pull request #6217 from stevenhorsman/cherry-pick-docker-fix
CI: Set docker version to v20.10 in ubuntu:20.04 for s390x|ppc64le
2023-02-07 13:38:23 +01:00
Hyounggyu Choi
b399c72690 CI: Set docker version to v20.10 in ubuntu:20.04 for s390x|ppc64le
This is to make a docker version to v20.10 in docker upstream image ubuntu:20.04 for s390x and ppc64le.

Fixes: #6211
Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
Cherry-picked: f49b89b
2023-02-04 09:51:17 +00:00
Steve Horsman
6378fcb0be
Merge pull request #6191 from ryansavino/downgrade-qemu-to-7.1.0-CCv0
[CCv0] versions: downgrade qemu from 7.2.0 to 7.1.0
2023-02-03 18:22:52 +00:00
Ryan Savino
d6c12476fb versions: downgrade qemu from 7.2.0 to 7.1.0
A known bug in qemu 7.2.0 causes a problem handling the kernel hashes argument and causes SEV container launching to fail.

Fixes: #6189

Signed-Off-By: Ryan Savino <ryan.savino@amd.com>
2023-02-02 08:23:43 -06:00
Georgina Kinge
5b4075d18a CCv0: Merge main into CCv0 branch
Merge remote-tracking branch 'upstream/main' into CCv0

Fixes: #6181
Signed-off-by: Georgina Kinge <georgina.kinge@ibm.com>
2023-02-01 10:10:40 +00:00
Chao Wu
c282a1c709
Merge pull request #5616 from wllenyj/dragonball-ut-5
Built-in Sandbox: add more unit tests for dragonball. Part 5
2023-01-31 21:12:05 +08:00
Peng Tao
09d416fe43
Merge pull request #6174 from gkurz/remove-qemu-log-file
runtime: Drop QEMU log file support
2023-01-31 17:56:04 +08:00
Greg Kurz
334c4b8bdc runtime: Drop QEMU log file support
The QEMU log file is essentially about fine grain tracing of QEMU
internals and mostly useful for developpers, not production. Notably,
the log file isn't limited in size, nor rotated in any way. It means
that a container running in the VM could possibly flood the log file
with a guest triggerable trace. For example, on openshift, the log
file is supposed to reside on a per-VM 14 GiB tmpfs mount. This means
that each pod running with the kata runtime could potentially consume
this amount of host RAM which is not acceptable.

Error messages are best collected from QEMU's stderr as kata is doing
now since PR #5736 was merged. Drop support for the QEMU log file
because it doesn't bring any value but can certainly do harm.

Fixes #6173

Signed-off-by: Greg Kurz <groug@kaod.org>
2023-01-31 09:20:29 +01:00
Chelsea Mafrica
1648b85e2d
Merge pull request #6137 from amshinde/agent-seccomp-doc
docs: Add documentation for building agent with seccomp support.
2023-01-30 19:08:15 -08:00
wllenyj
510798155d dragonball: Improve test cases
The same EpollManager should be used instead of creating two.

Signed-off-by: wllenyj <wllenyj@linux.alibaba.com>
2023-01-31 10:51:51 +08:00
wllenyj
dc90c6e30b dragonball: add more unit test for vm
Added more unit tests for vm module.

Fixes: #4899

Signed-off-by: wllenyj <wllenyj@linux.alibaba.com>
2023-01-31 10:51:51 +08:00
Fabiano Fidêncio
7345c14caa caching: Take runtime-rs into consideration when caching shim-v2
Now that TDX work will start coming for runtime-rs, let's also take it
into consideration when caching the shim-v2 tarball.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-01-30 14:12:26 +01:00
Fabiano Fidêncio
0f43ec8ff7 Revert "packaging: Don't build runtime-rs if no RUST_VERSION is provided"
This reverts commit 299829aec0, as we'll
start adding TDX support for the runtime-rs.
2023-01-30 14:00:31 +01:00
Bin Liu
b29cbbfd2c
Merge pull request #6141 from fidencio/topic/upcall-follow-up
Add kernel-dragonball-experimental to kata-deploy, kata-deploy-test, and the release
2023-01-30 19:48:18 +08:00
Fabiano Fidêncio
8e8c720d51 kata-deploy-push: Ensure we build Dragonball specific kernel
As the dragonball specific kernel is now part of the release, let's make
sure we build it as part of the kata-deploy-push action.

Fixes: #5859

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-01-30 09:40:34 +01:00
Zhongtao Hu
c1dd9b9777
Merge pull request #6023 from openanolis/missing_config
runtime-rs: add missing config section for share-fs
2023-01-30 15:45:22 +08:00
Bin Liu
653e00dff8
Merge pull request #6146 from zhaojizhuang/add-hmp
runtime: Add hmp for qemu
2023-01-30 15:43:53 +08:00
Peng Tao
de45f62096
Merge pull request #6081 from openanolis/chao/update_upcall_doc
upcall: add document for upcall
2023-01-30 12:03:11 +08:00
zhaojizhuang
9092c23a2e runtime: Add hmp for qemu
Fixes: #6092
Signed-off-by: zhaojizhuang <571130360@qq.com>
2023-01-29 14:22:04 +08:00
Fabiano Fidêncio
b7f4e96ff3 kata-deploy-test: Ensure we build dragonball specific kernel
As the dragonball specific kernel is now part of the release, let's make
sure we build it as part of the kata-deploy-test action.

Fixes: #5859

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-01-28 10:55:39 +01:00
Fabiano Fidêncio
063dec37c2 release: Add the dragonball-experimental kernel
Let's add the dragonball specific kernel, which takes advantage of
upcall, as part of the release tarball, so it can be used from the
release tarball / kata-deploy.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-01-28 10:55:39 +01:00
Fabiano Fidêncio
0b3c91d2a2 kata-deploy: Add kernel-dragonball-experimental target
As Chao Wu added the support for building the dragonball kernel as a new
experimental kernel, let's make sure we reflect that as part of the
kata-deploy build scripts.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-01-28 10:55:39 +01:00
Greg Kurz
af125b1498
Merge pull request #5736 from gkurz/no-qemu-daemonize
runtime: Start QEMU undaemonized and get logs
2023-01-27 16:33:48 +01:00
Steve Horsman
d3547814e5
Merge pull request #6104 from stevenhorsman/remove-skopeo-umoci
CC: Remove skopeo umoci
2023-01-27 10:31:33 +00:00
Fabiano Fidêncio
420203f054
Merge pull request #6120 from UnmeshDeodhar/CC-Cache-SEV-firmware
Adding caching capability for SEV ovmf
2023-01-27 08:47:30 +01:00
Archana Shinde
00dcd900f9 docs: Add documentation for building agent with seccomp support.
The default for the agent today is building with seccomp support.
However, additional steps need to be taken for building against
musl such as installing the static seccomp library for musl.
Add documentation to explain this.

Fixes #6136

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2023-01-26 10:58:38 -08:00
Steve Horsman
ee35096407
Merge pull request #6127 from Megan-Wright/CCv0
CCv0: Merge main into CCv0 branch
2023-01-26 12:22:15 +00:00
Archana Shinde
461b32491f
Merge pull request #6131 from GabyCT/topic/updateqatdoc
docs: Update url link in QAT documentation
2023-01-25 17:07:54 -08:00
Gabriela Cervantes
2b779cba00 docs: Update url link in QAT documentation
This PR updates the url link in QAT documentation.

Fixes #6130

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-01-25 15:27:29 +00:00
Megan Wright
c81071bb68 agent: update vendor packages
Update vendor packages after merge
Signed-off-by: Megan Wright <megan.wright@ibm.com>
2023-01-25 14:30:16 +00:00
Fabiano Fidêncio
392c87550f
Merge pull request #6111 from littlejawa/bump_cni_plugins_to_120
versions: update cni plugins version
2023-01-25 12:40:55 +01:00
stevenhorsman
3fd6c91ec6 doc: Update signature files path
Update the link to the signature files after x86 and s390x introduced

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2023-01-25 11:37:56 +00:00
stevenhorsman
e777860a0c osbuilder: Make skopeo version externalised
- Remove the hardcoded skopeo version arg
- Switch to read from version.yaml and pass via --build-arg

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2023-01-25 11:37:56 +00:00
stevenhorsman
9c75d43aef kata-deploy: Update cache version
- Remove skopeo & umoci from cache version now they aren't built
into the rootfs image

Fixes: #3970
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2023-01-25 11:37:56 +00:00
stevenhorsman
1bfbeee1dd versions: Remove umoci version
- Remove umoci entry from versions
- Update the usage of skopeo to control the tooling we use to build
the pause image
Fixes: #

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2023-01-25 11:37:56 +00:00
stevenhorsman
01a88fab2e doc: Remove umoci reference
Remove umoci from doc

Fixes: #3970
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2023-01-25 11:37:56 +00:00
stevenhorsman
ebffb7bc9b kata-deploy: Remove skopeo and umoci
- Now we don't need skopeo and umoci in the rootfs
remove the option from kata-deploy

Fixes: #3970
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2023-01-25 11:37:56 +00:00
stevenhorsman
dd2d6a94f1 osbuilder: Remove option to build skopeo, umoci
Now we don't need to have skopeo and umoci in the rootfs
remove the code that optionally builds and installs them

Fixes: #3970
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2023-01-25 11:37:56 +00:00
stevenhorsman
ee5fb8c998 agent: Remove container_policy_file config
- Remove the container_policy_file config parameter as it was only used
by the skopeo code path

Fixes: #3970
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2023-01-25 11:37:56 +00:00
stevenhorsman
dea1891851 agent: Remove skopeo & umoci
Remove code paths that use skopeo to pull images & umoci to unpack them

Fixes: #3970
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2023-01-25 11:37:56 +00:00
Megan Wright
36cd741943 CCv0: Merge main into CCv0 branch
Merge remote-tracking branch 'upstream/main' into CCv0

Fixes: #6126
Signed-off-by: Megan Wright megan.wright@ibm.com
2023-01-25 11:23:18 +00:00
Greg Kurz
39fe4a4b6f runtime: Collect QEMU's stderr
LaunchQemu now connects a pipe to QEMU's stderr and makes it
usable by callers through a Go io.ReadCloser object. As
explained in [0], all messages should be read from the pipe
before calling cmd.Wait : introduce a LogAndWait helper to handle
that.

Fixes #5780

Signed-off-by: Greg Kurz <groug@kaod.org>
2023-01-24 23:09:17 +01:00
Greg Kurz
a5319c6be6 runtime: Start QEMU undaemonized
QEMU has always been started daemonized since the beginning. I
could not find any justification for that though, but it certainly
introduces a problem : QEMU stops logging errors when started this
way, which isn't accaptable from a support standpoint. The QEMU
community discourages the use of -daemonize ; mostly because
libvirt, QEMU's primary consummer, doesn't use this option and
prefers getting errors from QEMU's stderr through a pipe in order
to enforce rollover.

Now that virtcontainers knows how to start QEMU with a pre-
established QMP connection, let's start QEMU without -daemonize.
This requires to handle the reaping of QEMU when it terminates.
Since cmd.Wait() is blocking, call it from a goroutine.

Signed-off-by: Greg Kurz <groug@kaod.org>
2023-01-24 23:09:11 +01:00
Greg Kurz
bf4e3a618f runtime: Launch QEMU with cmd.Start()
LaunchCustomQemu() currently starts QEMU with cmd.Run() which is
supposed to block until the child process terminates. This assumes
that QEMU daemonizes itself, otherwise LaunchCustomQemu() would
block forever. The virtcontainers package indeed enables the
Daemonize knob in the configuration but having such an implicit
dependency on a supposedly configurable setting is ugly and fragile.

cmd.Run() is :

func (c *Cmd) Run() error {
	if err := c.Start(); err != nil {
		return err
	}
	return c.Wait()
}

Let's open-code this : govmm calls cmd.Start() and returns the
cmd to virtcontainers which calls cmd.Wait().

If QEMU doesn't start, e.g. missing binary, there won't be any
errors to collect from QEMU output. Just drop these lines in govmm.
Similarily there won't be any log file to read from in virtcontainers.
Drop that as well.

Signed-off-by: Greg Kurz <groug@kaod.org>
2023-01-24 23:09:11 +01:00
Greg Kurz
8a1723a5cb runtime: Pre-establish the QMP connection
Running QEMU daemonized ensures that the QMP socket is ready to
accept connections when LaunchQemu() returns. In order to be
able to run QEMU undaemonized, let's handle that part upfront.
Create a listener socket and connect to it. Pass the listener
to QEMU and pass the connected socket to QMP : this ensures
that we cannot fail to establish QMP connection and that we
can detect if QEMU exits before accepting the connection.
This is basically what libvirt does.

Signed-off-by: Greg Kurz <groug@kaod.org>
2023-01-24 23:09:11 +01:00
Greg Kurz
8a4f08cb0f govmm: Optionally pass QMP listener to QEMU
QEMU's -qmp option can be passed the file descriptor of a socket that
is already in listening mode. This is done with by passing `fd=XXX`
to `-qmp` instead of a path. Note that these two options are mutually
exclusive : QEMU errors out if both are passed, so we check that as
well in the validation function.

While here add the `path=` stanza in the path based case for clarity.

Signed-off-by: Greg Kurz <groug@kaod.org>
2023-01-24 23:08:48 +01:00
Unmesh Deodhar
32a6bf570a cache_components: Adding caching capability for SEV ovmf
These changed will be consumed by SEV firmware caching job in the CI. This will help in reducing the CI runtime.

Fixes: #6119

Signed-off-by: Unmesh Deodhar <udeodhar@amd.com>
2023-01-24 15:00:18 -06:00