Commit Graph

5350 Commits

Author SHA1 Message Date
Archana Shinde
31cf6fbe00 vfio: Change the way the driver is fetched
Instead of using ethtool for getting the driver for network
devices, use sysfs instead. This is because in case of virtio
devices, ethtool returns virtio-net instead of virtio-pci for
virtio network devices. We need to bind/unbind from virtio-pci
driver in case of virtio-net devices.

Fixes #612

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2018-10-22 18:19:58 -07:00
Ruidong Cao
7a5a57d50f cli: test: add unit test for kata-env and kata-check
Add unit test for `disable_new_netns`

Signed-off-by: Ruidong Cao <caoruidong@huawei.com>
2018-10-22 21:06:58 +08:00
Ruidong Cao
14e5437cae cli: add configuration option to use or not use host netns
If `disable_new_netns` set to true, create VM and shim processes in the host netns

Signed-off-by: Ruidong Cao <caoruidong@huawei.com>
2018-10-22 21:06:58 +08:00
Ruidong Cao
6935279beb network: add new NetInterworkingModel "none" and endpoint type TapEndpoint
This model is for not creating a new net ns for VM and directly
creating taps in the host net ns.

Signed-off-by: Ruidong Cao <caoruidong@huawei.com>
2018-10-22 21:06:58 +08:00
Ruidong Cao
f8f29622a4 virtcontainers: refactor hotplug qmp functions
Refactor these functions so differernt types of endpoints can use a unified
function to hotplug nics.

Fixes #731

Signed-off-by: Ruidong Cao <caoruidong@huawei.com>
2018-10-22 21:06:56 +08:00
Archana Shinde
40ee885e8e
Merge pull request #846 from amshinde/marshal-net-endpoints
network: Marshal BridgedMacvlanEndpoint and MacvtapEndpoint
2018-10-19 11:37:09 -07:00
Marco Vedovati
08d233e4f1 install: clean instructions for kata-manager
Use a one-line code block for the installation command, and document the
dry run option.

Fixes: #275

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
2018-10-19 19:50:55 +02:00
Archana Shinde
21d38e9948 network: Marshal BridgedMacvlanEndpoint and MacvtapEndpoint
These were skipped.
Fixes #842

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2018-10-19 09:29:24 -07:00
James O. D. Hunt
16379e3bc7 docs: Improve table in install README
Improvements to the table in the installation README:

- Fix the invalid link for the "Build from sources" option.

- Add column for "Packaged install" to make it clearer which
  options result in a distro-packed install.

- Tweaked the "Suggested for" column to make the use-case options
  clearer.

- Added detail for each use-case in a "Description" column.

Fixes #276.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-10-19 17:28:07 +01:00
James O. D. Hunt
30f2fbfb73 docs: Add more details to scripted install section
Add a little more information on the "Scripted Installation" section of
the install README.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-10-19 17:28:02 +01:00
James O. D. Hunt
c4fb842b8b docs: Fix install key URL
The URL for the public key used for package signing was incorrect.

See: https://github.com/kata-containers/tests/pull/825

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-10-19 16:31:26 +01:00
Peng Tao
32ef29bd18 factory: use customised deep compare
reflect.DeepEqual would return false when comparing nil map/slice with
empty map/slice. We would want to return success in such case, since it
is possible for upper layers to send these kind of configs.

Fixes: #844

Signed-off-by: Peng Tao <bergwolf@gmail.com>
2018-10-19 17:54:42 +08:00
Julio Montes
96ed56ec3f
Merge pull request #231 from Weichen81/master
kernel: configs: Disable IPv6-in-IPv4 tunnel in guest kernel for Arm64
2018-10-18 09:20:29 -05:00
Julio Montes
4c82d526ee
Merge pull request #832 from lifupan/fix_blk
device: fix the issue of passing wrong device address using virtio-blk
2018-10-18 09:12:01 -05:00
Marco Vedovati
962b7ee3d2 tests: get config from distro-specific config.sh
Move the test configuration in the distro-specific config.sh
file, for better control of what to include/exclude from
testing based on the test environment.
test_config.sh is still used to exclude specific distros from
being tested, when running tests in bulk.

