If a container is not running, but created/ready instead, this means
a container process exists and that we can actually exec another
process inside this container. The container does not have to be
in running state.
Fixes#120
Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
In case a consumer of virtcontainers tries to start/stop a container,
or stop a pod, and for some reasons, this fails, virtcontainers always
tries to delete everything related to the container or the pod before
it returns the error.
The caller of the runtime is the one responsible for cleaning things
up if something goes wrong, that's why this cleanup call is never
needed.
A real example of that is the case of cc-runtime and CRI-O, where this
cleanup prevented CRI-O from retrieving proper state of the container
after the failure, leading to the inability to stop and remove the
container and the VM afterwards.
Fixes#87
Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit modifies version.yaml to now point to the qemu
2.11 stable version.
It modifies the default QEMU_CMD to be qemu-system-x86_64
instead of qemu-lite-system-x86_64.
And modifies virtcontainers unit tests to now point to the
correct QEMU_CMD.
Fixes: #118.
Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
Qemu 2.11 does not support --disable-static flag and
--enable-strip flag, this patch adds a condition
to only use it for qemu 2.7 or older.
Fixes: #11.
Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
Add details on how to disable the `initrd` config option to ensure the
base system as documented is functional.
Fixes#42.
Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
This script will ensure we use a single source of qemu build
options for the Kata Containers project.
Fixes: #7.
Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
The kata_agent.go code breaks after the first /dev/shm. But in case
several are defined, the agent will crash since other /dev/shm will
be wrongly configured in the OCI spec mounts.
Fixes#127
Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
Instead of ignoring containers based on their path, this commit
relies on the type of mount being "bind" to choose if this mount
should be ignored or not.
For instance, we have some use cases where k8s expects the path
"/dev/container-log" to be bind mounted inside the container, but
the code ignores it because it has the prefix "/dev" which is a
system prefix mount.
Fixes#122
Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
Don't use a copy of the go test script, use the central version for
consistency with the other repos.
Fixes#125.
Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
The table of contents showed an incorrect link for building and
installing the runtime.
Fixes#40.
Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Change the command to enable agent debug slightly so that even if the
config file specifies kernel parameters, the command will successfully
enable the agent debug.
Fixes#38.
Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Add a YAML format database that is the equivalent of the Clear
Containers `versions.txt` file [1].
The file defines the versions of important non-golang dependencies used
by this and other Kata repositories particularly for testing and packaging.
Defining all version details centrally in this file avoids duplication
and "bit-rot" when versions need to be changed.
[1] - https://github.com/clearcontainers/runtime/blob/master/versions.txtFixes#11.
Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
To fix CI complains:
virtcontainers/qemu.go:248:⚠️ cyclomatic complexity 18 of
function (*qemu).createPod() is high (> 15) (gocyclo)
Signed-off-by: Peng Tao <bergwolf@gmail.com>
Add `initrd=[path]` option to configuration.toml and use it to set
the HypervisorConfig.InitrdPath option.
The default value of hypervisor image option is removed since we want
to allow it to be unset. For the same reason, there is no default value
for hypervisor initrd option either.
Signed-off-by: Peng Tao <bergwolf@gmail.com>
If an initrd image is configured in HypervisorConfig or passed in by
annotations, append it to qemu command line arguments.
Fixes: #97
Signed-off-by: Peng Tao <bergwolf@gmail.com>
This patch introduces a bash library (scripts/lib.sh) that concentrates
common functions. This also enhances future additions of other OSes, making
it more simple. Also, new variables were introduced in each distro config.sh
in order to parameterise the creation of package manager config (dnf/yum, in this case).
A fix to the resulting rootfs directory name (include OS name) is also fixed in this
patch.
Fixes#39Fixes#34
Signed-off-by: Erick Cardona <erick.cardona.ruiz@intel.com>
With this patch VFIO devices are hot plugged in the VM, that means
no more cold plug in kata containers.
fixes#85
Signed-off-by: Julio Montes <julio.montes@intel.com>
To fulfill the kata design requirements, and based on the disscusion on
Virtcontainers API extentions, runtime API early sketch and runtime API
comparison, this commit added the high level design of the kata runtime
library API.
fixes: #26
Signed-off-by: Peng Tao <bergwolf@gmail.com>