Commit Graph

1760 Commits

Author SHA1 Message Date
Fupan Li
838661044f
Merge pull request #1641 from Ace-Tang/leak-ns
vc: fix netns leak
2019-05-10 09:42:16 +08:00
GabyCT
44a5953e45
Merge pull request #1654 from jodh-intel/fix-test-constraint-version-numbers
Fix test constraint version numbers
2019-05-09 16:21:46 -05:00
Salvador Fuentes
b1d8e9f064
Merge pull request #1618 from GabyCT/topic/updatek8s
versions: Update K8s and CRI-O version
2019-05-09 15:13:28 -05:00
Ace-Tang
a5bc98c150 vc: fix netns leak
when kata container start fails, netns will leak, add a defer func
to fix it

Fixes: #1640

Signed-off-by: Ace-Tang <aceapril@126.com>
2019-05-09 23:07:16 +08:00
James O. D. Hunt
0c207c16ef katatestutils: Add missing distro version constraints
Added the following distro version constraints for parity with the
kernel version constraints:

- `NeedDistroVersionGE()`
- `NeedDistroVersionLE()`
- `NeedDistroVersionNotEquals()`

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2019-05-09 15:37:57 +01:00
James O. D. Hunt
2bc03f23e0 katatestutils: Fix version check bug
Fix version comparison bug whereby the specified operator was being
applied to the wrong version number.

The version handling for distro and kernel versions was incorrect. This
was not clear as the internal logic was rather difficult to understand.
Renaming `constraintInvalid()` to `constraintValid()` and updating
`NotValid()` correspondingly makes the logic clearer and exposed the
bug, allowing it to be fixed.

Added two new tests to ensure correct behaviour:

- `TestConstraintNotValidKernelVersion()`
- `TestConstraintNotValidDistroVersion()`

Fixes #1653.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2019-05-09 15:35:29 +01:00
Salvador Fuentes
0162e41d78
Merge pull request #1645 from egernst/nemu-bump
Nemu bump
2019-05-09 09:26:16 -05:00
James O. D. Hunt
1bec735cb6 katatestutils: Fix NeedDistroVersionEquals comment
Previously, the comment on `NeedDistroVersionEquals()` erroneously
referred to `NeedDistroVersionLT()`.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2019-05-09 15:00:21 +01:00
James O. D. Hunt
20b558656d katatestutils: Reset TestConstraints fields on NotValid() call
`TestConstraint.NotValid()` is really designed to be called once per
test. However, there is no reason it should not be possible to call
multiple times. But to allow for that secenario, any settings
from a previous `NotValid()` call need to be cleared.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2019-05-09 14:56:38 +01:00
Gabriela Cervantes
4b6370160a test: Skip namespace test on Centos
Skip TestHostNetworkingRequested test as nsfs is not supported on
older kernel versions. Currently, CentOS has issues with this test a
is using a kernel version of 3.10 and to run this test we need a
kernel version greater than 3.19.

Fixes #1629

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2019-05-09 08:05:21 -05:00
lifupan
8eb09dec67 shimv2: fix the issue ttrpc server canceled context
This latest ttrpc vendor supports the feature of request timeout propgation.
this feature will do context cancel after a service call return, and this cancel
will propagated into kata sandbox's agent/hypervisor and resulted in the following
calls canceled. To fix this issue, pass the service's context instead of the service's
call's context to CreateSandbox(), and this context will live until the shim exited.

Fixes:#1627

Signed-off-by: lifupan <lifupan@gmail.com>
2019-05-09 04:58:30 -04:00
James O. D. Hunt
bb44f65a68
Merge pull request #1623 from awprice/system-mount-skip
mounts: fix isSystemMount check for mountSharedDirMounts
2019-05-09 09:38:11 +01:00
lifupan
1b33fe4022 shimv2: create the rootfs dir if it doesn't exist
Latest containerd commit<c0f0b21314b93a1> had moved the
step of creating rootfs dir from creating bundle to container
creation; in order to support both of the old and latest
containerd, check the "rootfs" existed before creating it.

Fixes:#1652

Signed-off-by: lifupan <lifupan@gmail.com>
2019-05-09 04:20:48 -04:00
Wei Zhang
297097779e persist: save/load GuestMemoryHotplugProbe
Support saving/loading `GuestMemoryHotplugProbe` from sandbox state.

