Commit Graph

57 Commits

Author SHA1 Message Date
James O. D. Hunt
cc09b01ab2 lint: Fix virtcontainers structcheck errors
Correct `structcheck` linter issues.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-03-20 08:28:16 +00:00
James O. D. Hunt
c4e85905db lint: Fix virtcontainers unconvert errors
Correct `unconvert` linter issues.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-03-20 08:28:14 +00:00
James O. D. Hunt
bd8b585c79 lint: Fix virtcontainers golint errors
Correct `golint` linter issues.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-03-20 08:28:05 +00:00
James O. D. Hunt
3aad4f40c6 lint: Fix virtcontainers gofmt errors
Correct `gofmt` formatting for virtcontainers files.

Partially fixes #70.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-03-20 08:28:05 +00:00
James O. D. Hunt
7464e97a57 CI: Use central static checks script
Remove the duplicate static checker script and use the central script
defined in the `tests` repo like all the other components.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-03-20 08:28:05 +00:00
Eric Ernst
cd146dfeed
Merge pull request #73 from amshinde/vendor-upstream-ethtool
vendor: Vendor github.com/safchain/ethtool
2018-03-19 15:10:11 -07:00
Archana Shinde
d5b066152b vendor: Vendor github.com/safchain/ethtool
We were using code copied from github.com/safchain/ethtool.
Vendor in upstream package instead to use additional
functionality added in.

Fixes #71

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2018-03-19 14:30:29 -07:00
Sebastien Boeuf
65012d08b4
Merge pull request #62 from markdryan/gopath-setup
utils: Use go env to discover the GOPATH
2018-03-16 10:35:10 -07:00
Sebastien Boeuf
d1bdf80f56
Merge pull request #57 from amshinde/skip-ipv6-gateway
Skip routes with ipv6 gateway
2018-03-16 10:33:55 -07:00
Mark Ryan
96c49775c0 utils: Use go env to discover the GOPATH
Since Go 1.8 users no longer need to have GOPATH set in their environment
for the Go tool chain to work.  If GOPATH is set, Go will use it.  Otherwise
it defaults to ~/go on linux.  As most users store their code in ~/go, they
don't bother setting GOPATH any more.  virtcontainers-setup.sh, in its
current form, fails for those users, as it requires GOPATH to be set.
This commit fixes the issue by calling go env "GOPATH" to determine the
correct location of the user's go code.  go env "GOPATH" will always
return the correct location, whether GOPATH is set, or not.

Fixes: #63

Signed-off-by: Mark Ryan <mark.d.ryan@intel.com>
2018-03-16 09:39:58 +00:00
Archana Shinde
b6e6924a75 hyperstart_agent: ipv6: Skip ipv6 gateway for hyperstart agent
We ignore routes that have an ipv6 destination, since hyperstart agent
does not have support for ipv6 currently. We should do the same
for default route that has an ipv6 gateway address.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2018-03-15 13:47:14 -07:00
Archana Shinde
9f44729bd3 kata_agent: ipv6: Skip ipv6 gateway for kata agent
We ignore routes that have an ipv6 destination, since kata agent
does not have support for ipv6 currently. We should do the same
for default route that has an ipv6 gateway address. We need to
revisit this once we start adding support for ipv6.

Fixes #58

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2018-03-15 13:47:13 -07:00
Eric Ernst
de8506d8e5
Merge pull request #55 from sboeuf/scsi_support
virtcontainers: kata_agent: Add virtio-scsi support
2018-03-15 13:41:32 -07:00
Sebastien Boeuf
21f8911960 virtcontainers: kata_agent: Add virtio-scsi support
This commit enables the support of virtio-scsi for block devices
used as root filesystem or as devices passed through the VM to be
used directly from the container.

Fixes #56

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2018-03-15 12:20:32 -07:00
Sebastien Boeuf
7e85032aa7 virtcontainers: kata_agent: Use 9p2000.L version for 9p
There is a shared directory shared through virtio-9p between the
host and guest OS. The version of the driver used matters as it
may improve a few things. In this case, using the specific version
9p2000.L does not result in any regression, and it fixes failures
related to symlinks being passed through 9p.

