Commit Graph

2214 Commits

Author SHA1 Message Date
James O. D. Hunt
53698c166b CI: Use central go test script
Don't use a copy of the go test script, use the central version for
consistency with the other repos.

Fixes #125.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-03-28 16:53:13 +01:00
Peng Tao
01f7e46984
Merge pull request #98 from bergwolf/initrd
support to boot guest with an initrd image
2018-03-28 19:04:14 +08:00
James O. D. Hunt
4ac5a6ad4d
Merge pull request #112 from jodh-intel/improve-readme
docs: Improve the README
2018-03-28 08:47:22 +01:00
James O. D. Hunt
85865d4c4f docs: Improve the README
Add in details to the `README`.

Fixes #111.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-03-27 17:24:35 +01:00
James O. D. Hunt
4d6e9c9f68
Merge pull request #114 from jodh-intel/add-version-database
versions: Add versions database
2018-03-27 15:04:02 +01:00
James O. D. Hunt
a7c7f92103 versions: Add versions database
Add a YAML format database that is the equivalent of the Clear
Containers `versions.txt` file [1].

The file defines the versions of important non-golang dependencies used
by this and other Kata repositories particularly for testing and packaging.

Defining all version details centrally in this file avoids duplication
and "bit-rot" when versions need to be changed.

[1] - https://github.com/clearcontainers/runtime/blob/master/versions.txt

Fixes #11.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-03-27 11:36:23 +01:00
Peng Tao
423e86405e qemu: refector createPod()
To fix CI complains:
virtcontainers/qemu.go:248:⚠️ cyclomatic complexity 18 of
function (*qemu).createPod() is high (> 15) (gocyclo)

Signed-off-by: Peng Tao <bergwolf@gmail.com>
2018-03-27 15:58:41 +08:00
Peng Tao
8c5fb45f99 qemu: only set systemd related kernel parameters when needed
When we use initrd based booting, there is no systemd to be configured.

Signed-off-by: Peng Tao <bergwolf@gmail.com>
2018-03-27 15:58:41 +08:00
Peng Tao
38af66ca39 cli: only set systemd related kernel parameters when needed
When we install agent as init process in initrd based boot,
there is no systemd to be configured.

Signed-off-by: Peng Tao <bergwolf@gmail.com>
2018-03-27 15:58:41 +08:00
Peng Tao
463e6dee0b qemu: append kernel root parameters iff root image is provided
For initrd based boot, we do not need the root parameters.

Signed-off-by: Peng Tao <bergwolf@gmail.com>
2018-03-27 15:58:41 +08:00
Peng Tao
21343d7d71 cli: add initrd info to kata-env
Show the configured hypervisor initrd setting.

Signed-off-by: Peng Tao <bergwolf@gmail.com>
2018-03-27 15:58:41 +08:00
Peng Tao
19c3555412 cli: add hypervisor initrd config option
Add `initrd=[path]` option to configuration.toml and use it to set
the HypervisorConfig.InitrdPath option.

The default value of hypervisor image option is removed since we want
to allow it to be unset. For the same reason, there is no default value
for hypervisor initrd option either.

Signed-off-by: Peng Tao <bergwolf@gmail.com>
2018-03-27 15:58:41 +08:00
Peng Tao
4f57b65147 hypervisor: add initrd image support
If an initrd image is configured in HypervisorConfig or passed in by
annotations, append it to qemu command line arguments.

Fixes: #97

Signed-off-by: Peng Tao <bergwolf@gmail.com>
2018-03-27 15:58:41 +08:00
Peng Tao
991fe81dff vendor: update govmm package
To include support for qemu initrd config.

Signed-off-by: Peng Tao <bergwolf@gmail.com>
2018-03-27 15:58:41 +08:00
James O. D. Hunt
7b0c2d1670
Merge pull request #117 from devimc/vfio/hotplug
virtcontainers: vfio: add support for hot plugging VFIO devices
2018-03-27 08:28:47 +01:00
Julio Montes
249945f749 virtcontainers: pod: remove cold plug support
All devices are hot plugged in the VM, hence cold plug
support is no more needed.

