From e0ca4a22604cd8b359328fb56a5499d3e1a36157 Mon Sep 17 00:00:00 2001 From: Chris Evich Date: Wed, 28 Aug 2019 12:39:36 -0400 Subject: Cirrus: Support testing with F31 Signed-off-by: Chris Evich --- contrib/cirrus/integration_test.sh | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'contrib/cirrus/integration_test.sh') diff --git a/contrib/cirrus/integration_test.sh b/contrib/cirrus/integration_test.sh index 9fd79ab18..20e067c93 100755 --- a/contrib/cirrus/integration_test.sh +++ b/contrib/cirrus/integration_test.sh @@ -36,16 +36,6 @@ case "$SPECIALMODE" in -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no \ -o CheckHostIP=no $GOSRC/$SCRIPT_BASE/rootless_test.sh ${TESTSUITE} ;; - cgroupv2) - setenforce 0 - dnf install -y crun - export OCI_RUNTIME=/usr/bin/crun - make - make install PREFIX=/usr ETCDIR=/etc - make install.config PREFIX=/usr - make test-binaries - make local${TESTSUITE} - ;; endpoint) make make install PREFIX=/usr ETCDIR=/etc @@ -53,9 +43,9 @@ case "$SPECIALMODE" in make endpoint ;; bindings) - make + make make install PREFIX=/usr ETCDIR=/etc - cd pkg/bindings/test && ginkgo -r + cd pkg/bindings/test && ginkgo -r ;; none) make -- cgit v1.2.3-54-g00ecf From 614917d6aac58dfc0efd90dbb75411ac8a61821f Mon Sep 17 00:00:00 2001 From: Chris Evich Date: Fri, 11 Oct 2019 13:32:50 -0400 Subject: Cirrus: Handle runc->crun when both are possible In some distributions it's possible to have both runc and crun installed and/or for podman to be confused about which to use. In these instances, force the decision by adding `OCI_RUNTIME=/usr/bin/crun` into `/etc/environment`. Also in-place modify libpod.conf to use 'crun' instead of 'runc' Signed-off-by: Chris Evich --- contrib/cirrus/integration_test.sh | 12 ++++++++++++ contrib/cirrus/setup_environment.sh | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'contrib/cirrus/integration_test.sh') diff --git a/contrib/cirrus/integration_test.sh b/contrib/cirrus/integration_test.sh index 20e067c93..d5e6ec884 100755 --- a/contrib/cirrus/integration_test.sh +++ b/contrib/cirrus/integration_test.sh @@ -16,6 +16,16 @@ fi cd "$GOSRC" +# Transition workaround: runc is still the default for upstream development +handle_crun() { + # For systems with crun installed, assume CgroupsV2 and use it + if type -P crun &> /dev/null + then + warn "Replacing runc -> crun in libpod.conf" + sed -i -r -e 's/^runtime = "runc"/runtime = "crun"/' /usr/share/containers/libpod.conf + fi +} + case "$SPECIALMODE" in in_podman) ${CONTAINER_RUNTIME} run --rm --privileged --net=host \ @@ -39,6 +49,7 @@ case "$SPECIALMODE" in endpoint) make make install PREFIX=/usr ETCDIR=/etc + #handle_crun make test-binaries make endpoint ;; @@ -52,6 +63,7 @@ case "$SPECIALMODE" in make install PREFIX=/usr ETCDIR=/etc make install.config PREFIX=/usr make test-binaries + handle_crun if [[ "$TEST_REMOTE_CLIENT" == "true" ]] then make remote${TESTSUITE} VARLINK_LOG=$VARLINK_LOG diff --git a/contrib/cirrus/setup_environment.sh b/contrib/cirrus/setup_environment.sh index 00f625407..de3a806d1 100755 --- a/contrib/cirrus/setup_environment.sh +++ b/contrib/cirrus/setup_environment.sh @@ -54,7 +54,7 @@ case "${OS_RELEASE_ID}" in echo "mq-deadline" > /sys/block/sda/queue/scheduler cat /sys/block/sda/queue/scheduler warn "Testing with crun instead of runc" - X=$(echo "export export OCI_RUNTIME=/usr/bin/crun" | \ + X=$(echo "export OCI_RUNTIME=/usr/bin/crun" | \ tee -a /etc/environment) && eval "$X" && echo "$X" warn "Upgrading to the latest crun" # Normally not something to do for stable testing -- cgit v1.2.3-54-g00ecf