Fixes #56

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2018-03-15 12:20:32 -07:00
Sebastien Boeuf
8152e15a61 virtcontainers: kata_agent: Factorize appending devices
This commit factorizes the code appending devices to the device list
provided to the Kata agent, in order to reduce the complexity of the
function createContainer().

Fixes #56

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2018-03-15 12:20:32 -07:00
Sebastien Boeuf
c2e9801a97 virtcontainers: kata_agent: Rely on Storage instead of Device for rootfs
The Kata agent has been reworked regarding Storage and Device
structures recently. It now expect that Storage is going to be
used for both volumes/mounts and rootfs, while Device will be
exclusive to devices passed through the VM that should appear
inside the container.

This commit implements this new way of handling volumes and
devices.

Fixes #56

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2018-03-15 12:20:32 -07:00
Sebastien Boeuf
b111403c00
Merge pull request #59 from jcvenegas/cli-runtime
cli: Initial runtime cli implementation.
2018-03-15 12:09:06 -07:00
Jose Carlos Venegas Munoz
4e370a5c72 vendor: re-vendor agent to fix mount error
The agent gRPC protocol has changed meaning the order of the gRPC
`Storage` message members has changed. This manifested itself with the
following error:

```
"OCI runtime create failed: rpc error: code = Internal desc = Could not
resolve symlink for source 9p: unknown."
```

This was caused by the agent attempting to mount a 9p FS with a blank
mountpoint - in fact due to the change in ordering, the mountpoint was
in the mount options!

Changes:

9760c10 device: Add SCSI block device support
15e851f storage: Rework the way Storage and Device are handled
4683745 lint: Remove unnecessary conversions
058182d lint: Fix vet error
ebcb3af reaper: removed unused type
902b82c device: Use standard functions to get device Major and Minor
6e262da main: Display full stacktrace on internal error

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-03-15 12:13:22 -06:00
Jose Carlos Venegas Munoz
6dde7b8548 Makefile: Update makefile to build runtime
Change default runtime to build cli.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-03-15 12:10:52 -06:00
Jose Carlos Venegas Munoz
3e4fdbbe6f travis: fix runtime build
Runtime command now is built on cli directory.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-03-15 12:10:52 -06:00
Julio Montes
e84a9a70b0 cli: Add initial cli implementation.
- Add kata-runtime
- Add unit test
- Add Makefile to build cli

Fixes: #33

Signed-off-by: Julio Montes <julio.montes@intel.com>
Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-03-15 12:10:52 -06:00
Jose Carlos Venegas Munoz
65b9936798 vendor: update vendor with new cli dependencies
Add need packages need by cli.

Signed-off-by: Julio Montes <julio.montes@intel.com>
Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-03-15 01:13:04 -06:00
Jose Carlos Venegas Munoz
dad59fe092 vendor: Move virtcontainers to project's root directory
Lets have a global vendor base on virtcontainers.

Signed-off-by: Julio Montes <julio.montes@intel.com>
Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-03-14 11:42:02 -06:00
Lai Jiangshan
167d54a5ce
Merge pull request #41 from sameo/topic/virtcontainers
virtcontainers: Initial import
2018-03-13 11:28:08 +08:00
Samuel Ortiz
c446b0ef46 virtcontainers: Remove redundant files
We will move the CI part into the top level .ci directory.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2018-03-13 01:00:54 +01:00
Samuel Ortiz
be72b6bd31 virtcontainers: Change all import paths
Some virtcontainers pieces of code are importing virtcontainers
packages. We need to change those paths to point at
kata-containers/runtime/virtcontainers

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2018-03-13 01:00:52 +01:00
Samuel Ortiz
24eff72d82 virtcontainers: Initial import
This is a virtcontainers 1.0.8 import into Kata Containers runtime.

virtcontainers is a Go library designed to manage hardware virtualized
pods and containers. It is the core Clear Containers framework and will
become the core Kata Containers framework, as discussed at
https://github.com/kata-containers/runtime/issues/33

Some more more pointers:

virtcontainers README, including some design and architecure notes:
https://github.com/containers/virtcontainers/blob/master/README.md