Signed-off-by: Julio Montes <julio.montes@intel.com>
2018-03-26 15:32:01 -06:00
Julio Montes
47edcb3fec virtcontainers: vfio: add support for hot plugging VFIO devices
With this patch VFIO devices are hot plugged in the VM, that means
no more cold plug in kata containers.

fixes #85

Signed-off-by: Julio Montes <julio.montes@intel.com>
2018-03-26 15:32:01 -06:00
Peng Tao
184662416d
Merge pull request #109 from bergwolf/githooks
Makefile: remove git hooks
2018-03-24 11:34:37 +08:00
Peng Tao
ce755056f3
Merge pull request #107 from bergwolf/gitignore
gitignore: merge gitignore files
2018-03-24 11:32:56 +08:00
James O. D. Hunt
057bbf0dc4
Merge pull request #105 from bergwolf/ci
CI: add go_import_path
2018-03-23 09:47:38 +00:00
Peng Tao
003313c0f1
Merge pull request #102 from jodh-intel/update-data-collection-script
Update data collection script based on review feedback
2018-03-23 17:41:56 +08:00
Peng Tao
16b30c2838 CI: add go_import_path
So that we can test in personal travis setup.

Fixes: #104

Signed-off-by: Peng Tao <bergwolf@gmail.com>
2018-03-23 17:31:42 +08:00
Peng Tao
4bca929ea7 gitignore: merge gitignore files
Move cli/.gitignore and virtcontainers/.gitignore to top dir.

Fixes: #106

Signed-off-by: Peng Tao <bergwolf@gmail.com>
2018-03-23 17:09:54 +08:00
Peng Tao
a679fe9540 Makefile: remove git hooks
They only exist to remove the generated file `cli/generated.go` but the
removal is unnecessary because:
1. it is ignored in .gitignore
2. it get rebuilt every time when we run `make`

Fixes: #108

Signed-off-by: Peng Tao <bergwolf@gmail.com>
2018-03-23 16:50:54 +08:00
Julio Montes
53441e967a
Merge pull request #100 from jodh-intel/pullapprove-add-doc-team
CI: Add doc team to pullapprove config
2018-03-22 12:21:05 -05:00
James O. D. Hunt
a938045d1c scripts: Make collect script hypervisor architecture agnostic
Don't hard-code the architecture when looking for hypervisor packages.

Fixes #101.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-03-22 16:05:12 +00:00
James O. D. Hunt
a20b8d2175 scripts: Collect script should consider Kata images only
Fix bug where collect script was looking for Clear Containers images
rather than Kata Containers ones.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-03-22 16:05:11 +00:00
James O. D. Hunt
a363ed8b6e scripts: Make collect script consider other runtimes
Look for other runtime packages (Clear Containers and `runv`-based) in
data collection script.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-03-22 16:05:09 +00:00
James O. D. Hunt
adf7b536cb
Merge pull request #93 from jodh-intel/add-data-collection-script
scripts: Add data collection script
2018-03-22 15:52:55 +00:00
James O. D. Hunt
2d53b792b6 CI: Add doc team to pullapprove config
Add the standard doc team config to the pullapprove config file.

Fixes #99.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-03-22 15:49:27 +00:00
Sebastien Boeuf
4d5dde9b6a
Merge pull request #96 from grahamwhaley/20180322_ci_overridable
ci: allow path to tests repo to be over-wridden
2018-03-22 08:24:52 -07:00
Graham whaley
4a47a1ba50 ci: allow path to tests repo to be over-wridden
The github path to the tests repo is hard wired in lib.sh.
This makes it difficult to test any test repo WIP, as it ends
up calling back to the main repo.
Fix by using any value already set, and only setting to the main
repo if unset.

Fixes: #95

Signed-off-by: Graham whaley <graham.whaley@intel.com>
2018-03-22 14:38:45 +00:00
James O. D. Hunt
f93b6d2dd1 github: Add issue template
Add a template that will offer guidance for when users visit the
following URL:

- https://github.com/clearcontainers/runtime/issues/new

