]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-build.git/commitdiff
setup_container_runtime: Move rm -f ceph_build after perms fix 2507/head
authorDavid Galloway <david.galloway@ibm.com>
Tue, 16 Dec 2025 18:14:46 +0000 (13:14 -0500)
committerDavid Galloway <david.galloway@ibm.com>
Tue, 16 Dec 2025 18:14:46 +0000 (13:14 -0500)
We need to fix permissions first then delete the container if there were root-owned layers left over

Signed-off-by: David Galloway <david.galloway@ibm.com>
scripts/setup_container_runtime.sh

index 7100b5b9576a3621f29d395fcc29b8abde8f5940..4f6fb2998e4b5a77579062c10cf4b42b27549acc 100755 (executable)
@@ -26,13 +26,6 @@ function setup_container_runtime () {
   fi
 
   if command -v podman; then
-     
-    # remove any leftover containers that might be present because of
-    # bad exits from podman (like an oom kill or something).
-    # We've observed new jobs failing to run because they can't create
-    # a container named ceph_build
-    podman rm -f ceph_build 
-
     if [ "$(podman version -f "{{ lt .Client.Version \"5.6.1\" }}")" = "true" ] && \
     ! echo "928238bfcdc79a26ceb51d7d9759f99144846c0a  /etc/tmpfiles.d/podman.conf" | sha1sum --status --check -; then
       # Pull in this fix: https://github.com/containers/podman/pull/26986
@@ -66,6 +59,11 @@ function setup_container_runtime () {
         fi
       fi
     fi
+    # remove any leftover containers that might be present because of
+    # bad exits from podman (like an oom kill or something).
+    # We've observed new jobs failing to run because they can't create
+    # a container named ceph_build
+    podman rm -f ceph_build
   fi
 }