From a294a0572647a9e7e94263322f097058b2ea9f59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Tue, 4 Aug 2020 15:55:12 +0200 Subject: [PATCH] Retry ostree installer task on losetup error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This uses a previous change that added ability to retry and simply extends the conditions when it fires. JIRA: RHELCMP-1863 Signed-off-by: Lubomír Sedlář --- pungi/phases/ostree_installer.py | 1 + pungi/runroot.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/pungi/phases/ostree_installer.py b/pungi/phases/ostree_installer.py index c1167810..3424ea8c 100644 --- a/pungi/phases/ostree_installer.py +++ b/pungi/phases/ostree_installer.py @@ -286,4 +286,5 @@ class OstreeInstallerThread(WorkerThread): mounts=[compose.topdir], chown_paths=[output_dir], weight=compose.conf["runroot_weights"].get("ostree_installer"), + log_dir=self.logdir, ) diff --git a/pungi/runroot.py b/pungi/runroot.py index 322a1b80..f119b59a 100644 --- a/pungi/runroot.py +++ b/pungi/runroot.py @@ -14,6 +14,7 @@ # along with this program; if not, see . import os +import re from six.moves import shlex_quote import kobo.log from kobo.shortcuts import run @@ -95,6 +96,8 @@ class Runroot(kobo.log.LoggingBase): for line in f: if "losetup: cannot find an unused loop device" in line: return True + if re.match("losetup: .* failed to set up loop device", line): + return True except Exception: pass return False