You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
1.2 KiB
35 lines
1.2 KiB
2 years ago
|
From 4969d3ffd744c9f63be41fbccf54bae121073d6e Mon Sep 17 00:00:00 2001
|
||
|
From: Eugene Zamriy <eugene@zamriy.info>
|
||
|
Date: Thu, 6 Apr 2023 21:16:26 +0300
|
||
|
Subject: [PATCH] Backport dracut chroot umount fix
|
||
|
|
||
|
---
|
||
|
src/pylorax/imgutils.py | 8 +++++---
|
||
|
1 file changed, 5 insertions(+), 3 deletions(-)
|
||
|
|
||
|
diff --git a/src/pylorax/imgutils.py b/src/pylorax/imgutils.py
|
||
|
index d713e4c..80e8c2f 100644
|
||
|
--- a/src/pylorax/imgutils.py
|
||
|
+++ b/src/pylorax/imgutils.py
|
||
|
@@ -498,12 +498,14 @@ class DracutChroot(object):
|
||
|
return self
|
||
|
|
||
|
def __exit__(self, exc_type, exc_value, tracebk):
|
||
|
- runcmd(["umount", self.root + "/proc" ])
|
||
|
- runcmd(["umount", self.root + "/dev" ])
|
||
|
+ umount(self.root + '/proc', delete=False)
|
||
|
+ umount(self.root + '/dev', delete=False)
|
||
|
|
||
|
# cleanup bind mounts
|
||
|
for _, d in self.bind:
|
||
|
- runcmd(["umount", self.root + d ])
|
||
|
+ # In case parallel building of two or more images
|
||
|
+ # some mounts in /var/tmp/lorax can be busy at the moment of unmounting
|
||
|
+ umount(self.root + d, maxretry=10, retrysleep=5, delete=False)
|
||
|
|
||
|
def Run(self, args):
|
||
|
runcmd(["dracut"] + args, root=self.root)
|
||
|
--
|
||
|
2.39.2
|
||
|
|