31 lines
1.1 KiB
Diff
31 lines
1.1 KiB
Diff
From 4b16d267f20555cdc45df36ee6eb2fa737bfc587 Mon Sep 17 00:00:00 2001
|
|
From: Adam Williamson <awilliam@redhat.com>
|
|
Date: Tue, 27 Feb 2018 15:19:44 -0800
|
|
Subject: [PATCH] Log a bit more around disk image file creation
|
|
|
|
Signed-off-by: Adam Williamson <awilliam@redhat.com>
|
|
---
|
|
src/pylorax/imgutils.py | 4 ++++
|
|
1 file changed, 4 insertions(+)
|
|
|
|
diff --git a/src/pylorax/imgutils.py b/src/pylorax/imgutils.py
|
|
index af53490..d1d7f84 100644
|
|
--- a/src/pylorax/imgutils.py
|
|
+++ b/src/pylorax/imgutils.py
|
|
@@ -324,8 +324,12 @@ class LoopDev(object):
|
|
def __init__(self, filename, size=None):
|
|
self.loopdev = None
|
|
self.filename = filename
|
|
+ exists = os.path.exists(filename)
|
|
+ logger.debug("LoopDev before mksparse: filename %s, exists %s, size %s", filename, exists, size)
|
|
if size:
|
|
mksparse(self.filename, size)
|
|
+ exists = os.path.exists(filename)
|
|
+ logger.debug("LoopDev after mksparse: filename %s, exists %s, size %s", filename, exists, size)
|
|
def __enter__(self):
|
|
self.loopdev = loop_attach(self.filename)
|
|
return self.loopdev
|
|
--
|
|
2.16.1
|
|
|