mirror of
https://github.com/rocky-linux/createhdds.git
synced 2024-12-23 02:28:29 +00:00
Ensure domain is taken down when we exhaust retries
This was just an oversight - we don't destroy and undefine the 'createhdds' domain on the path where the final retry to create an image times out, we just wipe the temp file and exit. So we leave a qemu process sitting around until createhdds runs again (and, on openQA production, exhausting swap space). Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
parent
e112047296
commit
ba1dd56896
@ -305,6 +305,9 @@ class VirtInstallImage(object):
|
|||||||
ret = subprocess.call(args, timeout=3600)
|
ret = subprocess.call(args, timeout=3600)
|
||||||
except subprocess.TimeoutExpired:
|
except subprocess.TimeoutExpired:
|
||||||
logger.warning("Image creation timed out!")
|
logger.warning("Image creation timed out!")
|
||||||
|
dom.destroy()
|
||||||
|
dom.undefine()
|
||||||
|
conn.close()
|
||||||
if os.path.isfile(tmpfile):
|
if os.path.isfile(tmpfile):
|
||||||
os.remove(tmpfile)
|
os.remove(tmpfile)
|
||||||
if retries:
|
if retries:
|
||||||
|
Loading…
Reference in New Issue
Block a user