From 3a6230af6b4a7b9a2cea3f61ce4693a2c5b1cbae Mon Sep 17 00:00:00 2001
From: Cristian Calin <6627509+cristicalin@users.noreply.github.com>
Date: Mon, 27 Sep 2021 18:07:35 +0300
Subject: [PATCH] Kata-Containers: update versions 2.2.0 (default) and 2.1.1
 (#8017)

* Kata-Containers: add 2.2.0 hashes and make default

* Kata-Containers: replace 2.1.0 with bugfix version 2.1.1

* Kata-Containers: move to q35 a more modern VM architecture as 'pc' is removed in 2.2.0
---
 .../templates/configuration-qemu.toml.j2              |  2 +-
 roles/download/defaults/main.yml                      | 11 +++++++----
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/roles/container-engine/kata-containers/templates/configuration-qemu.toml.j2 b/roles/container-engine/kata-containers/templates/configuration-qemu.toml.j2
index fa4aadc7d..334a2d977 100644
--- a/roles/container-engine/kata-containers/templates/configuration-qemu.toml.j2
+++ b/roles/container-engine/kata-containers/templates/configuration-qemu.toml.j2
@@ -14,7 +14,7 @@
 path = "/opt/kata/bin/qemu-system-x86_64"
 kernel = "/opt/kata/share/kata-containers/vmlinuz.container"
 image = "/opt/kata/share/kata-containers/kata-containers.img"
-machine_type = "pc"
+machine_type = "q35"
 
 # Optional space-separated list of options to pass to the guest kernel.
 # For example, use `kernel_params = "vsyscall=emulate"` if you are having
diff --git a/roles/download/defaults/main.yml b/roles/download/defaults/main.yml
index 11428d91d..7f711b719 100644
--- a/roles/download/defaults/main.yml
+++ b/roles/download/defaults/main.yml
@@ -52,7 +52,7 @@ image_arch: "{{host_architecture | default('amd64')}}"
 kubeadm_version: "{{ kube_version }}"
 etcd_version: v3.4.13
 crun_version: 0.21
-kata_containers_version: 2.1.0
+kata_containers_version: 2.2.0
 gvisor_version: 20210518.0
 
 # gcr and kubernetes image repo define
@@ -399,13 +399,16 @@ crun_checksums:
 kata_containers_binary_checksums:
   arm:
     2.0.4: 0
-    2.1.0: 0
+    2.1.1: 0
+    2.2.0: 0
   amd64:
     2.0.4: 022a60c2d92a5ab9a5eb83d5a95154a2d06fdc2206b2a473d902ccc86766371a
-    2.1.0: c954cdd723bad4ee20e57f107fe1064f0a00f4c349c1826b7a0f89d02f94dec0
+    2.1.1: a83591d968cd0f1adfb5025d7aa33ca1385d4b1165ff10d74602302fc3c0373f
+    2.2.0: 50163e2a430e96447117f7169a4ed5a8bdea09267d62a39221d5b8b3b3f88c0e
   arm64:
     2.0.4: 0
-    2.1.0: 0
+    2.1.1: 0
+    2.2.0: 0
 
 gvisor_runsc_binary_checksums:
   arm:
-- 
GitLab