Commit Graph

2150 Commits

Author SHA1 Message Date
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
Salvador Fuentes
59adb6e0aa versions: update supported docker version
update from v17.12 to v18.03.
18.03 is the version installed in the CI VMs
and when using v17.12 some hotplug cpu tests
fail. then we need to make v18.03 our official
supported version.

Fixes: #418.

Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
2018-06-19 14:23:47 -05:00
Sebastien Boeuf
4f102f8e8f
Merge pull request #292 from jshachm/remove-host-shared
virtcontainers : fix shared dir resource remaining
2018-06-19 08:44:05 -07:00
Nitesh Konkar
d0bccabbe1 virtcontainers: Set ppc64le maxmem depending on qemu version
The "Failed to allocate HTAB of requested size,
try with smaller maxmem" error in ppc64le occurs
when maxmem allocated is very high. This got fixed
in qemu 2.10 and kernel 4.11. Hence put a maxmem
restriction of 32GB per kata-container if qemu
version less than 2.10

Fixes: #415

Signed-off-by: Nitesh Konkar <niteshkonkar@in.ibm.com>
2018-06-19 19:48:18 +05:30
c00416947
8a6d383715 virtcontainers : fix shared dir resource remaining
Before this patch shared dir will reamin when sandox
has already removed, espacilly for kata-agent mod.

Do clean up shared dirs after all mounts are umounted.

Fixes: #291

Signed-off-by: Haomin <caihaomin@huawei.com>
2018-06-19 20:32:07 +08:00
zhangwei_cs
6f409b9528
Merge pull request #410 from kata-containers/fix-debug-link
docs: update debug runtime link
2018-06-19 15:59:30 +08:00
Eric Ernst
deaf1e3780 docs: update debug runtime link
It pointed to how to enable logs, which is only a small portion of the
debug options for Kata  Containers.  Let's instead point to the
troubleshooting section, which includes pointers to adding logs and to
debug the guest vm.

Fixes #411

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2018-06-19 14:26:49 +08:00
Jose Carlos Venegas Munoz
ea6eed47d7
Merge pull request #408 from chavafg/topic/cni-version
Versions: Add CNI plugins version
2018-06-18 16:13:09 -05:00
Salvador Fuentes
50579d043f Versions: Add CNI plugins version
The cni-plugins commit will be used to build that specific
version on the CI, instead of using master.

Fixes #407.

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

Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
2018-06-18 11:49:56 -05:00
Sebastien Boeuf
593bd44f20
Merge pull request #385 from amshinde/always-bind-back-physical-interfaces
network: Always bind back physical interfaces
2018-06-18 09:24:58 -07:00
Archana Shinde
a31dd496eb cni: Use the vendored version of CNI plugins to install binaries
Out CI is failing because of a recent change introduced in the
CNI plugins repo(github.com/containernetworking/plugins) that vendors in
CNI v0.7.0-alpha0. Refer to commit #e4fdb6cd1883b7b.

However, it looks like the the plugins themselves have not been
updated yet, causing failures in CI. This was verified by vendoring
in the latest CNI and CNI plugins in our repo.

Till the plugin binaries our fixed, use older version of CNI plugins
for testing virtcontainers. See this:
https://github.com/containernetworking/plugins/commit/68b4efb4056c

In any case we should keep this version
in sync with what we vendor in, in our runtime and not use the
latest commit.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2018-06-16 22:57:43 -07:00
Archana Shinde
0806dcc19c network: Drop mounted parameter in call to deleteNetNS
All calls to deleteNetNS were passing the "mounted" parameter as
true. So drop this parameter.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2018-06-16 22:56:28 -07:00
Archana Shinde
f2d9632bc0 network: Always bind back physical interfaces
In case of physical network interfaces, we explicitly
pass through them to the VM. We need to bind them back to
the host driver when the sandbox is stopped, irrespective if
the network namespace has been created by virtcontainers or not.

Fixes #384

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2018-06-16 22:55:15 -07:00
James O. D. Hunt
42821b7c0a
Merge pull request #378 from raravena80/master
subsystem: cli
2018-06-13 15:30:06 +01:00
James O. D. Hunt
3f31643452
Merge pull request #395 from WeiZhang555/fix-url
docs: fix invalid urls
2018-06-13 14:10:28 +01:00