virtcontainers 1.0 API:
https://github.com/containers/virtcontainers/blob/master/documentation/api/1.0/api.md

Fixes #40

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2018-03-13 00:49:46 +01:00
Eric Ernst
ad9cef49c6
Merge pull request #47 from chavafg/topic/update-cc-runtime
cc-runtime: Update to 3.0.21
2018-03-08 13:12:33 -08:00
Salvador Fuentes
a31c416529 cc-runtime: Update to 3.0.21
Update `cc-runtime` to release 3.0.21 which has the necessary
fixes for the new agent.

Shortlog:

	5e27776 vendor: Update virtcontainers vendoring
	dc15173 cc-env: Include hypervisor block storage driver in cc-env output
	1768dd5 config: Add configuration option for hypervisor block storage driver
	accaa9d vendor: Vendor virtcontainers for SCSI support

Fixes: #44.

Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
2018-03-08 08:19:53 -06:00
Graham Whaley
05b6979592
Merge pull request #43 from jodh-intel/update-cc-runtime
cc-runtime: Update to 3.0.20
2018-03-01 18:15:20 +00:00
James O. D. Hunt
d9222448bc cc-runtime: Update to 3.0.20
Update `cc-runtime` to release 3.0.20 to pull in SCSI support and vCPU and
logging fixes.

Shortlog:

    0ea75e1 versions: Update kernel version to latest.
    14439ef release: Clear Containers 3.0.20
    e703f15 fedora-installation-guide: update Fedora versions supported
    b03c4a5 logging: Add name to all log calls
    055c688 logging: Add PID field to logs
    f6da537 config: don't exceed the number of physical cores
    cc84544 versions: Update agent version to pull in SCSI support
    54f87f5 logging: Add CLI command to logs
    befbdb1 config: Add comments for the DisableBlockDeviceUse flag

Fixes #42.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-03-01 13:57:57 +00:00
zhangwei_cs
c2a36f0b20
Merge pull request #38 from sameo/topic/cc
cc-runtime: Update to 3.0.19
2018-02-23 10:14:07 +08:00
Samuel Ortiz
74732c6443 cc-runtime: Update to 3.0.19
Add ARM architecture framework
Fix CRI-O kill race condition
Support configurable inter networking models (bridge, macvlan)

Shortlog:

5d80cae release: Clear Containers 3.0.19
702ee56 logger: Fix nanosecond timestamp test
e4ec67c vendor: Re-vendor virtcontainers to bring ARM support.
f90b33b logger: Fix nanosecond timestamps
84104b8 build: Add 'show-arches' target
3642602 build: Add variable for arch file suffix
c17c1f0 build: Add missing periods
db9f440 vendor: Re-vendor virtcontainers to include changes in govmm.
db882f3 build: Add architecture framework for ARM
26ce77d versions: Upade openshift, kubernetes, runc and CRI-O
f6d0b73 release: Clear Containers 3.0.18
7a280ef vendor: Update virtcontainers vendoring
ec11564 kill: Fix CRI-O race condition
786610f vendor: Update virtcontainers
1c84bef config: Add configuration option to define InterNetworkModel
8f3d397 cc-check: Isolate architecture specific code
755da14 versions: Update agent version
fa76660 cc-env: Add architecture to output
d51f214 release: Clear Containers 3.0.17
9e1712f CI: Run extra go linters
d1e7e3a lint: Remove unused variables
8ce6dd4 tests: Remove unused assignment
f3b8e73 list: Use interface explicitly
b0926d4 versions: agent: image: update agent
66f41d6 versions: image: Update base os to version 20640
1c45133 build: Don't install git hooks when running under a CI

Fixes #39

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2018-02-23 01:05:09 +01:00
Samuel Ortiz
b97f8ad710
Merge pull request #37 from GabyCT/topic/addrun
ci: Add run.sh and setup.sh in order to run the tests.
2018-02-23 01:05:00 +01:00
Gabriela Cervantes
f0503ba54a ci: Add run.sh and setup.sh in order to run the tests.
The setup script will be in charge of clone the test repository, meanwhile,
the run script will be in charge of execute for example the docker
integration tests.

