Commit Graph

5373 Commits

Author SHA1 Message Date
James O. D. Hunt
8334d90979 CI: Add setup function to doc test script
Create a `setup()` function in the test script used to test
the install documents.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-10-25 16:28:22 +01:00
James O. D. Hunt
e74c431d7c CI: Refactor check_install_guides()
Rework the logic in `check_install_docs()` to make the intention
clearer and support adding additional tests.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-10-25 16:28:22 +01:00
James O. D. Hunt
d21eaaf9e8 CI: Rename+cleanup install doc test function
Rename the `check_install_guides()` function to `check_install_docs()`
and clean up:

- Improve messages.
- Add more braces around variables.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-10-25 16:28:22 +01:00
James O. D. Hunt
3d08ccd6db CI: Fold long Travis check line
Folded the overly-long Travis check line in `check_install_guides()`.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-10-25 16:28:22 +01:00
James O. D. Hunt
f4351e4324 CI: Make info() variable local
Make the variable in the `info()` function a `local` one.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-10-25 16:28:22 +01:00
James O. D. Hunt
7dba230a1c docs: Add instructions to run the kata-doc-to-script generated scripts
Update the `kata-doc-to-script` install document to actually execute the
generated scripts, allowing the entire installation to be tested by the CI.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-10-25 16:28:19 +01:00
James O. D. Hunt
bdec513ca4
Merge pull request #189 from ygefen/doc-patch
docs: Fix link in README
2018-10-25 10:41:37 +01:00
Sebastien Boeuf
c7a9e454ac
Merge pull request #827 from amshinde/tc-filtering
network: Use tc filtering rules in bridge mode
2018-10-24 15:21:54 -07:00
Archana Shinde
c38792ef9e config: Add documentation for tcfilter in configuration.toml
Document this mode for users to be able to use it.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2018-10-24 13:38:57 -07:00
Archana Shinde
17be8e37f5 network: Introduce constants for the network model strings
Introduce constants for the network model strings, so as to
avoid using the strings directly at multiple places.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2018-10-24 13:37:54 -07:00
Yonatan Gefen
06437bb51e docs: Fix link in README
Correct rootfs builder link in the image builder README.

Fixes #185.

Signed-off-by: Yonatan Gefen <yoni.gefen@gmail.com>
2018-10-24 13:52:00 -04:00
Archana Shinde
5da973d465 test: Add test to verify tc redirect
The test verifies tc filter setup by creating a test veth interface.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2018-10-24 10:46:02 -07:00
Archana Shinde
e20dbd04e0 network: Use tc redirect filter to redirect traffic to the VM
Introduce a new mode that uses tc filters to redirect traffic from
the network interface created by the network plugin to a
tap interface that we connect to the VM.
This mode will help support ipvlan as well.

Fixes #144

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2018-10-24 10:46:00 -07:00
James O. D. Hunt
67982e7a0f docs: Make "Scripted" installation method executable
Converted the plain code blocks in
`install/installing-with-kata-doc-to-script.md` to bash code blocks so
that they are executable by... `kata-doc-to-script.sh`.

Also, removed the backslashes to let github render scroll bars for
consistency with other docs.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-10-24 09:19:03 +01:00
zhangwei_cs
5a8b738818
Merge pull request #733 from caoruidong/qemu-ns
cli: add configuration option to use or not use host netns
2018-10-24 11:35:33 +08:00
James O. D. Hunt
0215c83e36
Merge pull request #282 from jodh-intel/ci-set-travis-golang-version
CI: Pin Travis golang version
2018-10-23 17:31:54 +01:00
James O. D. Hunt
b40b9ff13d CI: Pin Travis golang version
Travis appears to be providing a version of golang that is too old for
https://mvdan.cc/xurls/cmd/xurls, which is used by the CI scripts in the
tests repo.

See:

- https://github.com/kata-containers/runtime/pull/744
- https://github.com/kata-containers/tests/pull/843#issuecomment-432297737

Required adding a NOP makefile to avoid Travis from trying to build
this repo using `go`.

Fixes #281.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-10-23 17:25:20 +01:00
Jose Carlos Venegas Munoz
59f29270ee
Merge pull request #184 from marcov/move-config
tests: get config from distro-specific config.sh
2018-10-23 09:56:47 -05:00
James O. D. Hunt
2a54ac9830
Merge pull request #277 from jodh-intel/improve-readme
docs: Improve table in install README
2018-10-23 15:38:31 +01:00
Graham Whaley
f3ef220dce
Merge pull request #744 from jodh-intel/update-to-golang-1.10.4
versions: Update golang to 1.10.4
2018-10-23 14:56:11 +01:00
James O. D. Hunt
526d55b4af versions: Update golang to 1.10.4
Move to golang version 1.10.4 -- the oldest stable golang release at the
time of writing -- since golang 1.10+ is needed to make namespace
handling safe.

Re-ordered a couple of structs (moved `sync.WaitGroup` fields) to keep
the `maligned` linter happy. Previously:

``
virtcontainers/pkg/mock/cc_proxy_mock.go:24:18⚠️ struct of size 160 could be 152 (maligned)
virtcontainers/monitor.go:15:14⚠️ struct of size 80 could be 72 (maligned)
```

See:

- https://github.com/golang/go/issues/20676
- 2595fe7fb6

Also bumped `languages.golang.meta.newest-version` to golang version
1.11, which is the newest stable release at the time of writing.

Fixes #148.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-10-23 14:20:12 +01:00
James O. D. Hunt
62992f5485 versions: Update cri containerd version for golang 1.10.2 fix
Updated `externals.cri-containerd.version` in `versions.yaml` to the
newest version that includes the fix for building on golang 1.10.2:

- 8b0d53c09c

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-10-23 14:20:09 +01:00
Graham Whaley
ad911576a7
Merge pull request #279 from marcov/fix-kata-manager
install: clean instructions for kata-manager
2018-10-23 09:51:40 +01:00
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