Commit Graph

5088 Commits

Author SHA1 Message Date
Peng Tao
dadab1febf osbuilder: build rust agent by default
Since we only have the rust agent.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-08-31 22:09:37 +08:00
Peng Tao
1bd5825955 packaging: tag releases on kata-containers repo
As we do not need to tag other repositories any more.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-08-31 22:09:37 +08:00
Peng Tao
f56f68bf2f obs-packaging: adjust for building on kata-containers repo
As we do not need to build on other repositories any more.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-08-31 22:09:37 +08:00
Julio Montes
7b54ef69f9
Merge pull request #645 from lifupan/fix_epthemeral_mount
Fix epthemeral mount issue
2020-08-31 08:14:54 -05:00
Peng Tao
a145f22ddf
Merge pull request #615 from likebreath/disable_clh_seccomp
clh: Disable the 'seccomp' option temporarily
2020-08-31 18:34:36 +08:00
Peng Tao
66d3e4f727
Merge pull request #636 from huoqifeng/iommu_platform_forward_port
Subject: [PATCH] qemu: add annotations for iommu_platform for s390x v…
2020-08-31 17:40:24 +08:00
Peng Tao
66f308c6af
Merge pull request #618 from amshinde/update-virtiofs-docs
Foward-port :virtiofs: Update virtiofs docs
2020-08-31 17:29:28 +08:00
Peng Tao
4c328b3bb4
Merge pull request #617 from amshinde/2.0-kata-deploy-conf
Forward-port kata deploy conf
2020-08-31 17:28:50 +08:00
fupan.lfp
544219d9ad mount: fix the issue of epthemeral storage handler
For ephemeral storage handler, it should return an
empty string instead of the mount destination.

Fixes: #635

Signed-off-by: fupan.lfp <fupan.lfp@antfin.com>
2020-08-31 10:05:25 +08:00
fupan.lfp
fd8f3ee951 mount: add much more error info using chain_err
Make the return error  much more specifically by
chain much more error info.

Signed-off-by: fupan.lfp <fupan.lfp@antfin.com>
2020-08-31 10:05:12 +08:00
Julio Montes
be2f7e6ad9
Merge pull request #621 from jschintag/patch-1
initrd: Increase Alpine Version to 3.12
2020-08-28 12:05:00 -05:00
GabyCT
bc9c8ddf8e
Merge pull request #592 from GabyCT/topic/portyq
[forward port]: osbuilder: Update yq
2020-08-28 09:41:21 -05:00
James O. D. Hunt
bba8bcb340
Merge pull request #550 from jodh-intel/2.0-dev-agent-ctl-unix-socket-addr
tools: Add Unix socket support to agentl-ctl
2020-08-28 11:23:25 +01:00
James O. D. Hunt
10b1deb274 tools: Add Unix socket support to agentl-ctl
Rather than specifying the VSOCK address as two CLI options
(`--vsock-cid` and `--vsock-port`), allow the agent's ttRPC server
address to be specified to the `agent-ctl` tool using a single URI
`--server-address` CLI option. Since the ttrpc crate supports VSOCK and
UNIX schemes, this allows the tool to be run inside the VM by specifying
a UNIX address.

Fixes: #549.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2020-08-28 08:06:11 +01:00
Qi Feng Huo
f5598a1bc2 Subject: [PATCH] qemu: add annotations for iommu_platform
for s390x virtio devices

Add iommu_platform annotations for qemu for ccw,
other supported devices can also make use of that.

  Fixes #603

Signed-off-by: Qi Feng Huo <huoqif@cn.ibm.com>
2020-08-28 11:25:14 +08:00
Gabriela Cervantes
f879acd6e7 scripts: Foward port osbuilder scripts to update yq
This PR ports kata-containers/osbuilder#454 to kata 2.0

Fixes #576

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2020-08-27 15:00:03 -05:00
James O. D. Hunt
7be95b15eb tools: Simplify error handling in agent-ctl
Don't format the error string before passing to the `anyhow!()` macro
since it can format strings itself.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2020-08-27 15:50:14 +01:00
Jan Schintag
adf9ecc50c initrd: Increase Alpine Version to 3.12
Upgrade Alpine version from unsupported 3.7 to supported 3.12

Fixes #610

Signed-off-by: Jan Schintag <jan.schintag@de.ibm.com>
2020-08-27 15:14:39 +02:00
Julio Montes
ad7dce47ca
Merge pull request #625 from Tim-Zhang/update-makefile
agent: Add target optimize for Makefile
2020-08-27 07:58:50 -05:00
Tim Zhang
32b86a8d8b agent: Add target optimize for Makefile
Run `make optimize` will strip the binary.

Fixes: #626

