From 4e3926023248d90dbdf0f2b5dd6624a81403369d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9ophile=20Bastian?= Date: Thu, 19 Mar 2020 23:31:09 +0100 Subject: [PATCH] Container: delete overlay tempdir upon cleanup --- lxc_net/container.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lxc_net/container.py b/lxc_net/container.py index f08a586..12a9aa2 100644 --- a/lxc_net/container.py +++ b/lxc_net/container.py @@ -210,6 +210,10 @@ class Container(util.LibvirtObject): raise exn # Else, the machine was already stopped: everything is fine 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): self.create()