Commit Graph

2077 Commits

Author SHA1 Message Date
James O. D. Hunt
2400978f6a
Merge pull request #286 from nitkon/master
Enable Kata container on ppc64le arch
2018-06-01 09:58:37 +01:00
James O. D. Hunt
42765bf64a
Merge pull request #348 from keloyang/pull-everytime
unittest: tiny fix for incorrect parameters
2018-06-01 08:53:09 +01:00
y00316549
9a0434d6bf virtcontainers: make kataAgent/createContainer can decode old specs.Spec
in old specs.Spec, Capabilities is [] string, but we don't use CompatOCISpec
for compatibility in kataAgent/createContainer.

fixes #333

Signed-off-by: y00316549 <yangshukui@huawei.com>
2018-06-01 14:48:43 +08:00
y00316549
c10db01599 unittest: tiny fix for incorrect parameters
Fixes #347

Signed-off-by: y00316549 <yangshukui@huawei.com>
2018-06-01 10:39:13 +08:00
Eric Ernst
5f5f619dfc
Merge pull request #355 from raravena80/master
Update the README.md so showing that containerd is supported
2018-05-31 13:40:56 -07:00
Ricardo Aravena
ca9f571c87
subsystem: docs
Update the README.md so showing that containerd is supported

Fixes #354

Signed-off-by: Ricardo Aravena <raravena@branch.io>
2018-05-31 13:38:27 -07:00
Sebastien Boeuf
b3b0612fbe
Merge pull request #328 from devimc/fix/pauseRemove
Fix pause-remove container
2018-05-31 08:54:53 -07:00
Julio Montes
df05b2c5bd cli: fix pause-remove container
Instead of pausing the sanbox, this patch just pauses the container
allowing the communication with the agent. The communication with the agent
should be still possible even if all containers are paused, because of we don't
know when a new container can be created in the same sandbox.

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

fixes #317

Signed-off-by: Julio Montes <julio.montes@intel.com>
2018-05-31 09:38:13 -05:00
Julio Montes
b99cadb553 virtcontainers: add pause and resume container to the API
Pause and resume container functions allow us to just pause/resume a
specific container not all the sanbox, in that way different containers
can be paused or running in the same sanbox.

Signed-off-by: Julio Montes <julio.montes@intel.com>
2018-05-31 09:38:13 -05:00
Nitesh Konkar
e14eab084e runtime: Add testcases for ppc64le and arm64
Fixes #302

Signed-off-by: Nitesh Konkar niteshkonkar@in.ibm.com
2018-05-31 18:53:37 +05:30
Nitesh Konkar
12e4dbe4ca cli: Leverage the new support for ppc64le
Fixes #302

Signed-off-by: Nitesh Konkar niteshkonkar@in.ibm.com
2018-05-31 18:41:54 +05:30
Nitesh Konkar
baa553da07 virtcontainers: Get qemu suppport for ppc64le
Fixes #302

Signed-off-by: Nitesh Konkar niteshkonkar@in.ibm.com
2018-05-31 18:40:43 +05:30
Nitesh Konkar
4276c0c38e virtcontainers/cli: refactor code
Fixes #302

Signed-off-by: Nitesh Konkar niteshkonkar@in.ibm.com
2018-05-31 17:58:35 +05:30
Archana Shinde
44b65e1d52
Merge pull request #353 from devimc/virtcontainers/updateUseRWLock
virtcontainers/api: use RW lock to update containers
2018-05-30 15:37:13 -07:00
Sebastien Boeuf
3ba9a2472f
Merge pull request #298 from amshinde/share-pid-namespace
Share pid namespace
2018-05-30 15:20:12 -07:00
Julio Montes
7d435b84f0 virtcontainers/api: use RW lock to update containers
When a container is updated, those modifications are stored, to
avoid race conditions with other operations, a RW lock should be used.

fixes #346

Signed-off-by: Julio Montes <julio.montes@intel.com>
2018-05-30 16:04:11 -05:00
Archana Shinde
704d713571 test: Fix tests to include pause/resume api changes
Since the vendoring included changes introducing PauseContainer
and ResumeContainer changes, fix the tests to satisfy the grpc api.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2018-05-30 13:34:24 -07:00
Archana Shinde
d885782df1 namespace: Check if pid namespaces need to be shared
k8s provides a configuration for sharing PID namespace
among containers. In case of crio and cri plugin, an infra
container is started first. All following containers are
supposed to share the pid namespace of this container.

In case a non-empty pid namespace path is provided for a container,
we check for the above condition while creating a container
and pass this out to the kata agent in the CreatContainer
request as SandboxPidNs flag. We clear out the PID namespaces
in the configuration passed to the kata agent.

Fixes #343

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2018-05-30 13:34:24 -07:00
Archana Shinde
6d391c4355 vendor: Vendor in agent protocol changes.
This includes the addition of "SandboxPidNs" in the
CreateContainerRequest api.

