We should refine unit test which involves func SupportsVsocks and newly
reconstructed struct kernelModule.
Fixes: #1512
Signed-off-by: Penny Zheng <penny.zheng@arm.com>
Since we prefer vsock over virtio serial port, we add 'vhost_vsock'
in kernel mosules list.
But vhost_vsock.ko shouldn't be the definitely required kernel modules,
afterall, we could also use virtio serial port.
if kata-env shows SupportsVSocks as false, users could run kata-check
to manually load vhost_vsock.ko and get detailed info(errors)
Fixes: #1512
Signed-off-by: Penny Zheng <penny.zheng@arm.com>
QEMU opens /dev/vhost-vsock and this causes vhost_vsock.ko to be
automatically loaded.
So, checking the existence of /dev/vhost-vsock is enough.
Fixes: #1512
Signed-off-by: Penny Zheng <penny.zheng@arm.com>
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>
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>
Previously, the comment on `NeedDistroVersionEquals()` erroneously
referred to `NeedDistroVersionLT()`.
Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
`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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
sockets * cores * threads should be equal to maxcpus otherwise a
warning is thrown: 'warning: Invalid CPU topology deprecated:
sockets * cores * threads != maxcpus'
This warning in the future will be an error and won't be possible to run
kata containers.
fixes#1605
Signed-off-by: Julio Montes <julio.montes@intel.com>