Fixes: #182

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
2018-10-18 11:40:44 +02:00
James O. D. Hunt
b81131f4c0
Merge pull request #823 from jodh-intel/fix-default-bundle-path
create/run: Make bundle path default to cwd
2018-10-18 09:57:00 +01:00
Frank Cao
633f4567f3
Merge pull request #825 from jodh-intel/add-trace-to-remaining-api-funcs
virtcontainers: Add missing API trace calls
2018-10-18 16:53:30 +08:00
Graham Whaley
0a652a1ab8
Merge pull request #786 from linzichang/master
sandbox/virtcontainers: memory resource hotplug when create container.
2018-10-18 09:43:24 +01:00
Marco Vedovati
be3bea4325 rootfs.sh: add options to list and get test config
Add new options to rootfs.sh: -l prints the list of all distros,
-t retrieves a subset of the distro configuration from config.sh
for testing purpose.

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
2018-10-18 09:48:47 +02:00
Peng Tao
708007e42c
Merge pull request #830 from caoruidong/add-release
virtcontainers: Add missing API release calls
2018-10-18 15:24:26 +08:00
Wei Chen
1d993c0918 kernel: configs: Disable IPv6-in-IPv4 tunnel in guest kernel for Arm64
As discussed in issue #171 IPv6-in-IPv4 tunnel is useless in guest. So we
decide to disable the CONFIG_IPV6_SIT by default for Arm64.
Fixed #230

Signed-off-by: Wei Chen <wei.chen@arm.com>
2018-10-18 05:51:58 +00:00
Zichang Lin
36306e283c sandbox/virtcontainers: modify tests relate to memory hotplug.
Signed-off-by: Clare Chen <clare.chenhui@huawei.com>
Signed-off-by: Zichang Lin <linzichang@huawei.com>
2018-10-17 23:01:13 -04:00
Ruidong Cao
3f39d6e807 virtcontainers: Add missing API release calls
Add missing release sandbox calls to network related functions in
virtcontainers API.

Fixes #732.

Signed-off-by: Ruidong Cao <caoruidong@huawei.com>
2018-10-18 06:58:04 +08:00
Julio Montes
daf52dec57
Merge pull request #813 from sboeuf/romfile
qemu: Disable the default romfile used by virtio-pci
2018-10-17 15:12:57 -05:00
Archana Shinde
d37a2655b3
Merge pull request #227 from amshinde/disable-sit-ipv6
kernel: Disable CONFIG_IPV6_SIT
2018-10-17 09:17:36 -07:00
fupan
b72a3cdcce device: fix the issue of passing wrong device address using virtio-blk
Kata agent expects the pci address to be passed and not the
virtPath in guest.

Fixes: #831

Signed-off-by: fupan <lifupan@gmail.com>
2018-10-17 20:15:34 +08:00
James O. D. Hunt
ee9275fedb virtcontainers: Add missing API trace calls
Add missing trace calls to remaining public virtcontainers API
functions.

Fixes #824.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-10-17 11:34:43 +01:00
James O. D. Hunt
8831245e30 create/run: Make bundle path default to cwd
The bundle path was documented as defaulting to the current directory
but was not being set to that value if not explicitly specified.

Also moved factory creation code to a new `handleFactory()` function to
avoid cyclomatic complexity issues.

Fixes #821.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-10-17 11:34:16 +01:00
Sebastien Boeuf
0ae5b142a6 qemu: Disable the default romfile used by virtio-pci
As we try to make sure we don't pull unneeded dependency when using
QEMU or NEMU as the hypervisor, and because SeaBIOS and OVMF firmware
already handle what's done by the default efi-virtio.rom binary, this
commit gets rid of this dependency by providing a default empty one.

Fixes #812

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2018-10-16 18:29:49 -07:00
Sebastien Boeuf
6f0873a2c3 vendor: Update govmm vendoring
Shortlog:

9c819db qemu: Fix virtio-net-pci QMP command
7fdfc6a qemu: Add support for romfile option
e74de3c Update guidelines on security issue reporting
ec83abe qemu: Add virtio-balloon device suppport.
4697078 qemu: Show full path to qemu binary at launch time

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2018-10-16 18:29:40 -07:00
James O. D. Hunt
eee4f44ed0
Merge pull request #264 from marcov/refactor-install
install: Refactor installation instructions
2018-10-16 13:19:16 +01:00
Peng Tao
8cfb06f1a9 kata-check: optionally require kvm-intel unrestricted_guest
We have optionally handled it in kernel parameter in
genericArchKernelParamHandler but kata-check still forcely require it to
be present. Let's only require it when running on baremetal.

Signed-off-by: Peng Tao <bergwolf@gmail.com>
2018-10-16 16:57:01 +08:00
James O. D. Hunt
a50a7c2759
Merge pull request #229 from Weichen81/master
kernel: configs: Add EFI support for Arm64
2018-10-16 09:39:42 +01:00
James O. D. Hunt
4ee1e26813
Merge pull request #225 from nitkon/master
ppc64le: Fix linux-container OBS packaging
2018-10-16 09:38:01 +01:00
Peng Tao
acbcde3fee kata-check: do not require nested vt
We do not really require nested VT to run kata containers. Let's not
depend on it being there.