Signed-off-by: Wei Zhang <zhangwei555@huawei.com>
2019-05-09 14:39:04 +08:00
Gabriela Cervantes
3eaec42c86 versions: Update K8s and CRI-O version
This will update the k8s version to 1.14.1 and CRI-O to
commit 3ddde3dee35a239712ee26fa542abe5609c4f44f.
We are using this commit as crio 1.14 has an issue: cri-o/cri-o#2221
and also does not include test fixes of cri-o/cri-o@7b8c298.

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

Fixes #1617

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2019-05-09 00:10:50 -05:00
katacontainersbot
677c7083b5 release: Kata Containers 1.7.0-rc1
- firecracker: Setup rootfs to be RO
- firecracker: Upgrade firecracker to 0.16.0
- Add virtio-fs support (alternative to virtio-9p)
- virtcontainers: fix invalid CPU topology
- Firecracker: Fix kernel command line parameters
- Firecracker: update to version v0.15.2
- devices: Skip floppy drives while passing devices to guest
- Add test skip utils
- firecracker: Add support for v0.15.x
- firecracker: Add support for default VM configuration
- build: Fix virtcontainers static check make target
- virtcontainers: Use shim to print the agent logs if there is no proxy
- shim v2: fix set status when container exit
- cli: do not fail on list when some containers bust
- versions: Bump NEMU version to latest release
- Revert "vc: change container rootfs to be a mount"
- Add agent trace support
- network: pass network interface RawFlags to agent
- Fix markdown
- Fix parallel make
- Update golang to 1.12.3
- vc: change container rootfs to be a mount
- persist: baseline persist data format
- factory: Add new factory option template_path
- vc: remove BlockIndex from container state
- factory: Check if vm templateing is on before vm templateing initialize

5e9cb48 firecracker: Setup rootfs to be RO
93e6ad1 firecracker: Upgrade firecracker to 0.16.0
0a69eb8 kata-env: add SharedFS option to output
75f7586 virtiofs: Add cache option
6767c1a virtiofs: Add cache size option
82d1a9d kata_agent: use virtio-fs shared dir in CreateSandbox
9480978 qemu: add vhost-user-fs-pci device instead of 9p
c155775 Firecracker: Fix kernel command line parameters
b496f3f firecracker: Add support for default VM configuration
f75b7fe firecracker: Add support for v0.15.x
23f7cfa tests: Update test code to use test constraints
8e144e0 pkg: Add test constraints feature
d690dff config: add virtio_fs_daemon string
9e87fa2 config: add shared_fs option
0217077 vendor: update govmm
9f87e78 build: Fix virtcontainers static check make target
fa5de87 virtcontainers: fix invalid CPU topology
b7f51be cli: do not fail on list when some containers bust
854cc86 shimv2: fix set status when container exit
582f20f virtcontainers: Use shim to print the agent logs if there is no proxy
da0ae03 versions: Bump NEMU version to latest release
ed64240 agent: Support Kata agent tracing
b573d9b vendor: Update for agent tracing and fix issues
b309dc5 agent: Provide explicit config options for the agent
87d9171 utils: Remove code duplication
ed248ce shim: Removed unused type and correct error message
97beb2b errors: Create a new standard error for invalid config
e803a7f agent: Return an error, not just an interface
bc9b9e2 vc: Revert "vc: change container rootfs to be a mount"
dd0808a network: pass network interface RawFlags to agent
196661b vc: change container rootfs to be a mount
989b373 docs: fix lisence header to 2019
3262da0 bugfix: fix potential panic
9bd4e50 store: address comments
0f52c8b test: add unit test for new FS storage driver
02f2122 test: fix unit test
e40dcb9 storage: set new storage driver as "experimental"
504c706 storage: address comments
6e4149d persist: save and restore state from persist.json
039ed4e persist: persist device data
b42fde6 persist: demo code for persist api
e14ffb4 persist: baseline persist data format
0549a70 factory: Add new factory option template_path
f6b8387 devices: Skip floppy drives while passing devices to guest
82d105f doc: Fix markdown
1a0a4bc doc: Fix broken internal link
92edeb1 doc: Simplify note
2037286 vc: remove BlockIndex from container state
76a5076 template: Add check if vm template is on before vm template initialize
8097c54 Firecracker: update to version v0.15.2
53ebe51 build: fix race between 'clean' and generated files
7949cd6 build: turn COMMIT into a file dependency
0f7bb25 build: extract config-generated.go.in from Makefile
1eb5d6c build: use MAKEFILE_LIST for a more complete Makefile dependency
bbf9253 build: add VERSION dependency to netmon target
b20fd9d build: remove duplicated COLLECT_SCRIPT from clean
e26f342 build: Update golang to 1.12.3

