diff options
author | Chris Evich <cevich@redhat.com> | 2019-10-11 13:32:50 -0400 |
---|---|---|
committer | Chris Evich <cevich@redhat.com> | 2020-02-25 12:34:25 -0500 |
commit | 614917d6aac58dfc0efd90dbb75411ac8a61821f (patch) | |
tree | 41a4f48b9fbe91b5f7f3ffca547b919efba764d8 /contrib/cirrus/integration_test.sh | |
parent | 70b28bc2cc7b0696adf6b173be797d0f9c91237e (diff) | |
download | podman-614917d6aac58dfc0efd90dbb75411ac8a61821f.tar.gz podman-614917d6aac58dfc0efd90dbb75411ac8a61821f.tar.bz2 podman-614917d6aac58dfc0efd90dbb75411ac8a61821f.zip |
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 <cevich@redhat.com>
Diffstat (limited to 'contrib/cirrus/integration_test.sh')
-rwxr-xr-x | contrib/cirrus/integration_test.sh | 12 |
1 files changed, 12 insertions, 0 deletions
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 |