summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-09-19 04:00:54 +0200
committerGitHub <noreply@github.com>2019-09-19 04:00:54 +0200
commit408f2780a1dd94f99fe36be4573a9887e6c74cf7 (patch)
tree0a214ba74acd987d79e76331eb1eb1999dac7320 /contrib
parent6789428265a0d9d92df6f6d28a138241dbe86456 (diff)
parenta58ac7be7b746855baa84932a49f71114e51655e (diff)
downloadpodman-408f2780a1dd94f99fe36be4573a9887e6c74cf7.tar.gz
podman-408f2780a1dd94f99fe36be4573a9887e6c74cf7.tar.bz2
podman-408f2780a1dd94f99fe36be4573a9887e6c74cf7.zip
Merge pull request #3985 from cevich/verify_no_podman
Cirrus: Prevent resident pollution
Diffstat (limited to 'contrib')
-rw-r--r--contrib/cirrus/lib.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/contrib/cirrus/lib.sh b/contrib/cirrus/lib.sh
index cd8b2ef61..f26eec87f 100644
--- a/contrib/cirrus/lib.sh
+++ b/contrib/cirrus/lib.sh
@@ -345,6 +345,21 @@ install_test_configs(){
remove_packaged_podman_files(){
echo "Removing packaged podman files to prevent conflicts with source build and testing."
req_env_var OS_RELEASE_ID
+
+ # If any binaries are resident they could cause unexpected pollution
+ for unit in io.podman.service io.podman.socket
+ do
+ for state in enabled active
+ do
+ if systemctl --quiet is-$state $unit
+ then
+ echo "Warning: $unit found $state prior to packaged-file removal"
+ systemctl --quiet disable $unit || true
+ systemctl --quiet stop $unit || true
+ fi
+ done
+ done
+
if [[ "$OS_RELEASE_ID" =~ "ubuntu" ]]
then
LISTING_CMD="sudo -E dpkg-query -L podman"
@@ -359,6 +374,9 @@ remove_packaged_podman_files(){
if [[ -d "$fullpath" ]] || [[ $(basename "$fullpath") == "conmon" ]] ; then continue; fi
ooe.sh sudo rm -vf "$fullpath"
done
+
+ # Be super extra sure and careful vs performant and completely safe
+ sync && echo 3 > /proc/sys/vm/drop_caches
}
systemd_banish(){