Fixes: #820

Signed-off-by: Peng Tao <bergwolf@gmail.com>
2018-10-16 15:31:43 +08:00
Peng Tao
ea9ecd7386 kata-check: modprobe missing kernel modules
So that we can possibly verify its parameter later on.

Signed-off-by: Peng Tao <bergwolf@gmail.com>
2018-10-16 11:43:59 +08:00
Wei Chen
b2ac6c5d60 kernel: configs: Add EFI support for Arm64
As x86_64 has updated the guest kernel to enable EFI support for NEMU,
because OVMF that is used by NEMU is an EFI firmware. Although the
NEMU is not ready for Arm64, we'd better to enable EFI support in
kernel to keep sync with x86_64.

Fixes #228

Signed-off-by: Wei Chen <wei.chen@arm.com>
2018-10-16 03:12:13 +00:00
Archana Shinde
fd0ffc0d75 kernel: Disable CONFIG_IPV6_SIT
This is not required by default.
Fixes #171

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2018-10-15 13:31:30 -07:00
Julio Montes
dec67ee7a4
Merge pull request #221 from sboeuf/add_EFI
kernel: configs: Add EFI support
2018-10-15 15:25:24 -05:00
Nitesh Konkar
8a364b0784 ppc64le: Fix linux-container OBS packaging
Linux-container OBS packaging for ppc64le
fails as the spec file is x86 specific for
kernel build and install process.

Fixes: #224

Signed-off-by: Nitesh Konkar niteshkonkar@in.ibm.com
2018-10-15 23:15:13 +05:30
Archana Shinde
d00742f43f
Merge pull request #811 from amshinde/network_refactor
Refactor network.go
2018-10-15 09:07:16 -07:00
James O. D. Hunt
323073008c
Merge pull request #269 from nitkon/patch-1
Developer-Guide:  Update kernel installation doc
2018-10-15 16:47:13 +01:00
Clare Chen
14f480af8f sandbox/virtcontainers: combine addResources and updateResources
addResources is just a special case of updateResources. Combine the shared codes
so that we do not maintain the two pieces of identical code.

Signed-off-by: Clare Chen <clare.chenhui@huawei.com>
2018-10-15 10:39:08 +08:00
Zichang Lin
8e2ee686bd sandbox/virtcontainers: memory resource hotplug when create container.
When create sandbox, we setup a sandbox of 2048M base memory, and
then hotplug memory that is needed for every new container. And
we change the unit of c.config.Resources.Mem from MiB to Byte in
order to prevent the 4095B < memory < 1MiB from being lost.

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

Fixes #400

Signed-off-by: Clare Chen <clare.chenhui@huawei.com>
Signed-off-by: Zichang Lin <linzichang@huawei.com>
2018-10-15 10:37:29 +08:00
nitkon
4296b457d1
Developer-Guide: Update kernel installation doc
evged is required to make Kata work with NEMU.
Apply the kernel patch when building kernel.

Fixes: #268

Signed-off-by: Nitesh Konkar niteshkonkar@in.ibm.com
2018-10-14 16:15:33 +05:30
Marco Vedovati
cc046495e5 install: Refactor installation instructions
Refactor installation instruction to minimize duplicate content,
to document package source verification process, and to remove
some of the typos.

Fixes: #263

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
2018-10-12 15:30:16 +02:00
James O. D. Hunt
82233b3e9b
Merge pull request #266 from sboeuf/kata_nemu
docs: Add a quickstart about Kata Containers and NEMU
2018-10-12 07:23:44 +01:00
Sebastien Boeuf
7532532ae9 kernel: configs: Add EFI support
This commit bumps the default config from 4.14.49 to 4.14.67 first,
and then enables the support for EFI firmware as OVMF used by NEMU
is an EFI firmware.

Fixes #220

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2018-10-11 15:24:11 -07:00
Archana Shinde
b04691e229 network: Collapse log calls for endpoint Attach and Detach
Log Attach, Detach, HotAttach and HotDetach at a single
location.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2018-10-11 14:45:57 -07:00
Archana Shinde
ab15498bdf network: Explicitly check for veth type
Explicitly check for "veth" intergace type while creating a
veth endpoint. Error out for unsupported network interfaces.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2018-10-11 14:45:57 -07:00