Commit Graph

5350 Commits

Author SHA1 Message Date
James O. D. Hunt
d35843d190 docs: Add license strategy doc
Add a brief document explaining that the project uses SPDX license
identifiers.

Fixes #58.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-04-19 17:40:03 +01:00
Julio Montes
1c7a02e73d
Merge pull request #130 from devimc/virtcontainers/ImplProcessList
virtcontainers: agent: implement kata agent processListContainer
2018-04-19 11:31:09 -05:00
James O. D. Hunt
a18753b2ff refactor: Remove duplicate variable
Some of the scripts had two variables to refer to the program name.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-04-19 16:00:37 +01:00
James O. D. Hunt
f3e89d38a9 refactor: Simplify enabling debug
Simplify the logic to enable debug and also enable debug as early as
possible.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-04-19 15:55:34 +01:00
zhangwei_cs
9dea2f835b
Merge pull request #235 from jodh-intel/add-spdx-header-to-config
config: Add SPDX license header to config file
2018-04-19 17:41:01 +08:00
James O. D. Hunt
e415efb0dd config: Add SPDX license header to config file
The config file is in TOML format which supports comments, so add the
license header to it.

Fixes #234.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-04-19 08:13:59 +01:00
Sebastien Boeuf
ea789dbab9
Merge pull request #207 from amshinde/msize-9p
Add configuration for 9p msize
2018-04-18 11:20:44 -07:00
Julio Montes
01f3f712ac virtcontainers: kata_agent: fix unit tests
add ListProcesses to gRPCProxy to make it compatible with AgentServiceServer.

Signed-off-by: Julio Montes <julio.montes@intel.com>
2018-04-18 10:40:39 -05:00
Julio Montes
11a0718b78 vendor: update kata agent
This new version of kata agent contains changes
to list the processes that are running inside the VM

Shortlog:
ff7eaa1 grpc: add unit test for ListProcesses
c394b63 mockcontainer: implement mockContainer
d208929 mockreaper: add unit tests
01bc953 grpc: implement ListProcesses

Signed-off-by: Julio Montes <julio.montes@intel.com>
2018-04-18 10:40:39 -05:00
Julio Montes
4fc974055d virtcontainers: agent: implement kata agent processListContainer
processListContainer is called by the ps command implementation to
list the processes running inside a containers, this patch implements
this function in the kata agent

fixes #129

Signed-off-by: Julio Montes <julio.montes@intel.com>
2018-04-18 10:40:39 -05:00
James O. D. Hunt
a85656b355
Merge pull request #231 from grahamwhaley/20180418_bc_SPDX
license: SPDX: update all vc files to use SPDX style
2018-04-18 15:06:04 +01:00
James O. D. Hunt
30663685ea
Merge pull request #226 from grahamwhaley/20180417_update_spdx
SPDX: update cli and arch files to use SPDX
2018-04-18 14:52:21 +01:00
Graham whaley
d6c3ec864b license: SPDX: update all vc files to use SPDX style
When imported, the vc files carried in the 'full style' apache
license text, but the standard for kata is to use SPDX style.
Update the relevant files to SPDX.

Fixes: #227

