Container: delete overlay tempdir upon cleanup

This commit is contained in:
Théophile Bastian 2020-03-19 23:31:09 +01:00
parent ceee1908a4
commit 4e39260232

View file

@ -210,6 +210,10 @@ class Container(util.LibvirtObject):
raise exn raise exn
# Else, the machine was already stopped: everything is fine # Else, the machine was already stopped: everything is fine
self.lxc_container = None self.lxc_container = None
if self.overlay_root:
self.overlay_root.cleanup_mount()
self.overlay_root.overlay_temp_dir.cleanup()
self.overlay_root = None
def __enter__(self): def __enter__(self):
self.create() self.create()