Crucially, the template asks the users to run the
`kata-collect-data.sh` script and paste the output direct into the
issue.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-03-22 13:56:43 +00:00
James O. D. Hunt
a521c33537 scripts: Add data collection script
Add a data collection script that can be run by users and its output
pasted directly into a github issue.

The script is designed to make diagnosing issues as easy as possible
and its output provides a summary of a Kata Containers system
including:

- Versions of all components.
- Details of container managers.
- Errors found in the system journal.

Fixes #80.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-03-22 13:56:40 +00:00
Peng Tao
1961d724cf
Merge pull request #89 from jodh-intel/restructure-build-system
build: Move CLI makefile to top level
2018-03-22 20:19:22 +08:00
James O. D. Hunt
ea4050ee2d git: Add runtime to gitignore
Hide `kata-runtime` from `git status` by adding to `.gitignore`.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-03-22 11:16:08 +00:00
James O. D. Hunt
3c7318dbbd build: Move CLI makefile to top level
Merge `cli/Makefile` with the top level `Makefile`.

Also includes a Travis config update.

Fixes #88.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-03-22 11:16:06 +00:00
Lai Jiangshan
1923361bcd
Merge pull request #65 from sboeuf/remove_submodules
submodules: Remove cc-runtime and runv
2018-03-22 11:04:38 +08:00
Sebastien Boeuf
1a9ceb1278 submodules: Remove cc-runtime and runv
Both cc-runtime and runv git submodules can now be removed since
the new folder cli defines the OCI wrapper, and the kata API is
defined and implemented through the virtcontainers package in this
same repository.

Fixes #64

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2018-03-21 12:10:15 -07:00
Peng Tao
6d05197625
Merge pull request #68 from devimc/agent/onlineCPUs
virtcontainers: agent: use onlineCPUMem to online vCPUs
2018-03-21 10:42:25 +08:00
Julio Montes
397905f4ca
Merge pull request #83 from amshinde/remove-device-from-bridge
virtcontainers: qemu: Call removeDeviceFromBridge for virtio-blk
2018-03-20 13:38:39 -05:00
Sebastien Boeuf
0619b0e110
Merge pull request #79 from jodh-intel/simplify-toplevel-makefile
Simplify toplevel makefile
2018-03-20 11:03:45 -07:00
Archana Shinde
5f1bc49263 virtcontainers: qemu: Call removeDeviceFromBridge for virtio-blk
In case of virtio-block, we hotplug devices to a bridge.
We need to remove device from bridge while stopping a
container.

Fixes #82

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2018-03-20 10:47:02 -07:00
Sebastien Boeuf
c8e0c2cc85
Merge pull request #72 from jodh-intel/fix-lint-errors
Fix lint errors & get virtcontainers tests running
2018-03-20 10:38:04 -07:00
Sebastien Boeuf
4e86f5886b
Merge pull request #77 from jodh-intel/simplify-cli-makefile
build: Simplify CLI makefile
2018-03-20 08:35:47 -07:00
Julio Montes
0916bb6fe3 virtcontainers: agent: use onlineCPUMem to online vCPUs
After hot adding vCPUs in the POD, agent's funtion `onlineCPUMem`
must be called to request the agent to online the vCPUs

fixes #67

Signed-off-by: Julio Montes <julio.montes@intel.com>
2018-03-20 09:05:25 -06:00
James O. D. Hunt
2a564c4f4b build: Add a clean rule
Add missing `clean` rule.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-03-20 11:23:08 +00:00
James O. D. Hunt
661a6ae85a build: Simplify top-level makefile
Use `make -C $dir` for simplicity.

Fixes #78.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-03-20 11:21:21 +00:00
James O. D. Hunt
81795a9879 build: Fix whitespace
Remove extraneous whitespace and format `Makefile` more consistently.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-03-20 11:20:35 +00:00
James O. D. Hunt
092940ee8b build: Simplify CLI makefile
Now that the only build project is Kata, remove the remaining code to
support other projects and simplify.

Fixes #76.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-03-20 09:17:50 +00:00