]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
setup_container_runtime.sh: add podman rm -f ceph_build 2468/head
authorDan Mick <dan.mick@redhat.com>
Thu, 9 Oct 2025 00:04:00 +0000 (17:04 -0700)
committerDan Mick <dan.mick@redhat.com>
Thu, 9 Oct 2025 00:04:00 +0000 (17:04 -0700)
build-with-container.py's build containers are named ceph_build.
If something happens to a build and the container is left behind,
we can't start another.  Force-remove it at the beginning of a job.

Signed-off-by: Dan Mick <dan.mick@redhat.com>
scripts/setup_container_runtime.sh

index 4b069bac175568d49dc167a7b54cbcc43fa07dbb..a0cd91a739f3aca064f0b9b22452b6ef26e86c1f 100755 (executable)
@@ -26,6 +26,13 @@ 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