Shortlog:
a30395a grpc: signal frozen containers
08674c0 agent: Add support for ephemeral volumes
c517125 ci: Refactor to pass metalinter checks
ad9c33d tests: Modify tests to take into account if pid ns needs to be
shared
e334596 namespace: Share pid namespace of containers
1e72fbb agent: Get cgroup mounts info from /proc/cgroups
ab6c4ff namespaces: Create persistent UTS and IPC namespaces
be3993e release: Kata Containers 1.0.0
75c6fc0 grpc: implement pause and resume commands
9da1fea release: Kata Containers 0.3.0
4bad43e grpc: honour CPU constraints in Kubernetes
11d5c56 grpc: log errors in async commands
7b47559 channel: Support Epoll on Arm64
a7033a7 release: update version to 0.2.0
5c3c000 signal: Backtrace on SIGUSR1
a0880aa signal: Switch to standard signal handling
f8081ca main: Improve logging in signal handling loop
075ad56 main: Rename signal functions for clarity
899bc6d main: Log errors on failure
6689db0 agent: Fix typo

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2018-05-29 11:32:07 -07:00
Julio Montes
9fb0b337ef
Merge pull request #336 from jodh-intel/show-config-file-name
config: Show which config file loaded
2018-05-23 07:28:42 -05:00
James O. D. Hunt
054a8ce3b7 config: Show which config file loaded
Since the runtime can load its configuration from multiple locations,
add a log field to show which location was used.

Change log level from Debug to Info as this is generally useful
information.

Fixes #335.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-05-23 10:12:24 +01:00
Eric Ernst
086d197f2c
Merge pull request #329 from jcvenegas/1.0.0-branch
# Kata Containers 1.0.0
2018-05-21 18:57:49 -07:00
Jose Carlos Venegas Munoz
5a51563a98 release: Kata Containers 1.0.0
Version bump no changes

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-05-21 18:03:21 -05:00
Frank Cao
92ec15d774
Merge pull request #326 from jshachm/fix-pod-to-sandbox
virtcontainers: fix codes misunderstanding in virtcontainers
2018-05-21 21:55:16 +08:00
Julio Montes
8347f4d5ca
Merge pull request #319 from jodh-intel/error-on-image+initrd
config: Error if image+initrd specified
2018-05-21 08:23:20 -05:00
Samuel Ortiz
41492d5bd9
Merge pull request #323 from jodh-intel/add-more-details-to-readme
docs: Add more details to the README
2018-05-21 11:38:33 +02:00
Samuel Ortiz
216aa53974
Merge pull request #321 from jodh-intel/fix-README-toc
docs: Fix README TOC
2018-05-21 11:34:58 +02:00
c00416947
7abb8fe326 virtcontainers: fix codes misunderstanding in virtcontainers
Still there are some codes left which
will cause some misunderstanding

Change `p` in short of `pod` into `s` or `sandbox`

Fixes: #325

Signed-off-by: Haomin <caihaomin@huawei.com>
2018-05-21 11:11:27 +08:00
Julio Montes
2245e67f93
Merge pull request #324 from jcvenegas/0.3.0-branch
# Kata Containers 0.3.0
2018-05-18 15:01:45 -05:00
Jose Carlos Venegas Munoz
6ebda37d88 release: Kata Containers 0.3.0
- cli :Implement events command
- docs: update README to include links to user guides
- versions: Update versions file.
- build: default to using qemu-lite-x86_64
- versions: Add gometalinter to versions database
- kata-env: Remove static agent version
- virtcontainers/qemu: reduce memory footprint

1205e34 cli: implement events command
f1f534c vendor: update agent
b9c9ad9 docs: update README to include links to user guides
5b4ab7d versions: Update cri-containerd version.
4bfa8f8 versions: Add default initrd information
646e752 versions: Change kernel data.
1382662 build: default to using qemu-lite-x86_64
a0b1083 versions: Add gometalinter to versions database
80bedb0 kata-env: Remove static agent version
4527a80 virtcontainers/qemu: honour CPU constrains
07db945 virtcontainers/qemu: reduce memory footprint

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-05-18 12:35:43 -05:00
James O. D. Hunt
ce5dda8249 docs: Add more details to the README
Add brief entries to the README for the following:

- Limitations
- Contact details
- Further information

Fixes #322.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-05-18 11:21:35 +01:00
James O. D. Hunt
5b194b6144 docs: Fix README TOC
Updated `README` table of contents as PR #316 forgot to do so.

Fixes #320.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-05-18 10:01:09 +01:00
James O. D. Hunt
8b56573cc7 config: Error if image+initrd specified
If you build and install the runtime, the config file will contain an
entry for both an `initrd=` and an `image=` entry.

The Developer Guide explains that the user must disable one but it is
easy to forget.

Modified the runtime to fail if both an image and an initrd are
specified. Also added a new test for this scenario.

Fixes #318.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-05-18 09:55:38 +01:00
Peng Tao
be82c7fc6f
Merge pull request #299 from jshachm/implement-events-command
cli :Implement events command
2018-05-18 15:35:52 +08:00
c00416947
1205e347f2 cli: implement events command
Events cli display container events such as cpu,
memory, and IO usage statistics.