Signed-off-by: Tim Zhang <tim@hyper.sh>
2020-08-27 18:44:27 +08:00
James O. D. Hunt
fd3b9ff9ed
Merge pull request #553 from jodh-intel/2.0-dev-agent-support-unix-address
server: Allow address to be specified
2020-08-27 11:43:34 +01:00
Fupan Li
f1fd00da78
Merge pull request #571 from eryugey/eguan/2.0-dev
rustjail: default permission of device node should be 666
2020-08-27 11:19:58 +08:00
Archana Shinde
26506d832e virtiofs: Update virtiofs docs
Update this document to get rid of any nemu mentions.
Added comment to mention that number of containers that can be
launched may be limited by the size of `/dev/shm`.

Fixes #572

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2020-08-26 15:18:25 -07:00
Archana Shinde
bee17d1c8f kata-deploy: Add containerd configuration to support kata annotations.
In case of containerd, not all annotations are passed down to the OCI
layer. We need to configure "pod_annotations" field for a runtime class.
This field is a list of annotations that can be passed by Kata as OCI
annotations. Add this as default configuration with kata-deploy.

Fixes: #594

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2020-08-26 15:06:06 -07:00
Archana Shinde
219f93ffad kata-deploy: Add default privileged_without_host_devices
For privieleged containers, all host devices are passed to
container. We have done work in crio and containerd to define a
scope of privileged in Kata to prevent this from happening.
Add this as the default as this falls under a best practice to follow
with Kata.
Note that if this flag has been already defined, then this change
does not override it.

Fixes #582

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2020-08-26 15:06:06 -07:00
Bo Chen
4b62fc165e clh: Disable the 'seccomp' option temporarily
We kept observing instabilities from CLH CI jobs periodically (kata
1.x). To separate the random failures caused by `seccomp` from other
failures, this patch disables the 'seccomp' option from clh in kata for
now. We will bring this option back after completing the 'seccomp'
filter lists based on Kata's CI workload. Details are tracked in the
following two issues:
https://github.com/kata-containers/runtime/issues/2899 and
https://github.com/kata-containers/runtime/issues/2901

We are facing the similar challenge to stabilize CI jobs related to
cloud-hypervisor in Kata 2.0. We are disabling the `seccomp` option here
for the same reason. Related issue:
https://github.com/kata-containers/tests/issues/2813

Fixes: #614

Signed-off-by: Bo Chen <chen.bo@intel.com>
2020-08-26 12:31:51 -07:00
Julio Montes
c14d44aba8
Merge pull request #568 from Jakob-Naucke/vfio-ap-fragment
packaging: Add VFIO-AP fragment for s390x
2020-08-26 07:59:09 -05:00
Eryu Guan
0a9b8e0ae2 rustjail: default permission of device node should be 666
Otherwise file owner in container may not read/write such devices.

Fixes: #570
Signed-off-by: Eryu Guan <eguan@linux.alibaba.com>
2020-08-26 20:43:12 +08:00
Fupan Li
6f2eab40d3
Merge pull request #555 from jodh-intel/2.0-dev-agent-fix-shutdown-crash
console: Fix crash if debug console disabled
2020-08-26 19:59:27 +08:00
Bin Liu
b4c105336e
Merge pull request #563 from bergwolf/guest-hooks
agent: support guest hooks
2020-08-26 17:36:32 +08:00
James O. D. Hunt
81644003eb server: Allow address to be specified
Allow the default (VSOCK) ttRPC server address to be changed using a new
`KATA_AGENT_SERVER_ADDR` environment variable (for testing and
debugging).

Fixes: #552.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2020-08-26 10:19:31 +01:00
Peng Tao
8e18cec804
Merge pull request #504 from cmaf/unit-virtcontainers-utils-utils
virtcontainers: Add to utils unit tests
2020-08-26 13:52:05 +08:00
Peng Tao
5fbac0a380
Merge pull request #556 from evanfoster/shutdown-agent
sandbox: Disconnect from agent after VM shutdown
2020-08-26 13:47:36 +08:00
Peng Tao
bb30759e4e agent: add guest hooks UT
To test the guest hooks implementation.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-08-26 13:35:01 +08:00
Peng Tao
095ebb8ca3 agent: fix OCI hook handling
We should call write_sync with proper arguments.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-08-26 11:18:02 +08:00
Peng Tao
03a4d107ba agent: support guest hooks
Scan guest hooks upon creating new sandbox and append
them to guest OCI spec before running containers.

Fixes: #485
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-08-26 11:18:02 +08:00
Peng Tao
e7bfeb418a agent: construct container bundle in tmpfs location
Save container spec under bundle path and bind mount container rootfs
under bundle path.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-08-26 11:18:02 +08:00
Jakob-Naucke
2ee40027e5
packaging: Add VFIO-AP fragment for s390x
Add vfio-ap.conf to the s390 kernel config fragments, which includes
the necessary flags for passing an IBM Adjunct Processor (AP) device
over VFIO.

Fixes: #567

