From 7ee3b3d661ae2d1c6ea28297afbc0e6087c0f6b4 Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" Date: Mon, 7 Jan 2019 14:37:42 -0800 Subject: [PATCH] Revert "lorax-composer: Cancel running Anaconda process" Drop running pkill. This causes problems if more than one is running on a system (eg. in parallel using mock). It can kill off other processes unrelated to this instance of anaconda. This reverts commit 6b5c4df8b58ad3051c20fe6324778543776d37af. --- src/pylorax/installer.py | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/pylorax/installer.py b/src/pylorax/installer.py index f377f943..7ce98065 100644 --- a/src/pylorax/installer.py +++ b/src/pylorax/installer.py @@ -21,9 +21,9 @@ import glob import json from math import ceil import os +import subprocess import shutil import socket -import subprocess import tempfile # Use the Lorax treebuilder branch for iso creation @@ -284,10 +284,7 @@ def novirt_cancel_check(cancel_funcs, proc): """ for f in cancel_funcs: if f(): - log.info("Terminating process %d", proc.pid) proc.terminate() - - # NOTE: Have to return and allow execReadlines to call proc.communicate() return True return False @@ -388,7 +385,6 @@ def novirt_install(opts, disk_img, disk_size, cancel_func=None): for line in execReadlines("anaconda", args, reset_lang=False, env_add={"ANACONDA_PRODUCTNAME": opts.project, "ANACONDA_PRODUCTVERSION": opts.releasever}, - reset_handlers=False, callback=lambda p: not novirt_cancel_check(cancel_funcs, p)): log.info(line) @@ -444,12 +440,6 @@ def novirt_install(opts, disk_img, disk_size, cancel_func=None): log.debug("Removing loop device for %s", disk_img) loop_detach("/dev/"+get_loop_name(disk_img)) - # When anaconda crashes or is canceled it leaves pyanaconda.* running - execWithRedirect("pkill", ["-f", "pyanaconda."]) - - # It can also leave dbus running - execWithRedirect("pkill", ["-f", "anaconda-bus.conf"]) - # qemu disk image is used by bare qcow2 images and by Vagrant if opts.image_type: log.info("Converting %s to %s", disk_img, opts.image_type)