Commit Graph

5116 Commits

Author SHA1 Message Date
Julio Montes
1de9bc0fa7 snap: reimplement snapcraft.yaml to support kata 2.0
Add snap package for 2.0

fixes #666

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-09-03 12:13:34 -05:00
Julio Montes
85642c328d snap: move snapcraft.yaml to the right place
In order to use a build systemd like launchpad, the snapcraft.yaml file
must be in the root directory of the project or under the `snap`
directory, that way launchpad detects that this project can be build
using the `snapcraft` command

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-09-03 08:09:05 -05:00
Julio Montes
c7745a3350
Merge pull request #662 from dgibson/fix611
drivers: Correct isPCIeDevice logic
2020-09-03 08:06:23 -05:00
Peng Tao
60ea0a5c37
Merge pull request #659 from Jakob-Naucke/vfio-ap-doc
docs: Add documentation for VFIO-AP passthrough
2020-09-03 19:32:20 +08:00
Bo Chen
7e4673d542
Merge pull request #653 from devimc/2020-09-01/packaging/qemu5
[fwport-2.0] qemu: update build dependencies to support QEMU 5
2020-09-02 22:18:53 -07:00
David Gibson
92dfa4634b drivers: Correct isPCIeDevice logic
Currently, isPCIeDevice() attempts to determine if a (host) device is
PCI-Express capable by looking up its link speed via the PCI slots
information in sysfs.  This is a) complicated and b) wrong.  PCI-e
devices don't have to have slots information, so this frequently fails.

Instead determine if devices are PCI-e by checking for the presence of
PCIe extended configuration space by looking at the size of the "config"
file in sysfs.

Forward ported from 6bf93b23 in the Kata 1.x runtime repository.

Fixes: #611

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2020-09-03 14:32:00 +10:00
Julio Montes
8666e01e11 qemu/default-configs: update default-config for QEMU 5
Disable the following IPMI configs, since they are not needed
for kata containers and fixes the snap job in launchpad

CONFIG_PCI_IPMI_KCS
CONFIG_PCI_IPMI_BT
CONFIG_IPMI_SSIF

fixes #581

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-09-02 11:58:38 -05:00
Julio Montes
2d12da8ed0 qemu: update default-configs
Update QEMU x86_64 default config to support QEMU 5

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-09-02 11:58:35 -05:00
Jakob-Naucke
cf3ac9f72a
docs: Add documentation for VFIO-AP passthrough
Add guide on how to pass a VFIO-AP device, such as Crypto Express cards
on IBM Z mainframes, to a Kata container. Like the documentation for
VFIO-PCI, this was put in the virtcontainers README.

Fixes: #658

Signed-off-by: Jakob-Naucke <jakob.naucke@ibm.com>
2020-09-02 15:22:52 +02:00
Julio Montes
ae98ea450d obs-packaging: fix wait for obs
Reimplement the loop that waits for OBS. Look for the packages
that are still building, not for the repos.

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-09-01 13:58:18 -05:00
Julio Montes
f5b71d3455 qemu: update build dependencies to support QEMU 5
Add the following packages as build dependencies to build QEMU
5 in OBS and launchpad (snap)

* libselinux1
* libffi
* libmount
* libblkid
* python3

fixes #1075

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-09-01 13:58:09 -05:00
Julio Montes
c422d061cb
Merge pull request #629 from gvancuts/add-kata-acrn-runtime-docker
kata-deploy: add ACRN runtime to Docker configuration
2020-09-01 07:27:04 -05:00
Julio Montes
d20ea14c8a
Merge pull request #578 from Jakob-Naucke/vfio-ap-passthrough
runtime: Add support for VFIO-AP pass-through
2020-09-01 07:23:26 -05:00
Fupan Li
e429f79d36
Merge pull request #644 from devimc/2020-08-28/agent/updateCargoToml
agent: update Cargo files authors
2020-09-01 17:33:58 +08:00
Jakob-Naucke
1236e22475
runtime: Add support for VFIO-AP pass-through
Recognise when a device to be hot-plugged is an IBM Adjunct Processor
(AP) device and execute VFIO AP hot-plug accordingly. Includes unittest
for recognising and uses CCW for addDeviceToBridge in hotplugVFIODevice
if appropriate.

Fixes: #491

Signed-off-by: Jakob-Naucke <jakob.naucke@ibm.com>
Co-authored-by: Julio Montes <julio.montes@intel.com>
Reviewed-by: Alice Frosi <afrosi@redhat.com>
2020-09-01 10:41:49 +02:00
Fupan Li
8df06a046e
Merge pull request #418 from bergwolf/packaging
packaging: adjustment for 2.0 branch
2020-09-01 11:06:34 +08:00
Peng Tao
65970d3858 osbuilder: install-yq should not print on success
The caller might rely on the output to determine its failure.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-08-31 22:10:37 +08:00
Peng Tao
c624fa7469 osbuilder: install musl for aarch64
So that it can do musl static build.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-08-31 22:10:32 +08:00
Peng Tao
b24f2cb969 gitignore: ignore vscode directory
That is auto-generated by vscode and should be ignored.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-08-31 22:09:37 +08:00
Peng Tao
cf1b72d6c6 osbuilder: install rust before sourcing cargo env
Otherwise we cannot find it.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-08-31 22:09:37 +08:00
Peng Tao
7b5ab58689 packaging: fix kata-deploy yaml path
Should use the 2.0 directory structure.

Fixes: #547
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-08-31 22:09:37 +08:00
Peng Tao
76c18aa345 osbuilder: fix alpine agent build
Since we always build musl kata-agent, there is no need to build
it inside a musl container. We can just build on the host and then
copy the binary to the target rootfs.

There are still a lot to clean up and it should be made so for ALL
target distros instead of just alpine. But this is at least working
for alpine first.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-08-31 22:09:37 +08:00
Peng Tao
5216815d1c packaging: make build-kernel.sh work for 2.0
We do not need to clone packaging repository, nor apply
virtio_vsock as virtio-fs-dev has already included that fix.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-08-31 22:09:37 +08:00
Peng Tao
aa3fb4db28 packaging: make kata-deploy work for 2.0
We no longer need to deploy multiple repositories.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-08-31 22:09:37 +08:00
Peng Tao
86a6e0b3e7 packaging: fix build image scripts
We do not need to clone osbuilder anymore.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-08-31 22:09:37 +08:00
Peng Tao
ceebd06b64 release: add 2.0 release actions
Use a different action yaml file so that we do not affect the original
1.x release actions.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-08-31 22:09:37 +08:00
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
60245a83fa agent: update Cargo files authors
Anyone can collaborate in the Kata Containers project, so instead of
adding her/his name and email to the Cargo.toml files, use
`The Kata Containers community` as name and
`kata-dev@lists.katacontainers.io` as email.

fixes #643

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-08-31 08:47:10 -05: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
Geoffroy Van Cutsem
5b0e6f375b kata-deploy: add ACRN runtime to Docker configuration
Add an ACRN runtime ('kata-acrn') to the Docker configuration
('/etc/docker/daemon.json').

Fixes: #579
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2020-08-27 15:45:30 +02: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