Signed-off-by: katacontainersbot <katacontainersbot@gmail.com>
2019-05-09 00:24:31 +00:00
Eric Ernst
00b3c8b384 version: update descriptions for accuracy
People, these are VMMs, *not* hypervisors.

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-05-08 17:16:50 -07:00
Eric Ernst
731dcc0d29 version: bump nemu version
Update to latest version of NEMU

Fixes: #1644

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-05-08 16:40:20 -07:00
Eric Ernst
a7935d419e
Merge pull request #1633 from mcastelino/topic/fc-fixes
firecracker: Setup rootfs to be RO
2019-05-08 09:30:02 -07:00
Graham Whaley
7327f8a77b
Merge pull request #1631 from mcastelino/topic/fc_0_16_0
firecracker: Upgrade firecracker to 0.16.0
2019-05-08 09:54:03 +01:00
Manohar Castelino
5e9cb48b8f firecracker: Setup rootfs to be RO
Setup rootfs to be RO both from the VMM point of view and the
VM point of view.

Fixes: #1632

Signed-off-by: Manohar Castelino <manohar.r.castelino@intel.com>
2019-05-07 15:03:28 -07:00
Manohar Castelino
93e6ad1f4f firecracker: Upgrade firecracker to 0.16.0
Upgrade firecracker to 0.16.0

Fixes: #1626

Signed-off-by: Manohar Castelino <manohar.r.castelino@intel.com>
2019-05-07 14:44:02 -07:00
Eric Ernst
9a27ac29bc
Merge pull request #1016 from stefanha/virtio-fs-core
Add virtio-fs support (alternative to virtio-9p)
2019-05-07 11:19:58 -07:00
Salvador Fuentes
4c5527f8a8
Merge pull request #1606 from devimc/topic/virtcontainers/fixCpuTopology
virtcontainers: fix invalid CPU topology
2019-05-07 10:13:27 -05:00
Wei Zhang
4c192139cf newstore: remove file "devices.json"
When using experimental feature "newstore", we save and load devices
information from `persist.json` instead of `devices.json`, in such case,
file `devices.json` isn't needed anymore, so remove it.

Signed-off-by: Wei Zhang <zhangwei555@huawei.com>
2019-05-06 14:40:08 +08:00
Stefan Hajnoczi
0a69eb8fff kata-env: add SharedFS option to output
It's useful to know whether virtio-9p or virtio-fs is being used.  Add
the status to the kata-env output.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2019-05-05 11:32:34 -06:00
Dr. David Alan Gilbert
75f75862c2 virtiofs: Add cache option
Several cache modes are supported by virtio-fs.  They affect the
performance and consistency characteristics of the file system.

For the time being cache="none" is recommended, but the other modes can
be experimented with.

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
2019-05-05 11:32:34 -06:00
Dr. David Alan Gilbert
6767c1a358 virtiofs: Add cache size option
Add VirtioFSCacheSize aka virtio_fs_cache_size option
to set the size (in MiB) of the DAX cache.

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
2019-05-05 11:32:34 -06:00
Stefan Hajnoczi
82d1a9d6f4 kata_agent: use virtio-fs shared dir in CreateSandbox
Use virtio-fs instead of virtio-9p when virtio-fs is enabled.

Fixes: #1542
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2019-05-05 11:32:34 -06:00
Stefan Hajnoczi
9480978364 qemu: add vhost-user-fs-pci device instead of 9p
When enable_virtio_fs is true, add a vhost-user-fs-pci for the
kataShared volume instead of 9p.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2019-05-05 11:32:34 -06:00
Hui Zhu
a7e2bbd31c
Merge pull request #1621 from mcastelino/topic/fc_bootparams
Firecracker: Fix kernel command line parameters
2019-05-05 11:05:13 +08:00
Hui Zhu
954d9cea80
Merge pull request #1560 from egernst/fc-bump
Firecracker: update to version v0.15.2
2019-05-04 11:07:09 +08:00
Manohar Castelino
c15577565e Firecracker: Fix kernel command line parameters
Firecracker does not support pci. It also uses kbd to implement reboot/reset.
Fix the kernel boot params to address this.

It also does not have good entropy at startup. Use the hardware random
number generator to support entropy.

Fixes: #1620