Fixes #36

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2018-02-22 01:00:55 -06:00
Xu Wang
64bb90cb92
Merge pull request #30 from jodh-intel/add-docs
docs: Add missing standard docs
2018-02-09 22:56:33 +08:00
Samuel Ortiz
3adb1793eb
Merge pull request #28 from jodh-intel/update-cc-runtime
cc-runtime: Fix kernel param handling & update collect script
2018-02-09 15:56:23 +01:00
James O. D. Hunt
e2e0cfb5bb docs: Add missing standard docs
Add a README, along with the standard code of conduct and contributing
docs.

Fixes #29.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-02-09 14:45:14 +00:00
James O. D. Hunt
bf1201bdfd cc-runtime: Fix kernel param handling & update collect script
Update `cc-runtime` submodule for two main reasons:

-  config: Allow user-specified kernel params to take priority
   feed1be89e

- Update data collection script to work with Kata.

Changes:

    a63895e versions: Update kernel version
    7bf93e2 release: Clear Containers 3.0.16
    1412ff8 cc-env: Remove "CC" from output.
    5e7d03c vendor: Update virtcontainers vendoring
    f515c21 vendor: Update Gopkg.toml for new prune syntax
    ef63d36 vendor: Remove constraints from packages not directly vendored
    ab1a9f1 build: Add bug URL to help output
    719f523 scripts: Fix collect script bug URL
    93c71c9 cc-check: Document "unrestricted_guest" requirement
    0f8b25d scripts: Ignore qemu startup message
    7310433 scripts: Update collect script for Kata
    feed1be config: Allow user-specified kernel params to take priority
    e7de45d usage: Show project URL in help output
    b45d46c release: Clear Containers 3.0.15
    e65682c docs: remove references to Clear Containers proxy service

Fixes #27.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-02-02 16:09:39 +00:00
zhangwei_cs
6b5620d1cb
Merge pull request #24 from jodh-intel/ci-add-checkcommits
CI: Enable checkcommits
2018-02-02 23:06:49 +08:00
James O. D. Hunt
1c488951e0 CI: Enable checkcommits
Run the central static check script to enable `checkcommits`.

Fixes #8.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-01-31 12:30:02 +00:00
James O. D. Hunt
71f5b11b9a
Merge pull request #23 from bergwolf/runv-repo
runv: modify GOPATH to build
2018-01-30 09:32:26 +00:00
Peng Tao
e0f4c52836 runv: modify GOPATH to build
So that we can use runv repo as git submodule without splitting it.

Signed-off-by: Peng Tao <bergwolf@gmail.com>
2018-01-30 10:00:05 +08:00
Peng Tao
275c683ce5
Merge pull request #16 from jodh-intel/add-makefile
build: Add minimal Makefile
2018-01-27 00:36:09 +08:00
James O. D. Hunt
086ac7428d
Merge pull request #18 from bergwolf/runvcli
runv: update submodule repo
2018-01-26 16:22:22 +00:00
Peng Tao
40e1cdc5d8 runv: update submodule repo
Use a standalone cli repo so that it can be built inside the
kata runtime directory.

fixes: #17

Signed-off-by: Peng Tao <bergwolf@gmail.com>
2018-01-27 00:16:53 +08:00
James O. D. Hunt
6faabd290c build: Add minimal Makefile
Add a basic `Makefile` to allow a runtime to be built:

- Clear Containers-based Kata runtime:
  ```
  $ make KATA_RUNTIME=cc [install]
  ```

- `runv`-based Kata runtime:
  ```
  $ make KATA_RUNTIME=runv [install]
  ```

Fixes #15.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-01-26 13:55:56 +00:00
Xu Wang
ff8f8ab512
Merge pull request #14 from sameo/topic/cc
cc-runtime: Fix default systemd target
2018-01-25 07:32:50 +08:00
Samuel Ortiz
2c4e950a50 cc-runtime: Fix default systemd target
The cc-runtime code base was hard coding a Clear Containers
specific systemd unit target in the default kernel parameters.
This commit includes a fix for that.

Shortlog:

9be4882 build: Set systemd unit name based on project
512cd59 config: Clean up hypervisor debug comments

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2018-01-24 18:42:29 +01:00