Revision 14b3f969 lib/hypervisor/hv_chroot.py

b/lib/hypervisor/hv_chroot.py
216 216
    """Cleanup after a stopped instance
217 217

  
218 218
    """
219
    root_dir = self._InstanceDir(instance_name)
220

  
221
    if not os.path.exists(root_dir):
222
      return
223

  
219 224
    if self._IsDirLive(root_dir):
220 225
      raise HypervisorError("Processes are still using the chroot")
221 226

  
......
223 228
      utils.RunCmd(["umount", mpath])
224 229

  
225 230
    result = utils.RunCmd(["umount", root_dir])
226
    if result.failed and force:
231
    if result.failed:
227 232
      msg = ("Processes still alive in the chroot: %s" %
228 233
             utils.RunCmd("fuser -vm %s" % root_dir).output)
229 234
      logging.error(msg)

Also available in: Unified diff