Closed mehrdadrad closed 5 years ago
I just found the issue. once we install kata through the automatic or manual (not compile) the configuration.toml doesn't have initrd and it needs to have it instead of image = "...":
initrd = "/usr/share/kata-containers/kata-containers-initrd.img"
then it works properly.
two questions related to template:
how kata can clean up / prune / purge the snapshots? even when I removed the specific image from docker still the template has 2G file for a ~100M docker image. ls -l /run/vc/vm/template/ total 149324 -rw-r--r-- 1 root root 2147483648 Jan 17 00:01 memory -rw-r----- 1 root root 2215987 Jan 17 00:01 state
once we enabled vm templating, the cold time takes two/three times of the cold time w/o vm templating enabled. I think preparing and writing the snapshot for the second call causes extra delay for the cold time. I didn't check the code but can we do the snapshot at the background after the docket turned up? I tried the redis docker image and the timing were as below: it took 1.6s w/o vm templating enabled for the first time (cold) it took 4.7s w/ vm templating enabled for the first time (cold)
@mehrdadrad Yes, vm templating requires initrd
to work. And to answer your two questions, you can use kata-runtime factory init
to create and destroy the vm template if you do not want it to interfere with your first time container creation. And kata-runtime factory destroy
purges the template image from /run/vc/vm/template
.
thanks @bergwolf init and destroy work for me!
cool. @mehrdadrad do you have more questions/issue w.r.t. vm templating? If not, please close the issue. Thanks!
Thanks @bergwolf
Description of problem
I use kata w/ docker on a Ubuntu 18.04.1 LTS and once I enabled the vm template through enable_template = true, then it couldn't run a container and showed the below error: docker: Error response from daemon: OCI runtime create failed: Failed to check if grpc server is working: rpc error: code = Unavailable desc = transport is closing: unknown.
It works once it disabled
Expected result
run a container
Actual result
docker run -d redis 5ceac679871425e22543ab4ac1e3310ca4ffcd9f12fe2874eb4185031413bcaa docker: Error response from daemon: OCI runtime create failed: Failed to check if grpc server is working: rpc error: code = Unavailable desc = transport is closing: unknown.
Meta details
Running
kata-collect-data.sh
version1.4.2 (commit a129b48)
at2019-01-16.20:16:37.563939341+0000
.Runtime is
/usr/bin/kata-runtime
.kata-env
Output of "
/usr/bin/kata-runtime kata-env
":Runtime config files
Runtime default config files
Runtime config file contents
Config file
/etc/kata-containers/configuration.toml
not found Output of "cat "/usr/share/defaults/kata-containers/configuration.toml"
":KSM throttler
version
Output of "
/usr/libexec/kata-ksm-throttler/kata-ksm-throttler --version
":systemd service
Image details
Initrd details
No initrd
Logfiles
Runtime logs
Recent runtime problems found in system journal:
Proxy logs
Recent proxy problems found in system journal:
Shim logs
No recent shim problems found in system journal.
Throttler logs
No recent throttler problems found in system journal.
Container manager details
Have
docker
Docker
Output of "
docker version
":Output of "
docker info
":Output of "
systemctl show docker
":No
kubectl
Packages
Have
dpkg
Output of "dpkg -l|egrep "(cc-oci-runtimecc-runtimerunv|kata-proxy|kata-runtime|kata-shim|kata-ksm-throttler|kata-containers-image|linux-container|qemu-)"
":No
rpm