diff options
author | Chris Evich <cevich@redhat.com> | 2020-02-27 11:43:47 -0500 |
---|---|---|
committer | Chris Evich <cevich@redhat.com> | 2020-02-28 10:37:31 -0500 |
commit | 0885f7674215800286ffb9360d0f9095799419d6 (patch) | |
tree | 8fb2e9e1cfb7dbd20e62e52f0b540782ddf30c13 /contrib/cirrus/setup_environment.sh | |
parent | c96eb612e5a1149b8b618dd87c1f81d3c4878e09 (diff) | |
download | podman-0885f7674215800286ffb9360d0f9095799419d6.tar.gz podman-0885f7674215800286ffb9360d0f9095799419d6.tar.bz2 podman-0885f7674215800286ffb9360d0f9095799419d6.zip |
Cirrus: Force runc use in F30
Suspect crun might be sneaking in during VM image build via podman RPM
dependency. Add it to the removal list when building, then also force
use of runc at runtime in F30.
Also quote all true/false vars to force them as strings instead of
booleans (which will become capitalized)
Signed-off-by: Chris Evich <cevich@redhat.com>
Diffstat (limited to 'contrib/cirrus/setup_environment.sh')
-rwxr-xr-x | contrib/cirrus/setup_environment.sh | 60 |
1 files changed, 38 insertions, 22 deletions
diff --git a/contrib/cirrus/setup_environment.sh b/contrib/cirrus/setup_environment.sh index d1730373a..d2e1b8767 100755 --- a/contrib/cirrus/setup_environment.sh +++ b/contrib/cirrus/setup_environment.sh @@ -53,40 +53,56 @@ 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 "Forcing systemd cgroup manager" - X=$(echo "export CGROUP_MANAGER=systemd" | \ - tee -a /etc/environment) && eval "$X" && echo "$X" + warn "Switching io scheduler 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 "Forcing systemd cgroup manager" + X=$(echo "export CGROUP_MANAGER=systemd" | \ + tee -a /etc/environment) && eval "$X" && echo "$X" + ;; + centos) # Current VM is an image-builder-image no local podman/testing + echo "No further setup required for VM image building" + exit 0 + ;; + *) bad_os_id_ver ;; +esac - warn "Testing with crun instead of runc" - X=$(echo "export OCI_RUNTIME=/usr/bin/crun" | \ - tee -a /etc/environment) && eval "$X" && echo "$X" +# Reload to incorporate any changes from above +source "$SCRIPT_BASE/lib.sh" +case "$CG_FS_TYPE" in + tmpfs) + warn "Forcing testing with runc instead of crun" + X=$(echo "export OCI_RUNTIME=/usr/bin/runc" | \ + tee -a /etc/environment) && eval "$X" && echo "$X" + ;; + cgroup2fs) + # This is necessary since we've built/installed from source, which uses runc as the default. + warn "Forcing testing with crun instead of runc" + X=$(echo "export OCI_RUNTIME=/usr/bin/crun" | \ + tee -a /etc/environment) && eval "$X" && echo "$X" + + if [[ "$MOD_LIBPOD_CONF" == "true" ]]; then + warn "Updating runtime setting in repo. copy of libpod.conf" + sed -i -r -e 's/^runtime = "runc"/runtime = "crun"/' $GOSRC/libpod.conf + git diff $GOSRC/libpod.conf + fi + + if [[ "$OS_RELEASE_ID" == "fedora" ]]; then 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" - exit 0 + *) + die 110 "Unsure how to handle cgroup filesystem type '$CG_FS_TYPE'" ;; - *) bad_os_id_ver ;; esac -# Reload to incorporate any changes from above -source "$SCRIPT_BASE/lib.sh" - # Must execute before possible setup_rootless() make install.tools |