Skip to content

Commit

Permalink
tests: adapt Mariner CI to unblock CH v39 upgrade
Browse files Browse the repository at this point in the history
The CH v39 upgrade in kata-containers#9575 is currently blocked because of a bug in the
Mariner host kernel. To address this, we temporarily tweak the Mariner
CI to use an Ubuntu host and the Kata guest kernel, while retaining the
Mariner initrd. This is tracked in kata-containers#9594.

Importantly, this allows us to preserve CI for genpolicy. We had to
tweak the default rules.rego however, as the OCI version is now
different in the Ubuntu host. This is tracked in kata-containers#9593.

This change has been tested together with CH v39 in kata-containers#9588.

Signed-off-by: Aurélien Bombo <abombo@microsoft.com>
  • Loading branch information
sprt committed May 3, 2024
1 parent e5e0983 commit 0cc2b07
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/tools/genpolicy/rules.rego
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ CreateContainerRequest {
p_oci := p_container.OCI

print("CreateContainerRequest: p Version =", p_oci.Version, "i Version =", i_oci.Version)
p_oci.Version == i_oci.Version
# TODO: Reenable when the Mariner host is reinstated, see #9593.
# p_oci.Version == i_oci.Version

print("CreateContainerRequest: p Readonly =", p_oci.Root.Readonly, "i Readonly =", i_oci.Root.Readonly)
p_oci.Root.Readonly == i_oci.Root.Readonly
Expand Down
3 changes: 1 addition & 2 deletions tests/gha-run-k8s-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,7 @@ function create_cluster() {
-n "$(_print_cluster_name ${test_type})" \
-s "$(_print_instance_type)" \
--node-count 1 \
--generate-ssh-keys \
$([ "${KATA_HOST_OS}" = "cbl-mariner" ] && echo "--os-sku AzureLinux --workload-runtime KataMshvVmIsolation")
--generate-ssh-keys
}

function install_bats() {
Expand Down
1 change: 0 additions & 1 deletion tests/integration/kubernetes/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ add_cbl_mariner_kernel_initrd_annotations() {

for K8S_TEST_YAML in runtimeclass_workloads_work/*.yaml
do
add_annotations_to_yaml "${K8S_TEST_YAML}" "${mariner_annotation_kernel}" "${mariner_kernel_path}"
add_annotations_to_yaml "${K8S_TEST_YAML}" "${mariner_annotation_initrd}" "${mariner_initrd_path}"
done
fi
Expand Down

0 comments on commit 0cc2b07

Please sign in to comment.