Commit 14b3f969 authored by Iustin Pop's avatar Iustin Pop
Browse files

Fix broken commit 9e302a8c

Commit 9e302a8c

 split the StopInstance function in two without properly
duplicating the local variables.
Signed-off-by: default avatarIustin Pop <>
Reviewed-by: default avatarRené Nussbaumer <>
parent 2892a4c9
......@@ -216,6 +216,11 @@ class ChrootManager(hv_base.BaseHypervisor):
"""Cleanup after a stopped instance
root_dir = self._InstanceDir(instance_name)
if not os.path.exists(root_dir):
if self._IsDirLive(root_dir):
raise HypervisorError("Processes are still using the chroot")
......@@ -223,7 +228,7 @@ class ChrootManager(hv_base.BaseHypervisor):
utils.RunCmd(["umount", mpath])
result = utils.RunCmd(["umount", root_dir])
if result.failed and force:
if result.failed:
msg = ("Processes still alive in the chroot: %s" %
utils.RunCmd("fuser -vm %s" % root_dir).output)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment