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/setup_environment.sh | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'contrib/cirrus/setup_environment.sh') diff --git a/contrib/cirrus/setup_environment.sh b/contrib/cirrus/setup_environment.sh index edd793bb9..4d4189aa6 100755 --- a/contrib/cirrus/setup_environment.sh +++ b/contrib/cirrus/setup_environment.sh @@ -47,6 +47,19 @@ case "${OS_RELEASE_ID}" in setsebool container_manage_cgroup true if [[ "$ADD_SECOND_PARTITION" == "true" ]]; then bash "$SCRIPT_BASE/add_second_partition.sh"; fi + + if [[ "$OS_RELEASE_VER" == "31" ]]; then + warn "Testing with crun instead of runc" + X=$(echo "export 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 + # but crun is new, and late-breaking fixes may be required + # on short notice + dnf update -y crun + warn "Setting SELinux into Permissive mode" + setenforce 0 + fi ;; centos) # Current VM is an image-builder-image no local podman/testing echo "No further setup required for VM image building" @@ -62,9 +75,6 @@ source "$SCRIPT_BASE/lib.sh" make install.tools case "$SPECIALMODE" in - cgroupv2) - remove_packaged_podman_files # we're building from source - ;; none) [[ -n "$CROSS_PLATFORM" ]] || \ remove_packaged_podman_files -- cgit v1.2.3-54-g00ecf From 70b28bc2cc7b0696adf6b173be797d0f9c91237e Mon Sep 17 00:00:00 2001 From: Chris Evich Date: Tue, 5 Nov 2019 11:27:40 -0500 Subject: Cirrus: Use deadline elevator in F31 The default scheduler is BFQ but integration tests run into https://bugzilla.redhat.com/show_bug.cgi?id=1767539 aka https://bugzilla.kernel.org/show_bug.cgi?id=205447 Using the deadline elevator as a workaround. Signed-off-by: Chris Evich --- contrib/cirrus/setup_environment.sh | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'contrib/cirrus/setup_environment.sh') diff --git a/contrib/cirrus/setup_environment.sh b/contrib/cirrus/setup_environment.sh index 4d4189aa6..00f625407 100755 --- a/contrib/cirrus/setup_environment.sh +++ b/contrib/cirrus/setup_environment.sh @@ -49,6 +49,10 @@ case "${OS_RELEASE_ID}" in bash "$SCRIPT_BASE/add_second_partition.sh"; fi if [[ "$OS_RELEASE_VER" == "31" ]]; then + warn "Switching io schedular to deadline to avoid RHBZ 1767539" + warn "aka https://bugzilla.kernel.org/show_bug.cgi?id=205447" + 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" | \ tee -a /etc/environment) && eval "$X" && echo "$X" -- 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/setup_environment.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 From 0ac0e6e61254651c173992d3a855fb188c0ba288 Mon Sep 17 00:00:00 2001 From: Chris Evich Date: Mon, 27 Jan 2020 12:02:59 -0500 Subject: Cirrus: F31: Force systemd cgroup mgr Signed-off-by: Chris Evich --- contrib/cirrus/setup_environment.sh | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'contrib/cirrus/setup_environment.sh') diff --git a/contrib/cirrus/setup_environment.sh b/contrib/cirrus/setup_environment.sh index de3a806d1..54abb0b1b 100755 --- a/contrib/cirrus/setup_environment.sh +++ b/contrib/cirrus/setup_environment.sh @@ -53,9 +53,15 @@ case "${OS_RELEASE_ID}" in warn "aka https://bugzilla.kernel.org/show_bug.cgi?id=205447" echo "mq-deadline" > /sys/block/sda/queue/scheduler cat /sys/block/sda/queue/scheduler + + warn "Forcing systemd cgroup manager" + X=$(echo "export CGROUP_MANAGER=systemd" | \ + tee -a /etc/environment) && eval "$X" && echo "$X" + warn "Testing with crun instead of runc" 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 # but crun is new, and late-breaking fixes may be required -- cgit v1.2.3-54-g00ecf From 5973641404066dd5c1c66b41ff7f397490d80285 Mon Sep 17 00:00:00 2001 From: Chris Evich Date: Tue, 28 Jan 2020 16:11:48 -0500 Subject: Cirrus: SELinux Enforcing for F31 w/ CGv2 Signed-off-by: Chris Evich --- contrib/cirrus/setup_environment.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'contrib/cirrus/setup_environment.sh') diff --git a/contrib/cirrus/setup_environment.sh b/contrib/cirrus/setup_environment.sh index 54abb0b1b..5364dd510 100755 --- a/contrib/cirrus/setup_environment.sh +++ b/contrib/cirrus/setup_environment.sh @@ -67,8 +67,9 @@ case "${OS_RELEASE_ID}" in # but crun is new, and late-breaking fixes may be required # on short notice dnf update -y crun - warn "Setting SELinux into Permissive mode" - setenforce 0 + + #warn "Setting SELinux into Permissive mode" + #setenforce 0 fi ;; centos) # Current VM is an image-builder-image no local podman/testing -- cgit v1.2.3-54-g00ecf