mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2025-12-14 22:04:43 +03:00
Kata-Containers: Fix kata-containers runtime (#8068)
* Kata-containes: Fix for ubuntu and centos sometimes kata containers fail to start because of access errors to /dev/vhost-vsock and /dev/vhost-net * Kata-containers: use similar testing strategy as gvisor * Kata-Containers: adjust values for 2.2.0 defaults Make CI tests actually pass * Kata-Containers: bump to 2.2.2 to fix sandbox_cgroup_only issue
This commit is contained in:
@@ -14,17 +14,24 @@ def test_run(host):
|
||||
assert "kata-runtime" in cmd.stdout
|
||||
|
||||
|
||||
def test_run_pod(host):
|
||||
image = "docker.io/library/hello-world:latest"
|
||||
runtime = "io.containerd.kata-qemu.v2"
|
||||
|
||||
pull_command = "ctr image pull {}".format(image)
|
||||
def test_run_check(host):
|
||||
kataruntime = "/opt/kata/bin/kata-runtime"
|
||||
with host.sudo():
|
||||
cmd = host.command(pull_command)
|
||||
cmd = host.command(kataruntime + " check")
|
||||
assert cmd.rc == 0
|
||||
assert "System is capable of running" in cmd.stdout
|
||||
|
||||
run_command = "ctr run --runtime {} {} kata1".format(runtime, image)
|
||||
|
||||
def test_run_pod(host):
|
||||
runtime = "kata-qemu"
|
||||
|
||||
run_command = "/usr/local/bin/crictl run --with-pull --runtime {} /tmp/container.json /tmp/sandbox.json".format(runtime)
|
||||
with host.sudo():
|
||||
cmd = host.command(run_command)
|
||||
assert cmd.rc == 0
|
||||
assert "Hello from Docker!" in cmd.stdout
|
||||
|
||||
with host.sudo():
|
||||
log_f = host.file("/tmp/kata1.0.log")
|
||||
|
||||
assert log_f.exists
|
||||
assert b"Hello from Docker!" in log_f.content
|
||||
|
||||
Reference in New Issue
Block a user