From 4dcf33581ca09a6e22e3e3f80cca7bf4fdd0f338 Mon Sep 17 00:00:00 2001 From: Antonio Murdaca Date: Thu, 18 May 2017 17:39:44 +0200 Subject: [PATCH] test: add CGROUP_MANAGER env to switch to systemd default is still cgroupfs Signed-off-by: Antonio Murdaca --- test/helpers.bash | 4 +++- test/testdata/sandbox_config.json | 2 +- test/testdata/sandbox_config_hostnet.json | 2 +- test/testdata/sandbox_config_seccomp.json | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/test/helpers.bash b/test/helpers.bash index f6aff752..873c2f67 100644 --- a/test/helpers.bash +++ b/test/helpers.bash @@ -47,6 +47,8 @@ ARTIFACTS_PATH=${ARTIFACTS_PATH:-${CRIO_ROOT}/cri-o/.artifacts} CHECKSECCOMP_BINARY=${CHECKSECCOMP_BINARY:-${CRIO_ROOT}/cri-o/test/checkseccomp/checkseccomp} # XXX: This is hardcoded inside cri-o at the moment. DEFAULT_LOG_PATH=/var/log/crio/pods +# Cgroup manager to be used +CGROUP_MANAGER=${CGROUP_MANAGER:-cgroupfs} TESTDIR=$(mktemp -d) if [ -e /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then @@ -146,7 +148,7 @@ function start_crio() { "$BIN2IMG_BINARY" --root "$TESTDIR/crio" $STORAGE_OPTS --runroot "$TESTDIR/crio-run" --source-binary "$PAUSE_BINARY" fi "$COPYIMG_BINARY" --root "$TESTDIR/crio" $STORAGE_OPTS --runroot "$TESTDIR/crio-run" --image-name=redis:alpine --import-from=dir:"$ARTIFACTS_PATH"/redis-image --add-name=docker://docker.io/library/redis:alpine --signature-policy="$INTEGRATION_ROOT"/policy.json - "$CRIO_BINARY" --conmon "$CONMON_BINARY" --listen "$CRIO_SOCKET" --runtime "$RUNTIME_BINARY" --root "$TESTDIR/crio" --runroot "$TESTDIR/crio-run" $STORAGE_OPTS --seccomp-profile "$seccomp" --apparmor-profile "$apparmor" --cni-config-dir "$CRIO_CNI_CONFIG" --signature-policy "$INTEGRATION_ROOT"/policy.json --config /dev/null config >$CRIO_CONFIG + "$CRIO_BINARY" --conmon "$CONMON_BINARY" --listen "$CRIO_SOCKET" --cgroup-manager "$CGROUP_MANAGER" --runtime "$RUNTIME_BINARY" --root "$TESTDIR/crio" --runroot "$TESTDIR/crio-run" $STORAGE_OPTS --seccomp-profile "$seccomp" --apparmor-profile "$apparmor" --cni-config-dir "$CRIO_CNI_CONFIG" --signature-policy "$INTEGRATION_ROOT"/policy.json --config /dev/null config >$CRIO_CONFIG # Prepare the CNI configuration files, we're running with non host networking by default if [[ -n "$4" ]]; then diff --git a/test/testdata/sandbox_config.json b/test/testdata/sandbox_config.json index 5833013b..446a338c 100644 --- a/test/testdata/sandbox_config.json +++ b/test/testdata/sandbox_config.json @@ -52,7 +52,7 @@ "security.alpha.kubernetes.io/seccomp/pod": "unconfined" }, "linux": { - "cgroup_parent": "/crio-podsandbox1", + "cgroup_parent": "/Burstable/pod_123-456", "security_context": { "namespace_options": { "host_network": false, diff --git a/test/testdata/sandbox_config_hostnet.json b/test/testdata/sandbox_config_hostnet.json index 7315960d..da76483e 100644 --- a/test/testdata/sandbox_config_hostnet.json +++ b/test/testdata/sandbox_config_hostnet.json @@ -51,7 +51,7 @@ "security.alpha.kubernetes.io/seccomp/pod": "unconfined" }, "linux": { - "cgroup_parent": "/crio-podsandbox1", + "cgroup_parent": "/Burstable/pod_123-456", "security_context": { "namespace_options": { "host_network": true, diff --git a/test/testdata/sandbox_config_seccomp.json b/test/testdata/sandbox_config_seccomp.json index 97c8b5ed..6b0254d7 100644 --- a/test/testdata/sandbox_config_seccomp.json +++ b/test/testdata/sandbox_config_seccomp.json @@ -50,7 +50,7 @@ %VALUE% }, "linux": { - "cgroup_parent": "podsandbox1.slice:container:infra", + "cgroup_parent": "/Burstable/pod_123-456", "security_context": { "namespace_options": { "host_network": false,