Signed-off-by: Graham whaley <graham.whaley@intel.com>
2018-04-18 13:43:15 +01:00
James O. D. Hunt
3e8400eee9 docs: Remove spec command limitation
Update the limitations document to remove the `spec` command limitation
(implemented on https://github.com/kata-containers/runtime/pull/196).

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-04-18 11:49:04 +01:00
James O. D. Hunt
4aa57d2e2c docs: Add links to README
Add links for the dev guide and limitations doc to the `README`.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-04-18 11:49:04 +01:00
James O. D. Hunt
6200d14e4a docs: Add limitations doc
Add the list of known limitations.

Fixes #31.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-04-18 11:49:01 +01:00
zhangwei_cs
fdadb041aa
Merge pull request #229 from jshachm/fix-pod-to-sandbox
runtime: fix codes misunderstanding after rename pod to sandbox
2018-04-18 16:16:17 +08:00
c00416947
a050c155b6 runtime: fix codes misunderstanding after rename pod to sandbox
After we rename pod to sandbox, still there are some codes left which
will cause some misunderstanding.Such as,`p` in short of `pod` left in
`sandbox.go`.So we need to channge it into `s` in short of `sandbox`.

Fixes:#230
Related: #200

Signed-off-by: Haomin Tsai <caihaomin@huawei.com>
2018-04-18 14:36:45 +08:00
Archana Shinde
5070fcf74d env: Add 9p msize to kata-env
Adding msize option for 9p as part of the hypervisor
info.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2018-04-17 12:15:23 -07:00
Archana Shinde
c06af5f5cd linter: make maligned linter happy
maligned linter was complaining about the size of the
struct. So move fields around to pack the struct better.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2018-04-17 12:15:23 -07:00
Archana Shinde
cc61ccf9e9 cli: 9p: Add toml configuration for 9p msize
Allows msize for 9p to be configured in the toml file.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2018-04-17 12:15:23 -07:00
Archana Shinde
3187a98188 9p: Add hypervisor configuration for 9p msize
This allows msize option for 9p to be configured and tuned.

Fixes #206

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2018-04-17 12:15:23 -07:00
James O. D. Hunt
a4b7e20457
Merge pull request #196 from caoruidong/add-spec
cli: implement spec command
2018-04-17 18:07:42 +01:00
Graham whaley
e757a592c1 SPDX: update cli and arch files to use SPDX
Many cli and arch files were using the 'older style' fairly full
Apache license text. The project standard is the shorter SPDX style.
Convert them over.

Fixes: #225

Signed-off-by: Graham whaley <graham.whaley@intel.com>
2018-04-17 17:30:44 +01:00
Ruidong Cao
b528ef292d cli: implement spec command
Add spec command that generates a basic config.json for kata.

fixes #188

Signed-off-by: Ruidong Cao <caoruidong@huawei.com>
Signed-off-by: Ruidong <caoruidong@huawei.com>
2018-04-17 14:38:00 +00:00
James O. D. Hunt
427b97c6f5
Merge pull request #224 from jcvenegas/fix-version
version: 0.0.1
2018-04-17 09:29:46 +01:00
Peng Tao
be6ef03407
Merge pull request #222 from chavafg/topic/cpu-resources
virtcontainers: Disable cpuset and cpumem
2018-04-17 08:16:17 +08:00
Jose Carlos Venegas Munoz
df74729c8c version: 0.0.1
Fix version to be the same to all kata projects.

Fixes: #223

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-04-16 18:53:47 -05:00
Salvador Fuentes
a608ff0e7d virtcontainers: Disable cpuset and cpumem
Disable cpuset and cpumem constraints as this is not properly
supported yet.

If we add "cpuset_cpus" and "cpuset_mems" to the container.json,
kata-runtime failed to start, so we need to disable them.

Fixes: #221.

Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
2018-04-16 16:52:37 -05:00
James O. D. Hunt
37ab12bcb4
Merge pull request #54 from nitkon/patch-3
dev-guide: Fix minor typos
2018-04-16 18:46:43 +01:00
Eric Ernst
ccc949f086
Merge pull request #50 from nitkon/patch-2
dev-guide: Conditionally add kata-runtime as suffix
2018-04-16 08:35:14 -07:00
Nitesh Konkar
727a16d468 dev-guide: Fix minor typos
Fix minor typos in the development guide.

Fixes #53.

Signed-off-by: Nitesh Konkar <niteshkonkar@in.ibm.com>
2018-04-16 20:58:22 +05:30
Eric Ernst
8088a62805
Merge pull request #209 from sboeuf/fix_unit_tests
virtcontainers: Fix unit tests
2018-04-16 07:24:40 -07:00
Eric Ernst
d03837fc9f
Merge pull request #45 from bergwolf/initrd
dev-guide: add guide to build and setup initrd image
2018-04-16 07:12:29 -07:00
Sebastien Boeuf
92577c635f virtcontainers: Properly end up go routines using channels
Those different files were all calling into a go routine that was
eventually reporting some result through a go channel. The problem
was the way those routine were implemented, as they were hanging
around forever. Indeed, nothing was actually listening to the channel
in some cases, and those routines never ended.

This was one of the problem detected by the fact that our unit tests
needed more time to pass because when they were all run in parallel,
the resources consumed by those routines were increasing the time
for other tests to complete.

Fixes #208

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2018-04-13 16:01:00 -07:00
Sebastien Boeuf
2c3cfed608 virtcontainers: mock: Properly end cc_proxy_mock goroutines
Because of the bad design of the cc_proxy_mock go routine, we were
leaving an infinite loop running into this go routine behind. This
was consuming a lot of resources and it was obviously slowing down
the tests being run in parallel. That's one of the reason we were
hitting the 10 seconds timeout when running go tests.

Fixes #208

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2018-04-13 15:58:08 -07:00
Sebastien Boeuf
feade98473 virtcontainers: Fix unit tests relying on noopShim
When using noopShim type from the unit tests, we were ending up
getting a PID 1000, and when checking if the shim was around, we
were always expecting the shim to be "not running", based on the
fact that the process was not there anymore. Unfortunately, this
was a very wrong assumption because we cannot control which PIDs
are running or not on the system. The way to simplify this is to
return a PID 0 in case of noopShim, processed as a special case
by the function waitForShim().

Fixes #208

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2018-04-13 15:22:22 -07:00
Archana Shinde
b4cd380293
Merge pull request #20 from jodh-intel/github-issue-template
github: Add issue template
2018-04-13 15:00:22 -07:00
Jose Carlos Venegas Munoz
d0085e8edf
Merge pull request #14 from jodh-intel/fix-config-hypervisor-script
scripts: Re-add tags for hypervisor config script
2018-04-13 12:03:34 -05:00
Eric Ernst
ad5669f781
Merge pull request #205 from devimc/constraints/CPU
virtcontainers: kata_agent: apply CPU constraints
2018-04-13 09:03:19 -07:00
Julio Montes
0f9defd6e2
Merge pull request #91 from devimc/cpu/fixRaceCondition
virtcontainers: agent: fix CPU hot plug race condition
2018-04-13 10:04:33 -05:00
Julio Montes
f88086fcfa
Merge pull request #183 from chavafg/topic/update-crio-version
versions: Update CRI-O version
2018-04-13 09:55:38 -05:00
Salvador Fuentes
0ae16176a4 versions: Update CRI-O version
This change updates to latest version from CRI-O
of the 1.9 branch.
This will allow us to unskip a test from the
CRI-O ctr.bats test file.

Fixes: #182.

Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
2018-04-13 07:48:07 -05:00
Julio Montes
da6d284fbb vendor: update kata-containers agent
This new version of kata-containers agent includes
the fix for CPU hotplug race condition

Shortlog:
131554d network: specify netlink protocol
49f01ed protocols/grpc: fix CPU hotplug race condition
ee7850d mockreaper: implement mock reaper
9f60034 reaper: implement reaper interface

Signed-off-by: Julio Montes <julio.montes@intel.com>
2018-04-13 07:05:23 -05:00
Julio Montes
8c9c7ddef8 virtcontainers: agent: fix CPU hot plug race condition
Communicate to the agent the number of vCPUs that were hot added,
allowing to the agent wait for the creation of all vCPUs.

fixes #90

Signed-off-by: Julio Montes <julio.montes@intel.com>
2018-04-13 07:05:23 -05:00
Sebastien Boeuf
9db9b286e3
Merge pull request #200 from bergwolf/rename
runtime: rename pod to sandbox
2018-04-13 01:11:13 -07:00
Peng Tao
6107694930 runtime: rename pod to sandbox
As agreed in [the kata containers API
design](https://github.com/kata-containers/documentation/blob/master/design/kata-api-design.md),
we need to rename pod notion to sandbox. The patch is a bit big but the
actual change is done through the script:
```
sed -i -e 's/pod/sandbox/g' -e 's/Pod/Sandbox/g' -e 's/POD/SB/g'
```

The only expections are `pod_sandbox` and `pod_container` annotations,
since we already pushed them to cri shims, we have to use them unchanged.

Fixes: #199

Signed-off-by: Peng Tao <bergwolf@gmail.com>
2018-04-13 09:32:51 +08:00
Julio Montes
a4c0827bea virtcontainers: kata_agent: apply CPU constraints
The runtime already hot added the number of vCPUs needed by each container,
in order to have a better control over those resources, CPU constraints
must be applied.

fixes #203

Signed-off-by: Julio Montes <julio.montes@intel.com>
2018-04-12 16:05:10 -05:00
Sebastien Boeuf
ca25177ac1
Merge pull request #138 from amshinde/block-volumes
volumes: Attach volumes that are block device files as block devices
2018-04-12 13:01:00 -07:00
Archana Shinde
ed1078c800 volumes: Attach volumes that are block device files as block devices
Check if a volume passed to the container with -v is a block device
file, and if so pass the block device by hotplugging it to the VM
instead of passing this as a 9pfs volume. This would give us
better performance.

Add block device associated with a volume to the list of
container devices, so that it is detached with all other devices
when the container is stopped with detachDevices()

Fixes #137

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2018-04-11 12:24:12 -07:00