Signed-off-by: Jakob-Naucke <jakob.naucke@ibm.com>
Reviewed-by: alicefr <afrosi@redhat.com>
2020-08-25 17:10:35 +02:00
Julio Montes
60770f4629
Merge pull request #566 from Jakob-Naucke/revendor-govmm-vfio-ap
runtime: Re-vendor GoVMM for hotplugging IBM Adjunct Processor (AP) devices over VFIO
2020-08-25 08:46:25 -05:00
Julio Montes
e6757de2ac
Merge pull request #543 from likebreath/clh_backporting
clh: Port cloud-hypervisor related changes from kata-runtime
2020-08-25 08:42:03 -05:00
Jakob-Naucke
4c30b2554f
runtime: Re-vendor GoVMM for VFIO-AP support
This is a re-vendor of intel/govmm, with support for hot-plugging IBM
Adjunct Processor (AP) devices over VFIO. This is necessary for
enabling AP device pass-through in Kata (see #491).

    39c372a Add support for hot-plugging IBM VFIO-AP devices
    f5bdd53 travis: disable amd64 jobs
    1af1c0d github: enable github actions
    4831c6e travis: Run coveralls after success
    cf0f05d qemu: add iommu_platform knob for qemuParams
    175ac49 typo fix

Fixes: #565

Signed-off-by: Jakob-Naucke <jakob.naucke@ibm.com>
2020-08-25 10:35:11 +02:00
Evan Foster
282bff9f94 sandbox: Disconnect from agent after VM shutdown
When a one-shot pod dies in CRI-O, the shimv2 process isn't killed until
the pod is actually deleted, even though the VM is shut down. In this
case, the shim appears to busyloop when attempting to talk to the (now
dead) agent via VSOCK. To address this, we disconnect from the agent
after the VM is shut down.

This is especially catastrophic for one-shot pods that may persist for
hours or days, but it also applies to any shimv2 pod where Kata is
configured to use VSOCK for communication.

See github.com/kata-containers/runtime#2719 for details.
Fixes #2719

Signed-off-by: Evan Foster <efoster@adobe.com>
2020-08-24 09:53:28 -06:00
Salvador Fuentes
29aae01779
Merge pull request #559 from snir911/doc
docs: remove outdated dependencies from agent docs
2020-08-24 10:19:29 -05:00
Julio Montes
5b707234d8
Merge pull request #511 from Jakob-Naucke/forward-s390x-packaging
[forward-port] packaging: s390x kernel config fragments
2020-08-24 09:44:04 -05:00
Alice Frosi
9f1a3d15db
kernel: add s390x fragment
Support for s390x kernel fragments.

Fixes: #1041

Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
Signed-off-by: Jakob-Naucke <jakob.naucke@ibm.com>
2020-08-24 14:36:01 +02:00
Alice Frosi
f13506163b
kernel: config CONFIG_GENERIC_MSI_IRQ_DOMAIN
Moved CONFIG_GENERIC_MSI_IRQ_DOMAIN in arch base.conf.
The config is not selected for s390x

Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
Signed-off-by: Jakob-Naucke <jakob.naucke@ibm.com>
2020-08-24 14:36:01 +02:00
Alice Frosi
b67325c3ac
kernel: add missing configs
Some kernel configs need additional dependencies:
  - CONFIG_NO_HZ depends on
      CONFIG_GENERIC_CLOCKEVENTS
  - CONFIG_CGROUP_PERF depends on
      CONFIG_PERF_EVENTS
        CONFIG_HAVE_PERF_EVENTS
  - CONFIG_BLK_DEV_LOOP depends on
      CONFIG_BLK_DEV
        CONFIG_BLOCK

Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
Signed-off-by: Jakob-Naucke <jakob.naucke@ibm.com>
2020-08-24 14:36:00 +02:00
Alice Frosi
454dd85432
kernel: config CONFIG_ PARAVIRT
Moved CONFIG_ PARAVIRT to each arch base.conf.

CONFIG_ PARAVIRT only defined in x86, arm64, arm in arch/$arch/Kconfig.

Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
Signed-off-by: Jakob-Naucke <jakob.naucke@ibm.com>
2020-08-24 14:36:00 +02:00
Alice Frosi
62b45064d4
kernel: config CONFIG_NO_HZ_FULL
Moved CONFIG_NO_HZ_FULL config to each arch base.conf.

The config CONFIG_NO_HZ_FULL depends on CONFIG_HAVE_CONTEXT_TRACKING.
See https://github.com/torvalds/linux/blob/
a811c1fa0a02c062555b54651065899437bacdbe/kernel/time/Kconfig#L96

The context tracking is not supported on s390x yet.
See https://github.com/torvalds/linux/blob/
a811c1fa0a02c062555b54651065899437bacdbe/Documentation/features/time/
context-tracking/arch-support.txt#L27

Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
Signed-off-by: Jakob-Naucke <jakob.naucke@ibm.com>
2020-08-24 14:35:59 +02:00
Alice Frosi
6dca74ba72
kernel: moved acpi hotplug config
Moved:
---
CONFIG_HOTPLUG_PCI_ACPI=y
CONFIG_PNPACPI=y
---
from hotplug to acpi.
In this way, it is possible to skip these config if the acpi feature is
not supported.

Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
Signed-off-by: Jakob-Naucke <jakob.naucke@ibm.com>
2020-08-24 14:35:59 +02:00