All bind mounts are now passed to the guest with 9p.
We need to exclude /dev/shm, as this is passed as a bind mount
in the spec. We handle /dev/shm in the guest by allocating
memory for it on the guest side. Passing /dev/shm as a 9p mount
was causing it to be mounted twice.
Fixes#190
Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
It tracks all existing pods in the current runtime. If the runtime
calls multiple APIs, it can reuse existing pod data structure instead
of re-construct it in every API call.
Signed-off-by: Peng Tao <bergwolf@gmail.com>
To include the grpc yamux dialer.
Included kata agent git log:
e37feac protocol: client: enable builtin yamux client support
a862fea agent: Fix container creation rollback
9602e11 vendor: Update libcontainer vendoring
92f87a1 agent: Rollback properly when container creation fails
128f87d mount: Correct error message with mount failure.
7a182a4 device: VmPath can be empty if an Id is provided
0275654 ci: lib: allow override of tests_repo
205a4d7 github: Add issue template
103aacd announce: Add total memory
e277ec6 announce: Add device and storage handlers
5d7463f announce: Add standard fields when running as PID 1
4655950 agent: Add announce function
5e6c385 CI: Require pullapprove ack for protocol changes
5d40027 tests: Skip more tests if non-root
4ba8499 tests: Use root skip function
9a2da30 tests: Move helper function
ae2be84 device: Add validation and debug
9e7b27c mount: Log params and validate
Signed-off-by: Peng Tao <bergwolf@gmail.com>
When specified, it does not spawn a new process to proxy kata grpc
connections. Instead, the yamux multiplexing functionality is builtin
in the kata agent dialer.
Signed-off-by: Peng Tao <bergwolf@gmail.com>
If kata-runtime is already added as a runtime to
kata-containers.conf then you need not add it again.
Fixes: #49
Signed-off-by: Nitesh Konkar <niteshkonkar@in.ibm.com>
in order to make log-parser happy, mockcontainer must return
always a valid process with a fake PID, since log-parser checks
that PID value in the logs and it must be different to zero
Depends-on: github.com/kata-containers/tests#226
Signed-off-by: Julio Montes <julio.montes@intel.com>
Factorize configuration and hardware support for hotplugging block
devices into a single function and use that.
Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
Use noopAgent in unit tests to add online fake resources.
Fix unit tests according with new changes introduced recently.
fixes#192
Signed-off-by: Julio Montes <julio.montes@intel.com>
The initrd image name should be kata-containers-initrd.img,
as its referenced by this name later on.
Fixes#14
Signed-off-by: Nitesh Konkar <niteshkonkar@in.ibm.com>
The rollback does not work as expected because the error has to be
checked from the defer itself.
Fixes#178
Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
In case the container creation fails, we need a proper rollback
regarding the mounts previously performed.
Fixes#135
Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
In case the container creation fails, we need a proper rollback
regarding the mounts and hotplugs previously performed.
This patch also rework the hotplugDrive() function in order to
prevent createContainer() function complexity to exceed 15.
Fixes#135
Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
Set the qemu major and minor version variables in the hypervisor
configuration script.
Partially fixes#13.
Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Add option to configure if IO needs to be in a separate IO thread.
Add tests to verify option is correctly parsed. The default value
is set to false for now.
This should be considered to be enabled by default in the future.
Fixes#132
Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
Fixes#140
`virtcontainers` had been moved from `github.com/containers/virtcontainers` to
`github.com/kata-containers/runtime/virtcontainers`, so we should remove legacy dependencies
of `github.com/containers/virtcontainers` from go imports and vendors.
Also some documents need to be modified.
Note: vendor is updated with `dep` tool with following command:
`$ dep ensure -update github.com/containers/virtcontainers`
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Add a hypervisor configuration to specify if IO should
be handled in a separate thread. Add support for iothreads for
virtio-scsi for now. Since we attach all scsi drives to the
same scsi controller, all the drives will be handled in a separate
IO thread which would still give better performance.
Going forward we need to assess if adding more controllers and
attaching iothreasds to each of them with distributing drives
among teh scsi controllers should be done, based on more performance
analysis.
Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
Vendor package for pulling in changes related to support
for iothreads with virtio-scsi.
Shortlog for govmm:
9130f37 scsi: Allow scsi controller to associate with an IO thread.
a54de18 iothread: Add ability to configure iothreads
Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
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>