From d1adcc425272855699b38cbb03e44c630715b414 Mon Sep 17 00:00:00 2001 From: Dohyung Kim Date: Tue, 16 May 2017 15:39:02 +0900 Subject: [PATCH] support multiple mic execution at same time do not unregister qemu emulator before image creation keep DEVICE_LOCKFILE to prevent a race condition Signed-off-by: Dohyung Kim Change-Id: I5714194ef6b48f80812b2f8b534d83fc27a663e4 --- mic/utils/fs_related.py | 1 - mic/utils/misc.py | 6 ------ 2 files changed, 7 deletions(-) diff --git a/mic/utils/fs_related.py b/mic/utils/fs_related.py index 54f68da..11ff5af 100644 --- a/mic/utils/fs_related.py +++ b/mic/utils/fs_related.py @@ -990,7 +990,6 @@ def get_loop_device(losetupcmd, lofile): try: fcntl.flock(fp, fcntl.LOCK_UN) fp.close() - os.unlink(DEVICE_LOCKFILE) except: pass diff --git a/mic/utils/misc.py b/mic/utils/misc.py index 738ac66..5a9fac3 100755 --- a/mic/utils/misc.py +++ b/mic/utils/misc.py @@ -934,12 +934,6 @@ def setup_qemu_emulator(rootdir, arch): msger.info('Try to disable selinux') runner.show(["/usr/sbin/setenforce", "0"]) - # unregister it if it has been registered and is a dynamically-linked executable - if os.path.exists(node): - qemu_unregister_string = "-1\n" - with open(node, "w") as fd: - fd.write(qemu_unregister_string) - # register qemu emulator for interpreting other arch executable file if not os.path.exists(node): if arch == "aarch64": -- 2.7.4