diff options
| author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2026-06-05 03:56:44 +0000 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2026-06-12 02:58:55 +0000 |
| commit | 092f66d511ac303a73fb0853314d792dde69cd28 (patch) | |
| tree | 235ca5387443aa3c3a0df04a89962da30282cb4e /tests/test_k3s_runtime.py | |
| parent | 93440a018d098f34f0c8f6c1a4ad8c66a914c225 (diff) | |
| download | meta-virtualization-092f66d511ac303a73fb0853314d792dde69cd28.tar.gz | |
k3s: fix pause image reference for containerd v2
K3s's default pause image reference "rancher/mirrored-pause:3.6" is a
short name that containerd v1 auto-expanded to the fully qualified
"docker.io/rancher/mirrored-pause:3.6". The k3s v1.36 uprev moved to
containerd v2, which uses a new CRI plugin (io.containerd.cri.v1) with
a pinned_images config instead of the old sandbox_image. Containerd v2
no longer auto-expands short names when looking up pinned images,
causing every pod sandbox creation to fail with "image not found" even
though the image is present in the containerd image store under its
fully qualified name.
Pass --pause-image docker.io/rancher/mirrored-pause:3.6 in both the
server and agent systemd service files to use the fully qualified
reference that containerd v2 can resolve.
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'tests/test_k3s_runtime.py')
| -rw-r--r-- | tests/test_k3s_runtime.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/test_k3s_runtime.py b/tests/test_k3s_runtime.py index 662bdf4c..d26b9164 100644 --- a/tests/test_k3s_runtime.py +++ b/tests/test_k3s_runtime.py | |||
| @@ -419,9 +419,13 @@ def k3s_multinode(request, poky_dir, build_dir, machine, k3s_image): | |||
| 419 | 419 | ||
| 420 | rootfs_orig = ext4_files[-1] | 420 | rootfs_orig = ext4_files[-1] |
| 421 | 421 | ||
| 422 | # Create a copy of the rootfs for the agent VM — two VMs can't | 422 | # Both VMs need their own rootfs copy — the original may still be |
| 423 | # share the same ext4 file read-write | 423 | # locked by a previous runqemu session (single-node test), and two |
| 424 | # VMs can't share the same ext4 file read-write. | ||
| 425 | rootfs_server = Path(f"/tmp/k3s-server-rootfs-{os.getpid()}.ext4") | ||
| 424 | rootfs_agent = Path(f"/tmp/k3s-agent-rootfs-{os.getpid()}.ext4") | 426 | rootfs_agent = Path(f"/tmp/k3s-agent-rootfs-{os.getpid()}.ext4") |
| 427 | print(f"Copying rootfs for server VM: {rootfs_orig} -> {rootfs_server}") | ||
| 428 | shutil.copy2(rootfs_orig, rootfs_server) | ||
| 425 | print(f"Copying rootfs for agent VM: {rootfs_orig} -> {rootfs_agent}") | 429 | print(f"Copying rootfs for agent VM: {rootfs_orig} -> {rootfs_agent}") |
| 426 | shutil.copy2(rootfs_orig, rootfs_agent) | 430 | shutil.copy2(rootfs_orig, rootfs_agent) |
| 427 | 431 | ||
| @@ -438,7 +442,7 @@ def k3s_multinode(request, poky_dir, build_dir, machine, k3s_image): | |||
| 438 | use_kvm=use_kvm, timeout=timeout, | 442 | use_kvm=use_kvm, timeout=timeout, |
| 439 | extra_qemu_params=server_params, | 443 | extra_qemu_params=server_params, |
| 440 | use_runqemu=False, | 444 | use_runqemu=False, |
| 441 | rootfs_path=rootfs_orig, | 445 | rootfs_path=rootfs_server, |
| 442 | kernel_append="k3s.role=server k3s.node-ip=192.168.50.1", | 446 | kernel_append="k3s.role=server k3s.node-ip=192.168.50.1", |
| 443 | log_suffix="-server") | 447 | log_suffix="-server") |
| 444 | 448 | ||
| @@ -454,6 +458,7 @@ def k3s_multinode(request, poky_dir, build_dir, machine, k3s_image): | |||
| 454 | rootfs_path=rootfs_agent, | 458 | rootfs_path=rootfs_agent, |
| 455 | kernel_append="k3s.role=agent k3s.node-ip=192.168.50.2 k3s.node-name=k3s-agent", | 459 | kernel_append="k3s.role=agent k3s.node-ip=192.168.50.2 k3s.node-name=k3s-agent", |
| 456 | log_suffix="-agent") | 460 | log_suffix="-agent") |
| 461 | server._rootfs_copy = str(rootfs_server) | ||
| 457 | agent._rootfs_copy = str(rootfs_agent) | 462 | agent._rootfs_copy = str(rootfs_agent) |
| 458 | 463 | ||
| 459 | try: | 464 | try: |
