Commit Graph

2214 Commits

Author SHA1 Message Date
Sebastien Boeuf
a8952fb79b
Merge pull request #470 from bergwolf/memory-hotplug
hypervisor/qemu: add memory hotplug support
2018-07-09 09:56:19 -07:00
Sebastien Boeuf
f084384501
Merge pull request #462 from Pennyzct/versions
ci: add specfic image-type for aarch64
2018-07-09 09:24:04 -07:00
Peng Tao
66a3e812f2 hypervisor/qemu: add memory hotplug support
So that we can add more memory to an existing guest.

Fixes: #469

Signed-off-by: Peng Tao <bergwolf@gmail.com>
2018-07-09 15:29:50 +08:00
Penny Zheng
67de5d4347 ci: reconstructure image-type and initrd for architecture-independant
as default image-type and initrd weren't for non-x86_64 arch,
reconstructuring them to be architecture-specific.

Fixes: #461

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
Signed-off-by: Jianyong Wu <jianyong.wu@arm.com>
Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-07-09 02:27:01 +00:00
fupan
114482ed99 api: To stop its monitor after a sandbox paused
After the sandbox is paused, it's needed to stop its monitor,
Otherwise, its monitors will receive timeout errors if it is
paused for a long time, thus its monitor will not tell it's a
crash caused timeout or just a paused timeout.

Fixes: #472

Signed-off-by: fupan <lifupan@gmail.com>
2018-07-06 19:40:43 +08:00
James O. D. Hunt
a38b251120 tests: Refactor CC proxy test for Kata
Reworked `TestCCProxyStart` to create a generic `testProxyStart()` that
is now used for testing both CC and Kata proxies.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-07-06 11:52:22 +01:00
James O. D. Hunt
23eb13f23a proxy: Pass sandbox to proxy
Add the `-sandbox` option when launching the proxy. This isn't strictly
required by the proxy, but is extremely useful for log analysis to allow
log entries to be matched to sandboxes as the proxy will add a
`sandbox` field in each log entry.

Fixes #463.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-07-06 11:52:22 +01:00
Peng Tao
0646a39ff0 vendor: fix dep warning and update yamux dependency
I got following warning after upgrading dep tool:

Warning: the following project(s) have [[constraint]] stanzas in Gopkg.toml:

  ✗  github.com/hashicorp/yamux

However, these projects are not direct dependencies of the current project:
they are not imported in any .go files, nor are they in the 'required' list in
Gopkg.toml. Dep only applies [[constraint]] rules to direct dependencies, so
these rules will have no effect.

Either import/require packages from these projects so that they become direct
dependencies, or convert each [[constraint]] to an [[override]] to enforce rules
on these projects, if they happen to be transitive dependencies,

So let's convert constraint to override over yamux. In the meanwhile,
update the yamux vendor. Full commit list:

4c2fe0d (origin/b-consul-3040) Dont output keepalive error when the session is closed
f21aae5 Make sure to drain the timer channel on defer, and a clarifying comment
601ccd8 Make receive window update logic a bit cleaner
02d320c Uses timer pool in sendNoWait, like in waitForSendErr
cf433c5 window update unit test for partial read; benchmark large buffer
ca8dfd0 improve memory utilization in receive buffer, fix flow control
683f491 Fix race around read and write deadlines in Stream (#52)
40b86b2 Add public session CloseChan method (#44)

Note that commit 4c2fe0d might also help kata-containers/agent/issues/231.

Signed-off-by: Peng Tao <bergwolf@gmail.com>
2018-07-05 15:31:53 +08:00
Peng Tao
0f20b6b81b vendor: update govmm changes
To include vm factory related commits. Full list:
54caf78 (mine/templating, templating) qmp: add hotplug memory
e66a9b4 qemu: add appendMemoryKnobs helper
8aeca15 qmp: add migrate set arguments
a03d496 qmp: add set migration capabilities
0ace417 qemu: allow to set migration incoming
723bc5f qemu: allow to create a stopped guest
283d7df qemu: add file backed memory device support

Signed-off-by: Peng Tao <bergwolf@gmail.com>
2018-07-05 15:25:19 +08:00
James O. D. Hunt
b2bec3362b
Merge pull request #449 from jodh-intel/add-runtime-cli-cmd-to-vc-log
main: Pass runtime CLI command to vc logger
2018-07-05 08:17:54 +01:00
James O. D. Hunt
830d50e9c5 main: Pass runtime CLI command to vc logger
Add the runtime CLI command name to the virtcontainers logger so that it
is clear when reading virtcontainers log entries which runtime command
they refer to.

Fixes #448.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-07-05 07:08:02 +01:00
James O. D. Hunt
47dfb7d6da
Merge pull request #466 from jodh-intel/pass-sandbox-id-to-agent
qemu: Pass sandboxID to agent for logging purposes
2018-07-05 06:49:12 +01:00
James O. D. Hunt
2865dc21aa
Merge pull request #468 from jodh-intel/improve-cid+sid-logging
logging: Reset external loggers when cid+sid available
2018-07-05 06:47:26 +01:00
Julio Montes
dfed5a5a6d
Merge pull request #442 from lifupan/hyper-integration
api: To watch the vm console in FetchSandbox api
2018-07-04 13:37:47 -05:00
James O. D. Hunt
64e2ca35dd logging: Reset external loggers when cid+sid available
Once `containerID` and `sandboxID` fields are available, re-register
the logger with the external packages to ensure they too display these
important fields.

Fixes #467.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-07-04 14:49:58 +01:00
James O. D. Hunt
03d4d4937c logging: Add function to handle external loggers
Created a new `setExternalLogger()` which sets (or resets) the logger
used by the external packages which allow a logger to be specified.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-07-04 14:48:43 +01:00
James O. D. Hunt
79e8da0675 create: Remove redundant logging code
Don't add the container ID as a log fields as it is already a field
(added on #453).

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-07-04 14:47:19 +01:00
James O. D. Hunt
793a22083c qemu: Pass sandboxID to agent for logging purposes
Add a kernel command-line option that the agent can read to determine
the sandbox ID of the VM. It can use this to create a `sandbox=` log
field for improved log analysis.

Fixes #465.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-07-04 13:50:06 +01:00
Julio Montes
bf1cf684f5
Merge pull request #437 from jcvenegas/1.1.0-branch-bump
# Kata Containers 1.1.0
2018-07-02 11:04:53 -05:00
Jose Carlos Venegas Munoz
36cc400656 release: Kata Containers 1.1.0
- versions: Update cri-o to fix race condition test.
- network: Add test for VhostUserEndpoint Attach()
- logging: Add containerID and sandboxID to all log calls
- versions: Update kernel to version 4.14.51
- network: Use pointer for VhostUserNetDevice for Attach
- [RFC] makefile: honor DESTDIR flag.
- cli: kata-check if SMT is off on POWER8 systems
- virtcontainer : sconstification of constifiable vars
- ci: Fix static checks call.
- kata_agent: fix connection race
- test: supplement test cases for kata-check and kata-env in Arm64
- qemu: clean up qmp channel
- sandbox: expose share sandbox pidns setting
- versions: update supported docker version
- cli: add no-pivot flag to be compatible with docker in ramdisk
- virtcontainers : fix shared dir resource remaining
- docs: update debug runtime link
- Versions: Add CNI plugins version
- network: Always bind back physical interfaces
- subsystem: cli
- docs: fix invalid urls
- shm: Create shared /dev/shm
- docs: Fix invalid URLs
- CI: Enable Travis-CI for linux-ppc64le
- Fix golint ppc64le issues and eventually Travis-CI
- cpuinfo/arm64: Refine CPUInfo in Arm64
- docs: Update README with Power Support
- ppc64le: Restrict maxmem to avoid HTAB allocation failure
- make sure kataAgent/createContainer can decode old specs.Spec
- arch/arm64: Fix ARM64 build
- virtcontainers: Remove unnecessary kernel parameters for ppc64le
- Enable Kata container on ppc64le arch
- unittest: tiny fix for incorrect parameters
- Update the README.md so showing that containerd is supported
- Fix pause-remove container
- virtcontainers/api: use RW lock to update containers
- Share pid namespace
- config: Show which config file loaded

150bcaf network: Add test for VhostUserEndpoint Attach()
aeea3f6 versions: Update cri-o to fix racy test.
a3ce121 logging: Add containerID and sandboxID to all log calls
510b333 network: Use pointer for VhostUserNetDevice for Attach
44c8901 versions: Update kernel to version 4.14.51
f890ffd cli: kata-check if SMT is off on POWER8 systems
9d709cd ci: Fix static checks call.
ee33245 kata_agent: fix connection race
f2096f1 test: supplement test cases for kata-check and kata-env in Arm64
39bc5ab makefile: honor DESTDIR flag.
2b94252 sandbox: expose share sandbox pidns setting
8f329db qemu: clean up qmp channel
2d65499 virtcontainer: sconstification of constifiable vars
6b496e4 cli: add no-pivot flag to be compatible with docker in ramdisk
59adb6e versions: update supported docker version
8a6d383 virtcontainers : fix shared dir resource remaining
deaf1e3 docs: update debug runtime link
50579d0 Versions: Add CNI plugins version
a31dd49 cni: Use the vendored version of CNI plugins to install binaries
0806dcc network: Drop mounted parameter in call to deleteNetNS
f2d9632 network: Always bind back physical interfaces
45d0816 docs: fix invalid urls
7069045 subsystem: cli
c2397a0 CI: Enable Travis-CI for x86 linux and linux-ppc64le
d6b956a cli: Add kata-check_ppc64le_test file
4824669 cli: Fix TestCheckCLIFunctionFail failure on ppc64le
bb0488e virtcontainers: Fix comment causing golint issue
4d470e5 shm: Create shared /dev/shm
92470fb docs: Fix invalid URLs
44b9950 docs: Update README with Power Support
7757dce cpuinfo/arm64: Refine CPUInfo in Arm64
3b20aeb ppc64le: Restrict maxmem to avoid HTAB allocation failure
2796b19 virtcontainers: Remove unnecessary kernel parameters for ppc64le
6e161a2 arch/arm64: Fix ARM64 build
9a0434d virtcontainers: make kataAgent/createContainer can decode old specs.Spec
c10db01 unittest: tiny fix for incorrect parameters
ca9f571 subsystem: docs
df05b2c cli: fix pause-remove container
b99cadb virtcontainers: add pause and resume container to the API
e14eab0 runtime: Add testcases for ppc64le and arm64
12e4dbe cli: Leverage the new support for ppc64le
baa553d virtcontainers: Get qemu suppport for ppc64le
4276c0c virtcontainers/cli: refactor code
7d435b8 virtcontainers/api: use RW lock to update containers
704d713 test: Fix tests to include pause/resume api changes
d885782 namespace: Check if pid namespaces need to be shared
6d391c4 vendor: Vendor in agent protocol changes.
054a8ce config: Show which config file loaded

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-07-02 09:38:04 -05:00
Salvador Fuentes
91cb94eff8
Merge pull request #454 from jcvenegas/crio-update
versions: Update cri-o to fix race condition test.
2018-07-02 08:18:39 -05:00
Graham Whaley
9f649c4979
Merge pull request #456 from amshinde/test-vhost-user-attach
network: Add test for VhostUserEndpoint Attach()
2018-07-02 10:07:08 +01:00
Archana Shinde
150bcafc20 network: Add test for VhostUserEndpoint Attach()
Fixes #455

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2018-06-29 17:57:31 -07:00
Jose Carlos Venegas Munoz
aeea3f6fa4 versions: Update cri-o to fix racy test.
Some test were CI test were failing due to a race condition.

Update cri-o repository to have a stable CI.

Update K8s to latest stable version

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

Fixes: #435

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-06-29 15:35:06 -05:00
Archana Shinde
b7e3997bc1
Merge pull request #453 from jodh-intel/logger-add-cid+sid
logging: Add containerID and sandboxID to all log calls
2018-06-29 08:47:44 -07:00
James O. D. Hunt
a3ce12179f logging: Add containerID and sandboxID to all log calls
Adding cid+sid fields to the log entries generated by most of the CLI
commands will make debugging across the system easier.

Fixes #452.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-06-28 10:37:51 +01:00
Sebastien Boeuf
93775487c8
Merge pull request #421 from jcvenegas/kernel-4.14.50
versions: Update kernel to version 4.14.51
2018-06-27 11:00:14 -07:00
James O. D. Hunt
4f1519ec64
Merge pull request #447 from amshinde/use-pointer-vhost-user-net
network: Use pointer for VhostUserNetDevice for Attach
2018-06-27 10:01:38 +01:00
Archana Shinde
510b3338d4 network: Use pointer for VhostUserNetDevice for Attach
Use pointer here since api.VhostUserDevice interface is implemented
by VhostUserNetDevice pointer.

Fixes #446

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2018-06-26 23:39:53 -07:00
Archana Shinde
2b27ddc738
Merge pull request #402 from jcvenegas/destdir
[RFC] makefile: honor DESTDIR flag.
2018-06-26 15:45:27 -07:00
Jose Carlos Venegas Munoz
44c890176c versions: Update kernel to version 4.14.51
Update to kernel to get latest fixes.

Depends-on: github.com/kata-containers/agent#279

Fixes: #420

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-06-26 16:14:46 -05:00
Graham Whaley
5a6b541caf
Merge pull request #398 from nitkon/master
cli: kata-check if SMT is off on POWER8 systems
2018-06-26 09:05:30 +01:00
zhangwei_cs
2f1bf58b08
Merge pull request #424 from jiulongzaitian/const
virtcontainer : sconstification of constifiable vars
2018-06-26 15:30:38 +08:00
fupan
9155412b24 api: To watch the vm console in FetchSandbox api
When do sandbox release, the kataBuiltInProxy will
be closed, and it will stop the watch of vm's console;
Thus it needs to restart the proxy to monitor the vm
console once to restore the sandbox.

Fixes: #441

Signed-off-by: fupan <lifupan@gmail.com>
2018-06-26 08:04:33 +08:00
Nitesh Konkar
f890ffdaf7 cli: kata-check if SMT is off on POWER8 systems
SMT must be turned off on Power8 for KVM to work. Put
this as a check for kata-runtime kata-check.

Fixes: #397

Signed-off-by: Nitesh Konkar <niteshkonkar@in.ibm.com>
2018-06-25 19:40:05 +05:30
Salvador Fuentes
47caba8370
Merge pull request #439 from jcvenegas/ci-static-fix
ci: Fix static checks call.
2018-06-22 17:41:37 -05:00
Jose Carlos Venegas Munoz
9d709cd726 ci: Fix static checks call.
The script now has new options.

Add options to make CI work.

Fixes: #438

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-06-22 15:42:10 -05:00
zhangwei_cs
62d819c907
Merge pull request #432 from bergwolf/connection
kata_agent: fix connection race
2018-06-21 17:48:49 +08:00
Peng Tao
ee33245d95 kata_agent: fix connection race
If we send multiple grpcs at once before a client is created, we end up
creating multiple connections to the agent and that breaks when using builtin
proxy since only one connection is allowed.

Fixes: #431

Signed-off-by: Peng Tao <bergwolf@gmail.com>
2018-06-21 16:34:49 +08:00
James O. D. Hunt
8e581f4d72
Merge pull request #414 from Pennyzct/kata-test
test: supplement test cases for kata-check and kata-env in Arm64
2018-06-21 09:28:04 +01:00
Penny Zheng
f2096f1f4e test: supplement test cases for kata-check and kata-env in Arm64
There were missing test cases in Arm64 for platform-dependent
kata-check and kata-env, leading to 'make test' failure under
kata-containers/runtime

Fixes: #403

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2018-06-21 07:16:17 +00:00
Sebastien Boeuf
fca7eb822d
Merge pull request #429 from bergwolf/qmp
qemu: clean up qmp channel
2018-06-20 10:36:43 -07:00
Archana Shinde
d02babdf81
Merge pull request #427 from bergwolf/sandbox_ns
sandbox: expose share sandbox pidns setting
2018-06-20 09:27:13 -07:00
Jose Carlos Venegas Munoz
39bc5ab3ee makefile: honor DESTDIR flag.
1. Fix config installation not exec permission is needed.

2. Makefile install all in DESTDIR.

make install DESTDIR=/tmp/dest/

Before:
$tree /tmp/dest/
/tmp/dest/
└── usr
    ├── bin
    │   └── kata-collect-data.sh
    └── share
        └── defaults
            └── kata-containers
                └── configuration.toml

5 directories, 2 files

Now:
$tree /tmp/dest/
/tmp/dest/
└── usr
    ├── local
    │   └── bin
    │       ├── kata-collect-data.sh
    │       └── kata-runtime
    └── share
        ├── bash-completion
        │   └── completions
        │       └── kata-runtime
        └── defaults
            └── kata-containers
                └── configuration.toml

Fixes: #401

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-06-20 10:18:53 -05:00
Salvador Fuentes
ad587e5783
Merge pull request #419 from chavafg/topic/update-docker-version
versions: update supported docker version
2018-06-20 08:57:16 -05:00
Peng Tao
2b942524a2 sandbox: expose share sandbox pidns setting
So that we let callers decide if kata-agent should let all containers in
a sandbox share the same pid namespace.

This will be first used only by frakti. And kata cli can possibly use it
as well when cri-o and containerd-cri stop creating pause containers
and just pass the CreateSandbox CRI requests to kata.

Fixes: #426

Signed-off-by: Peng Tao <bergwolf@gmail.com>
2018-06-20 20:51:22 +08:00
Peng Tao
8f329dbf48 qemu: clean up qmp channel
We only need one qmp channel and it is qemu internal detail thus
sandbox.go does not need to be aware of it.

Fixes: #428

Signed-off-by: Peng Tao <bergwolf@gmail.com>
2018-06-20 17:58:54 +08:00
zhangjie
2d65499d03 virtcontainer: sconstification of constifiable vars
Fixes #142

Signed-off-by: zhangjie <iamkadisi@163.com>
2018-06-20 16:02:10 +08:00
Xu Wang
c324b55255
Merge pull request #423 from wwq19920405/master
cli: add no-pivot flag to be compatible with docker in ramdisk
2018-06-20 14:51:35 +08:00
wangwenqi
6b496e4bf0 cli: add no-pivot flag to be compatible with docker in ramdisk
This commit add a no-pivot flag (just a warning tip) in kata-runtime create and run cmd.

Fixes: #409 , #134

Signed-off-by: wenqi wang wangwenqi01@baidu.com
2018-06-20 13:12:56 +08:00