By now OOM notifications and intel RDT are not fully supproted.

Fixes: #186

Signed-off-by: Haomin <caihaomin@huawei.com>
2018-05-18 09:17:49 +08:00
Eric Ernst
207ceaba8b
Merge pull request #316 from kata-containers/readme-updates
docs: update README to include links to user guides
2018-05-17 17:12:50 -07:00
Eric Ernst
b9c9ad94cf docs: update README to include links to user guides
Added links to the installation guides, as well as a
pointer to the kata containers architecutre document.

Fixes: #315

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2018-05-17 12:43:20 -07:00
Salvador Fuentes
d0c17a8206
Merge pull request #314 from jcvenegas/versions-update
versions: Update versions file.
2018-05-17 13:02:12 -05:00
Eric Ernst
552b442059
Merge pull request #312 from kata-containers/qemu-lite-default
build: default to using qemu-lite-x86_64
2018-05-17 10:37:50 -07:00
Jose Carlos Venegas Munoz
5b4ab7dfaa versions: Update cri-containerd version.
Update last supported cri-contaienrd version.

Fixes: #313

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-05-17 11:35:56 -05:00
Jose Carlos Venegas Munoz
4bfa8f8c22 versions: Add default initrd information
Add information about the default initrd.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-05-17 10:53:24 -05:00
Eric Ernst
1382662c1b build: default to using qemu-lite-x86_64
Update the runtime to use qemu-lite by default. After a
build this will be observed as the default in configuration.toml

Fixes: #293
Depends-on: github.com/kata-containers/tests#308

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2018-05-17 08:50:32 -07:00
Jose Carlos Venegas Munoz
646e752c38 versions: Change kernel data.
Kernel data is not used in CI or packagin.
Add more information to be useful for automation.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-05-17 10:24:02 -05:00
Frank Cao
32c734e10b
Merge pull request #305 from jodh-intel/add-gometalinter-to-versions-db
versions: Add gometalinter to versions database
2018-05-16 00:15:12 +08:00
Peng Tao
dfdad13e45
Merge pull request #311 from jodh-intel/env-remove-agent-version
kata-env: Remove static agent version
2018-05-15 21:22:36 +08:00
James O. D. Hunt
80bedb005e kata-env: Remove static agent version
Remove the agent version from the output of `kata-env`. The value was
always a static string (`<<unknown>>`) because the runtime cannot
determine the agent version without creating a container.

Note that agent details, including the version, *are* displayed when
the user runs `kata-collect-data.sh`.

Fixes #310.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-05-15 10:27:06 +01:00
Eric Ernst
90fc7e6d85
Merge pull request #296 from devimc/cpu/fixMemFootprint
virtcontainers/qemu: reduce memory footprint
2018-05-14 18:55:25 -07:00
Julio Montes
4527a8066a virtcontainers/qemu: honour CPU constrains
Don't fail if a new container with a CPU constraint was added to
a POD and no more vCPUs are available, instead apply the constraint
and let kernel balance the resources.

Signed-off-by: Julio Montes <julio.montes@intel.com>
2018-05-14 17:33:31 -05:00
Julio Montes
07db945b09 virtcontainers/qemu: reduce memory footprint
There is a relation between the maximum number of vCPUs and the
memory footprint, if QEMU maxcpus option and kernel nr_cpus
cmdline argument are big, then memory footprint is big, this
issue only occurs if CPU hotplug support is enabled in the kernel,
might be because of kernel needs to allocate resources to watch all
sockets waiting for a CPU to be connected (ACPI event).

For example

```
+---------------+-------------------------+
|               | Memory Footprint (KB)   |
+---------------+-------------------------+
| NR_CPUS=240   | 186501                  |
+---------------+-------------------------+
| NR_CPUS=8     | 110684                  |
+---------------+-------------------------+
```

In order to do not affect CPU hotplug and allow to users to have containers
with the same number of physical CPUs, this patch tries to mitigate the
big memory footprint by using the actual number of physical CPUs as the
maximum number of vCPUs for each container if `default_maxvcpus` is <= 0 in
the runtime configuration file,  otherwise `default_maxvcpus` is used as the
maximum number of vCPUs.

Before this patch a container with 256MB of RAM

```
              total        used        free      shared  buff/cache   available
Mem:           195M         40M        113M         26M         41M        112M
Swap:            0B          0B          0B
```

With this patch

```
              total        used        free      shared  buff/cache   available
Mem:           236M         11M        188M         26M         36M        186M
Swap:            0B          0B          0B
```

fixes #295

Signed-off-by: Julio Montes <julio.montes@intel.com>
2018-05-14 17:33:31 -05:00
James O. D. Hunt
a0b10838ee versions: Add gometalinter to versions database
Our tests CI is dependent on `gometalinter` which are run by the static
checks script. However, `gometalinter` changes a lot
and when it does, it breaks (what were) valid PRs.

Add `gometalinter` to the versions database so we can pin the version
we use to a known good one.

Fixes #304.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-05-14 15:39:45 +01:00