alpine-overlay/kubezero/cri-o/fix-test.patch

73 lines
2.7 KiB
Diff
Raw Normal View History

2023-07-04 15:10:30 +00:00
diff --git a/test/cgroups.bats b/test/cgroups.bats
index 8beb6f06..80193413 100644
--- a/test/cgroups.bats
+++ b/test/cgroups.bats
@@ -45,6 +45,10 @@ EOF
}
@test "conmon pod cgroup" {
+ if [[ "$CONTAINER_CGROUP_MANAGER" != "systemd" ]]; then
+ skip "need systemd cgroup manager"
+ fi
+
CONTAINER_CGROUP_MANAGER="systemd" CONTAINER_DROP_INFRA_CTR=false CONTAINER_CONMON_CGROUP="pod" start_crio
jq ' .linux.cgroup_parent = "Burstablecriotest123.slice"' \
@@ -61,6 +65,10 @@ EOF
skip "not yet supported by conmonrs"
fi
+ if [[ "$CONTAINER_CGROUP_MANAGER" != "systemd" ]]; then
+ skip "need systemd cgroup manager"
+ fi
+
CONTAINER_CGROUP_MANAGER="systemd" CONTAINER_DROP_INFRA_CTR=false CONTAINER_MANAGE_NS_LIFECYCLE=false CONTAINER_CONMON_CGROUP="customcrioconmon.slice" start_crio
jq ' .linux.cgroup_parent = "Burstablecriotest123.slice"' \
@@ -77,6 +85,10 @@ EOF
skip "not supported for conmon"
fi
2022-04-13 17:07:07 +00:00
2023-07-04 15:10:30 +00:00
+ if [[ "$CONTAINER_CGROUP_MANAGER" != "systemd" ]]; then
+ skip "need systemd cgroup manager"
+ fi
+
configure_monitor_cgroup_for_conmonrs "customcrioconmon.slice"
CONTAINER_CGROUP_MANAGER="systemd" CONTAINER_DROP_INFRA_CTR=true start_crio
diff --git a/test/cni_plugin_helper.bash b/test/cni_plugin_helper.bash
index 04492172..abae521e 100755
2022-04-13 17:07:07 +00:00
--- a/test/cni_plugin_helper.bash
+++ b/test/cni_plugin_helper.bash
2023-07-04 15:10:30 +00:00
@@ -48,7 +48,7 @@ EOT
2022-04-13 17:07:07 +00:00
. "$TEST_DIR"/cni_plugin_helper_input.env
rm -f "$TEST_DIR"/cni_plugin_helper_input.env
-result=$(/opt/cni/bin/bridge "$@") || exit $?
+result=$(/usr/libexec/cni/bridge "$@") || exit $?
if [[ "${DEBUG_ARGS}" == "malformed-result" ]]; then
cat <<-EOF
2023-07-04 15:10:30 +00:00
diff --git a/test/helpers.bash b/test/helpers.bash
index f7f8e1f2..45b7dd58 100644
--- a/test/helpers.bash
+++ b/test/helpers.bash
@@ -38,7 +38,7 @@ CONTAINER_UID_MAPPINGS=${CONTAINER_UID_MAPPINGS:-}
CONTAINER_GID_MAPPINGS=${CONTAINER_GID_MAPPINGS:-}
OVERRIDE_OPTIONS=${OVERRIDE_OPTIONS:-}
# CNI path
-CONTAINER_CNI_PLUGIN_DIR=${CONTAINER_CNI_PLUGIN_DIR:-/opt/cni/bin}
+CONTAINER_CNI_PLUGIN_DIR=${CONTAINER_CNI_PLUGIN_DIR:-/usr/libexec/cni}
# Runtime
CONTAINER_DEFAULT_RUNTIME=${CONTAINER_DEFAULT_RUNTIME:-runc}
RUNTIME_BINARY_PATH=$(command -v "$CONTAINER_DEFAULT_RUNTIME")
@@ -70,7 +70,7 @@ CHECKCRIU_BINARY=${CHECKCRIU_BINARY:-${CRIO_ROOT}/test/checkcriu/checkcriu}
# The default log directory where all logs will go unless directly specified by the kubelet
DEFAULT_LOG_PATH=${DEFAULT_LOG_PATH:-/var/log/crio/pods}
# Cgroup manager to be used
-CONTAINER_CGROUP_MANAGER=${CONTAINER_CGROUP_MANAGER:-systemd}
+CONTAINER_CGROUP_MANAGER=${CONTAINER_CGROUP_MANAGER:-cgroupfs}
# Image volumes handling
CONTAINER_IMAGE_VOLUMES=${CONTAINER_IMAGE_VOLUMES:-mkdir}
# Container pids limit