Signed-off-by: Manohar Castelino <manohar.r.castelino@intel.com>
2019-05-03 16:08:56 -07:00
Graham Whaley
ea71133d1a
Merge pull request #1558 from amshinde/ignore-floppy-drives
devices: Skip floppy drives while passing devices to guest
2019-05-03 17:34:11 +01:00
Graham Whaley
b5b1c38bc4
Merge pull request #1587 from jodh-intel/add-test-skip-utils
Add test skip utils
2019-05-03 16:04:26 +01:00
Alex Price
709feac057 mounts: fix isSystemMount check for mountSharedDirMounts
This change updates the isSystemMount check for mountSharedDirMounts
when setting up shared directory mounts for the container and uses
the source of the mount instead of the destination for the check.

We want to exclude system mounts from the host side as they
shouldn't be mounted into the container.

We do however want to allow system mounts within the
container as denying them can prevent some containers from
running properly.

Fixes #1591

Signed-off-by: Alex Price <aprice@atlassian.com>
2019-05-03 12:17:36 +10:00
Eric Ernst
fada1e94b0
Merge pull request #1614 from mcastelino/topic/firecracker_015
firecracker: Add support for v0.15.x
2019-05-02 17:37:53 -06:00
Eric Ernst
2051dac527
Merge pull request #1615 from mcastelino/topic/fc_cpu_mem
firecracker: Add support for default VM configuration
2019-05-02 15:22:03 -06:00
Manohar Castelino
b496f3f71d firecracker: Add support for default VM configuration
Kata support specifing the default VM configuration via
configuration.toml. This allows the system or cluster admin
to choose the default (i.e minimum) size of the VM.

Add support in kata to respect the VM configuration for firecracker.

Also refactor some code to make error handling uniform.

Fixes: #1594

Signed-off-by: Manohar Castelino <manohar.r.castelino@intel.com>
2019-05-02 17:06:11 +00:00
Manohar Castelino
f75b7fed7e firecracker: Add support for v0.15.x
Add support for v0.15.x. Change the drive naming scheme to match
the requirement of v0.15.x

Fixes: #1598

Signed-off-by: Manohar Castelino <manohar.r.castelino@intel.com>
2019-05-02 16:47:15 +00:00
James O. D. Hunt
23f7cfa9f4 tests: Update test code to use test constraints
Updated the test code to use the new test constraints feature.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2019-05-02 15:42:35 +01:00
James O. D. Hunt
8e144e08e6 pkg: Add test constraints feature
Enhance the `katatestutils` package to provide the ability to skip
tests based on either user or distro the tests are running on.

Fixes #1586.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2019-05-02 15:42:33 +01:00
James O. D. Hunt
570eff653f
Merge pull request #1610 from jodh-intel/fix-virtcontainers-makefile
build: Fix virtcontainers static check make target
2019-05-01 17:11:59 +01:00
Stefan Hajnoczi
d690dff164 config: add virtio_fs_daemon string
Add a config option for the virtio-fs vhost-user daemon path.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2019-05-01 10:55:31 -04:00
Stefan Hajnoczi
9e87fa21cf config: add shared_fs option
Add a config option to select between virtio-9p and virtiofs.  This
option currently has no effect and will be used in a later patch.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2019-05-01 10:55:31 -04:00
Stefan Hajnoczi
0217077a36 vendor: update govmm
Shortlog:
b3e7a9e Merge pull request #91 from stefanha/virtio-fs-cache-size-mb
058cda0 qemu: use MiB instead of Gib for virtio-fs cache size

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2019-05-01 09:59:53 -04:00
James O. D. Hunt
2f020f5a52
Merge pull request #1597 from devimc/topic/virtcontainers/ShimPrintsAgentLogs
virtcontainers: Use shim to print the agent logs if there is no proxy
2019-05-01 14:47:48 +01:00
Fupan Li
98d60532ec
Merge pull request #1601 from Ace-Tang/exit_status
shim v2: fix set status when container exit
2019-05-01 19:51:29 +08:00
James O. D. Hunt
9f87e7870c build: Fix virtcontainers static check make target
The virtcontainers `Makefile` was referencing an old script to handle
static checks. Although these are still run if `make` is invoked at the
top-level, correct the error.

Fixes #1609.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2019-04-30 09:18:22 +01:00
Hui Zhu
4cc8e1a2d0
Merge pull request #1599 from Ace-Tang/list
cli: do not fail on list when some containers bust
2019-04-30 16:01:16 +08:00